Class OpenVpnProfile

java.lang.Object
org.eblocker.server.common.data.openvpn.OpenVpnProfile
All Implemented Interfaces:
VpnProfile

public class OpenVpnProfile extends Object implements VpnProfile
VpnProfile implementation for OpenVPN Client instances
  • Constructor Details

    • OpenVpnProfile

      public OpenVpnProfile()
    • OpenVpnProfile

      public OpenVpnProfile(Integer id, String name)
  • Method Details

    • getId

      public Integer getId()
      Description copied from interface: VpnProfile
      Get the unique ID of this VpnProfile (which will also be used as the marker for the IP packets in the iptables mangle table)
      Specified by:
      getId in interface VpnProfile
      Returns:
    • setId

      public void setId(Integer id)
    • getName

      public String getName()
      Description copied from interface: VpnProfile
      Get the name of this VPN Profile
      Specified by:
      getName in interface VpnProfile
      Returns:
    • setName

      public void setName(String name)
      Description copied from interface: VpnProfile
      Set the name
      Specified by:
      setName in interface VpnProfile
    • getDescription

      public String getDescription()
      Description copied from interface: VpnProfile
      Get the description for this VPN Profile
      Specified by:
      getDescription in interface VpnProfile
      Returns:
    • setDescription

      public void setDescription(String desc)
      Description copied from interface: VpnProfile
      Set the description of this VPN client profile (or the server)
      Specified by:
      setDescription in interface VpnProfile
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: VpnProfile
      Get the client config file
      Specified by:
      isEnabled in interface VpnProfile
      Returns:
      client config file if available, otherwise null

      File getConfigFile();

    • setEnabled

      public void setEnabled(boolean enabled)
      Specified by:
      setEnabled in interface VpnProfile
    • isNameServersEnabled

      public boolean isNameServersEnabled()
      Specified by:
      isNameServersEnabled in interface VpnProfile
    • setNameServersEnabled

      public void setNameServersEnabled(boolean nameServersEnabled)
      Specified by:
      setNameServersEnabled in interface VpnProfile
    • isTemporary

      public boolean isTemporary()
      Specified by:
      isTemporary in interface VpnProfile
    • setTemporary

      public void setTemporary(boolean temporary)
      Specified by:
      setTemporary in interface VpnProfile
    • isDeleted

      public boolean isDeleted()
      Specified by:
      isDeleted in interface VpnProfile
    • setDeleted

      public void setDeleted(boolean deleted)
      Specified by:
      setDeleted in interface VpnProfile
    • getKeepAliveMode

      public KeepAliveMode getKeepAliveMode()
      Specified by:
      getKeepAliveMode in interface VpnProfile
    • setKeepAliveMode

      public void setKeepAliveMode(KeepAliveMode keepAliveMode)
      Specified by:
      setKeepAliveMode in interface VpnProfile
    • getKeepAlivePingTarget

      public String getKeepAlivePingTarget()
      Specified by:
      getKeepAlivePingTarget in interface VpnProfile
    • setKeepAlivePingTarget

      public void setKeepAlivePingTarget(String target)
      Specified by:
      setKeepAlivePingTarget in interface VpnProfile
    • getLoginCredentials

      public VpnLoginCredentials getLoginCredentials()
      Description copied from interface: VpnProfile
      Get the login credentials for this VPN account (if needed)
      Specified by:
      getLoginCredentials in interface VpnProfile
      Returns:
      login credentials container, null if they are not needed
    • setLoginCredentials

      public void setLoginCredentials(VpnLoginCredentials loginCredentials)
      Description copied from interface: VpnProfile
      Set the login credentials for this VPN client instance
      Specified by:
      setLoginCredentials in interface VpnProfile
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object that)
      Overrides:
      equals in class Object
    • getConfigurationFileVersion

      public Integer getConfigurationFileVersion()
    • setConfigurationFileVersion

      public void setConfigurationFileVersion(Integer configurationFileVersion)