public class ForwardUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) ImmutableProxyInterface |
m_proxyInterface
The current proxy interface.
|
private static ForwardUtils |
ms_fuInstance
Stores the instance of ForwardUtils (Singleton).
|
Modifier | Constructor and Description |
---|---|
private |
ForwardUtils()
This creates a new instance of ForwardUtils with disabled proxy settings.
|
Modifier and Type | Method and Description |
---|---|
java.net.Socket |
createConnection(java.lang.String a_host,
int a_port)
Creates a new connection to the specified target using the current
firewall settings.
|
IStreamConnection |
createForwardingConnection(IAddress a_address)
Creates a ForwardConnection according to the Type of the given Address.
|
ProxyConnection |
createProxyConnection(java.lang.String a_host,
int a_port)
Creates a new connection to the specified target using the current
firewall settings.
|
static ForwardUtils |
getInstance()
Returns the instance of ForwardUtils (Singleton).
|
void |
setProxySettings(ImmutableProxyInterface a_proxyInterface)
This changes the proxy settings for all new forwarding connections.
|
private static ForwardUtils ms_fuInstance
ImmutableProxyInterface m_proxyInterface
private ForwardUtils()
public static ForwardUtils getInstance()
public void setProxySettings(ImmutableProxyInterface a_proxyInterface)
a_proxyInterface
- the proxy interfacepublic ProxyConnection createProxyConnection(java.lang.String a_host, int a_port)
a_host
- The hostname or IP address of the target.a_port
- The port number of the connection target.public IStreamConnection createForwardingConnection(IAddress a_address)
public java.net.Socket createConnection(java.lang.String a_host, int a_port)
a_host
- The hostname or IP address of the target.a_port
- The port number of the connection target.Copyright © 2023. All rights reserved.