Changeset 5a1053e4


Ignore:
Timestamp:
Feb 4, 2013 11:21:26 AM (8 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
eaa8666
Parents:
0052ebf
Message:

Allow any domain name to be mapped to an IP

This enables .onion domain names to be accessed by clients that are being
routed through the SOCKS tunnel by e.g. proxychains (assuming that the SOCKS
tunnel has been configured with a SOCKS outproxy that exits into Tor). If the
.onion is not mapped to an IP address, the client would attempt a DNS lookup
which would of course fail to find the .onion.

Clearnet domain names can also be mapped to IPs, but this is irrelevant as DNS
lookups work through SOCKS (via the configured outproxy).

Location:
apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/SOCKS4aServer.java

    r0052ebf r5a1053e4  
    119119        }
    120120
    121         // Check if the requested IP should be mapped to a .i2p URL
     121        // Check if the requested IP should be mapped to a URL
    122122        String mappedUrl = getMappedUrlForIP(connHostName);
    123         if (mappedUrl != null && mappedUrl.toLowerCase(Locale.US).endsWith(".i2p")) {
     123        if (mappedUrl != null) {
    124124            _log.debug("IPV4 address " + connHostName + " was mapped to URL " + mappedUrl);
    125125            connHostName = mappedUrl;
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/SOCKS5Server.java

    r0052ebf r5a1053e4  
    207207                }
    208208            }
    209             // Check if the requested IP should be mapped to a .i2p URL
     209            // Check if the requested IP should be mapped to a URL
    210210            String mappedUrl = getMappedUrlForIP(connHostName);
    211             if (mappedUrl != null && mappedUrl.toLowerCase(Locale.US).endsWith(".i2p")) {
     211            if (mappedUrl != null) {
    212212                _log.debug("IPV4 address " + connHostName + " was mapped to URL " + mappedUrl);
    213213                addressType = AddressType.DOMAINNAME;
Note: See TracChangeset for help on using the changeset viewer.