Changeset b2dcf20


Ignore:
Timestamp:
Nov 21, 2017 1:33:22 AM (3 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
ad056bc
Parents:
8c7898de
Message:

Transport: Add checks for more Tor ports as invalid

Location:
router/java/src/net/i2p/router/transport
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/transport/TransportUtil.java

    r8c7898de rb2dcf20  
    242242               (!(port >= 7650 && port <= 7664)) && // standard I2P range
    243243               port != 8998 &&  // mtn
     244               port != 9001 &&  // Tor
     245               port != 9030 &&  // Tor
     246               port != 9050 &&  // Tor
    244247               port != 9100 &&  // network printer
     248               port != 9150 &&  // Tor browser
    245249               // do not block anything in 9111 - 30777, this is the standard random selection range
    246250               port != 31000 && // Wrapper
  • router/java/src/net/i2p/router/transport/udp/UDPEndpoint.java

    r8c7898de rb2dcf20  
    101101    public static final String PROP_MIN_PORT = "i2np.udp.minPort";
    102102    public static final String PROP_MAX_PORT = "i2np.udp.maxPort";
    103     private static final int MIN_RANDOM_PORT = 9111;
     103    /** Was 9111, increase to skip Tor browser at 9050 */
     104    private static final int MIN_RANDOM_PORT = 9151;
    104105    private static final int MAX_RANDOM_PORT = 30777;
    105106    private static final int MAX_PORT_RETRIES = 20;
     
    117118            _log.error("Specified UDP port " + port + " is not valid, selecting a new port");
    118119            // See isValidPort() for list
    119             _log.error("Invalid ports are: 0-1023, 1900, 2049, 2827, 3659, 4045, 4444, 4445, 6000, 6665-6669, 6697, 7650-7664, 8998, 9100, 31000, 32000, 65536+");
     120            _log.error("Invalid ports are: 0-1023, 1900, 2049, 2827, 3659, 4045, 4444, 4445, 6000, 6665-6669, 6697, 7650-7664, 8998, 9001, 9030, 9050, 9100, 9150, 31000, 32000, 65536+");
    120121            port = -1;
    121122        }
Note: See TracChangeset for help on using the changeset viewer.