i2ptunnel: SOCKS 5 tunnel improvements and torsocks support

- Add support for Tor RESOLVE extension by caching and returning fake IP
- Handle user/pw when not required to support Tor stream isolation
  (not really isolating, just handling the authentication)
- Fix user/pw authentication
- Handle outproxy config changes after start
- Support CONNECT outproxies
- Add config UI for outproxy type
- Enable IPv6 (untested)
- Support outproxy config with :port (untested)
- Various cleanups

Further testing required
This commit is contained in:
zzz
2022-11-23 12:03:08 -05:00
parent 50ee30b133
commit 495d91193c
9 changed files with 320 additions and 60 deletions

View File

@@ -34,6 +34,13 @@ public class SOCKS5Constants {
public static final int CONNECT = 0x01;
public static final int BIND = 0x02;
public static final int UDP_ASSOCIATE = 0x03;
// https://github.com/torproject/torspec/blob/main/socks-extensions.txt
/** @since 0.9.57 */
public static final int TOR_RESOLVE = 0xf0;
/** @since 0.9.57 */
public static final int TOR_RESOLVE_PTR = 0xf1;
/** @since 0.9.57 */
public static final int TOR_CONNECT_DIR = 0xf2;
}
public static class Reply {