Fixed SOCKS mapping terminology, bumped history

This commit is contained in:
str4d
2013-02-04 11:29:30 +00:00
parent 5a1053e4fb
commit eaa86664bd
4 changed files with 21 additions and 15 deletions

View File

@@ -118,11 +118,11 @@ public class SOCKS4aServer extends SOCKSServer {
}
}
// Check if the requested IP should be mapped to a URL
String mappedUrl = getMappedUrlForIP(connHostName);
if (mappedUrl != null) {
_log.debug("IPV4 address " + connHostName + " was mapped to URL " + mappedUrl);
connHostName = mappedUrl;
// Check if the requested IP should be mapped to a domain name
String mappedDomainName = getMappedDomainNameForIP(connHostName);
if (mappedDomainName != null) {
_log.debug("IPV4 address " + connHostName + " was mapped to domain name " + mappedDomainName);
connHostName = mappedDomainName;
}
// discard user name

View File

@@ -206,12 +206,12 @@ public class SOCKS5Server extends SOCKSServer {
connHostName += ".";
}
}
// Check if the requested IP should be mapped to a URL
String mappedUrl = getMappedUrlForIP(connHostName);
if (mappedUrl != null) {
_log.debug("IPV4 address " + connHostName + " was mapped to URL " + mappedUrl);
// Check if the requested IP should be mapped to a domain name
String mappedDomainName = getMappedDomainNameForIP(connHostName);
if (mappedDomainName != null) {
_log.debug("IPV4 address " + connHostName + " was mapped to domain name " + mappedDomainName);
addressType = AddressType.DOMAINNAME;
connHostName = mappedUrl;
connHostName = mappedDomainName;
} else if (command != Command.UDP_ASSOCIATE)
_log.warn("IPV4 address type in request: " + connHostName + ". Is your client secure?");
break;

View File

@@ -30,14 +30,14 @@ public abstract class SOCKSServer {
protected Properties props;
/**
* IP to I2P URL mapping support. This matches the given IP string against
* a user-set list of mappings. This enables applications which do not
* properly support the SOCKS5 DOMAINNAME feature to be used with I2P.
* IP to domain name mapping support. This matches the given IP string
* against a user-set list of mappings. This enables applications which do
* not properly support the SOCKS5 DOMAINNAME feature to be used with I2P.
* @param ip The IP address to check.
* @return The I2P URL if a mapping is found, or null otherwise.
* @return The domain name if a mapping is found, or null otherwise.
* @since 0.9.5
*/
protected String getMappedUrlForIP(String ip) {
protected String getMappedDomainNameForIP(String ip) {
if (props.containsKey(PROP_MAPPING_PREFIX + ip))
return props.getProperty(PROP_MAPPING_PREFIX + ip);
return null;

View File

@@ -1,3 +1,9 @@
2013-02-04 str4d
* i2ptunnel:
- IP -> domain name mapping in SOCKS client tunnel:
- Change SOCKS5 addressType on a successful mapping
- Allow any domain name to be mapped, not just .i2p
2013-01-31 kytv
* Add Norwegian Bokmål language to the router console
* Add Bokmål translations from Transifex