Interface VpnProfile
- All Known Implementing Classes:
OpenVpnProfile
public interface VpnProfile
This interface can model VPN profiles. It has quite a huge API to be quite general for future additional implementations of not only OpenVPN,
so you don't have to make use of all the available methods, just return a good default value or null pointer when you don't need a certain method.
-
Method Summary
Modifier and TypeMethodDescriptionGet the description for this VPN ProfilegetId()Get the unique ID of this VpnProfile (which will also be used as the marker for the IP packets in the iptables mangle table)Get the login credentials for this VPN account (if needed)getName()Get the name of this VPN ProfilebooleanbooleanGet the client config filebooleanbooleanvoidsetDeleted(boolean deleted) voidsetDescription(String desc) Set the description of this VPN client profile (or the server)voidsetEnabled(boolean enabled) voidsetKeepAliveMode(KeepAliveMode keepAliveMode) voidsetKeepAlivePingTarget(String target) voidsetLoginCredentials(VpnLoginCredentials loginCredentials) Set the login credentials for this VPN client instancevoidSet the namevoidsetNameServersEnabled(boolean nameServersEnabled) voidsetTemporary(boolean temporary)
-
Method Details
-
getId
Integer getId()Get the unique ID of this VpnProfile (which will also be used as the marker for the IP packets in the iptables mangle table)- Returns:
-
getName
String getName()Get the name of this VPN Profile- Returns:
-
setName
Set the name- Parameters:
name-
-
getDescription
String getDescription()Get the description for this VPN Profile- Returns:
-
setDescription
Set the description of this VPN client profile (or the server)- Parameters:
desc-
-
isEnabled
boolean isEnabled()Get the client config file- Returns:
- client config file if available, otherwise null
File getConfigFile();
-
setEnabled
void setEnabled(boolean enabled) -
isNameServersEnabled
boolean isNameServersEnabled() -
setNameServersEnabled
void setNameServersEnabled(boolean nameServersEnabled) -
isTemporary
boolean isTemporary() -
setTemporary
void setTemporary(boolean temporary) -
isDeleted
boolean isDeleted() -
setDeleted
void setDeleted(boolean deleted) -
getKeepAliveMode
KeepAliveMode getKeepAliveMode() -
setKeepAliveMode
-
getKeepAlivePingTarget
String getKeepAlivePingTarget() -
setKeepAlivePingTarget
-
getLoginCredentials
VpnLoginCredentials getLoginCredentials()Get the login credentials for this VPN account (if needed)- Returns:
- login credentials container, null if they are not needed
-
setLoginCredentials
Set the login credentials for this VPN client instance- Parameters:
loginCredentials-
-