Package org.eblocker.server.http.service
Class VpnServerService
java.lang.Object
org.eblocker.server.http.service.VpnServerService
- Direct Known Subclasses:
OpenVpnServerService
Base class for eBlocker Mobile services that handles common tasks,
e.g. port forwarding.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected List<UpnpPortForwardingResult>protected final Stringprotected final intprotected final intprotected final UpnpManagementService -
Constructor Summary
ConstructorsConstructorDescriptionVpnServerService(UpnpManagementService upnpService, int serverPort, String portForwardingDescription, int tempDuration, int duration) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidprotected abstract intprotected abstract PortForwardingModevoidsetAndMapExternalPortTemporarily(Integer externalPort)
-
Field Details
-
upnpService
-
serverPort
protected final int serverPort -
portForwardingDescription
-
portForwardingTempDuration
protected final int portForwardingTempDuration -
duration
protected final int duration -
openedPorts
-
-
Constructor Details
-
VpnServerService
public VpnServerService(UpnpManagementService upnpService, int serverPort, String portForwardingDescription, int tempDuration, int duration)
-
-
Method Details
-
getMappedPort
protected abstract int getMappedPort() -
getPortForwardingMode
-
enablePortForwarding
- Throws:
UpnpPortForwardingException
-
disablePortForwarding
- Throws:
UpnpPortForwardingException
-
setAndMapExternalPortTemporarily
public void setAndMapExternalPortTemporarily(Integer externalPort) throws UpnpPortForwardingException - Throws:
UpnpPortForwardingException
-