eycorsican / go-tun2socks

A tun2socks implementation written in Go.
MIT License
1.31k stars 434 forks source link

Auth support for SOCKS5 #153

Closed huapox closed 3 years ago

huapox commented 3 years ago

Current using: https://github.com/cooolinx/docker-socks5, which UDP is supported. (tested with SSTap)

Can go-tun2socks support socks5's auth? (with user, pass)


Just viewed the source code. not find any usage of proxyPassword:

$ ./tun2socks.exe -h
Usage of C:\Users\Administrator\Downloads\p2p_socks5\02\tun2socks.exe:
  -applog
        Enable app logging (V2Ray and SOCKS5 handler)
  -delayICMP int
        Delay ICMP packets for a short period of time, in milliseconds (default 10)
  -disableDNSCache
        Disable DNS cache (SOCKS5 and Shadowsocks handler)
  -dnsServer string
        DNS resolvers for TUN interface (only take effect on Windows) (default "114.114.114.114,223.5.5.5")
  -gateway string
        The gateway adrress of your default network, set this to enable dynamic routing, and root/admin privileges may also required for using dynamic routing (V2Ray only)
  -proxyCipher string
        Cipher used for Shadowsocks proxy, available ciphers: AEAD_AES_128_GCM AEAD_AES_192_GCM AEAD_AES_256_GCM AEAD_CHACHA20_POLY1305 AES-128-CFB AES-128-CTR AES-192-CFB AES-192-CTR AES-256-CFB AES-256-CTR CHACHA20-IETF XCHACHA20 (default "AEAD_CHACHA20_POLY1305")
  -proxyPassword string
        Password used for Shadowsocks proxy
  -proxyServer string
        Proxy server address (host:port) for socks and Shadowsocks proxies (default "1.2.3.4:1087")
  -proxyType string
        Proxy handler type: socks, shadowsocks, v2ray (default "socks")
  -sniffingType string
        Enable domain sniffing for specific kind of traffic in v2ray (default "http,tls")
  -tunAddr string
        TUN interface address (default "240.0.0.2")
  -tunGw string
        TUN interface gateway (default "240.0.0.1")
  -tunMask string
        TUN interface netmask, as for IPv6, it's the prefixlen (default "255.255.255.0")
  -tunName string
        TUN interface name (default "tun1")
  -udpTimeout duration
        Set timeout for UDP proxy connections in socks and Shadowsocks (default 1m0s)
  -vconfig string
        Config file for v2ray, in JSON format, and note that routing in v2ray could not violate routes in the routing table (default "config.json")
huapox commented 3 years ago

ref: #57

https://github.com/cooolinx/docker-socks5/blob/master/socks5.go

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days