Package com.biglybt.core.proxy.impl
Class AEProxyAddressMapperImpl
- java.lang.Object
-
- com.biglybt.core.proxy.impl.AEProxyAddressMapperImpl
-
- All Implemented Interfaces:
AEProxyAddressMapper
public class AEProxyAddressMapperImpl extends java.lang.Object implements AEProxyAddressMapper
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
AEProxyAddressMapperImpl.AppliedPortMappingImpl
private class
AEProxyAddressMapperImpl.PortMappingImpl
-
Nested classes/interfaces inherited from interface com.biglybt.core.proxy.AEProxyAddressMapper
AEProxyAddressMapper.AppliedPortMapping, AEProxyAddressMapper.PortMapping
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
enabled
protected java.util.Map<java.lang.String,java.lang.String>
map
protected long
next_value
(package private) java.util.Map<java.lang.Integer,AEProxyAddressMapperImpl.PortMappingImpl>
port_mappings
protected java.lang.String
prefix
protected java.util.Map<java.lang.String,java.lang.String>
reverse_map
protected static AEProxyAddressMapper
singleton
protected AEMonitor
this_mon
-
Fields inherited from interface com.biglybt.core.proxy.AEProxyAddressMapper
MAP_PROPERTY_DISABLE_AZ_MESSAGING, MAP_PROPERTY_PROTOCOL_QUALIFIER
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AEProxyAddressMapperImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AEProxyAddressMapper.AppliedPortMapping
applyPortMapping(java.net.InetAddress address, int port)
java.lang.String
externalise(java.lang.String address)
java.net.URL
externalise(java.net.URL url)
static AEProxyAddressMapper
getSingleton()
java.lang.String
internalise(java.lang.String address)
SOCKS 5 is limited to 255 char DNS names.java.net.URL
internalise(java.net.URL url)
AEProxyAddressMapper.PortMapping
registerPortMapping(int proxy_port, int local_port, java.lang.String local_ip, int remote_port, java.lang.String remote_ip, java.util.Map<java.lang.String,java.lang.Object> properties)
AEProxyAddressMapper.PortMapping
registerPortMapping(int proxy_port, java.lang.String remote_ip)
AEProxyAddressMapper.PortMapping
registerPortMapping(int proxy_port, java.lang.String remote_ip, java.util.Map<java.lang.String,java.lang.Object> properties)
-
-
-
Field Detail
-
singleton
protected static final AEProxyAddressMapper singleton
-
enabled
protected boolean enabled
-
prefix
protected java.lang.String prefix
-
next_value
protected long next_value
-
map
protected final java.util.Map<java.lang.String,java.lang.String> map
-
reverse_map
protected final java.util.Map<java.lang.String,java.lang.String> reverse_map
-
this_mon
protected final AEMonitor this_mon
-
port_mappings
final java.util.Map<java.lang.Integer,AEProxyAddressMapperImpl.PortMappingImpl> port_mappings
-
-
Method Detail
-
getSingleton
public static AEProxyAddressMapper getSingleton()
-
internalise
public java.lang.String internalise(java.lang.String address)
Description copied from interface:AEProxyAddressMapper
SOCKS 5 is limited to 255 char DNS names. So for longer ones (e.g. I2P 'names') we have to replace then with somethin shorter to get through the SOCKS layer and then remap them on the otherside. These functions are only active if a SOCKS proxy is enabled and looping back (in process is the assumption)- Specified by:
internalise
in interfaceAEProxyAddressMapper
- Returns:
-
externalise
public java.lang.String externalise(java.lang.String address)
- Specified by:
externalise
in interfaceAEProxyAddressMapper
-
internalise
public java.net.URL internalise(java.net.URL url)
- Specified by:
internalise
in interfaceAEProxyAddressMapper
-
externalise
public java.net.URL externalise(java.net.URL url)
- Specified by:
externalise
in interfaceAEProxyAddressMapper
-
registerPortMapping
public AEProxyAddressMapper.PortMapping registerPortMapping(int proxy_port, java.lang.String remote_ip)
- Specified by:
registerPortMapping
in interfaceAEProxyAddressMapper
-
registerPortMapping
public AEProxyAddressMapper.PortMapping registerPortMapping(int proxy_port, java.lang.String remote_ip, java.util.Map<java.lang.String,java.lang.Object> properties)
- Specified by:
registerPortMapping
in interfaceAEProxyAddressMapper
-
registerPortMapping
public AEProxyAddressMapper.PortMapping registerPortMapping(int proxy_port, int local_port, java.lang.String local_ip, int remote_port, java.lang.String remote_ip, java.util.Map<java.lang.String,java.lang.Object> properties)
- Specified by:
registerPortMapping
in interfaceAEProxyAddressMapper
-
applyPortMapping
public AEProxyAddressMapper.AppliedPortMapping applyPortMapping(java.net.InetAddress address, int port)
- Specified by:
applyPortMapping
in interfaceAEProxyAddressMapper
-
-