macronut / phantomsocks

A cross-platform proxy client/server for Linux/Windows/macOS
GNU Lesser General Public License v3.0
453 stars 18 forks source link

it seems that ipv6 is not supported, can you support? #55

Closed My-Responsitories closed 1 year ago

My-Responsitories commented 1 year ago
test.json ```json { "profiles": ["test.conf"], "services": [ { "name": "Socks", "protocol": "socks", "address": "0.0.0.0:1080" } ], "interfaces": [ { "name": "test", "dns": "tls://9.9.9.9:853", "hint": "w-md5" } ] } ```
test.conf ```cfg [test] test.test=::1 ```
  1. run:
phantomsocks.exe -c test.json -log 3
  1. then run:
    curl -x socks5h://127.0.0.1:1080 https://test.test -v -k
phantomsocks log ```log map[test:{ tls://9.9.9.9:853 4096 0 0 0 0 }] [test] &{ tls://9.9.9.9:853 4096 0 0 0 0 } test.conf Socks: 0.0.0.0:1080 Socks: test.test 443 &{ tls://9.9.9.9:853 4096 0 0 0 0 } nslookup test.test 1 [] test.test no such host interrupt ```
  1. change test.test=::1 to test.test=127.0.0.1 in test.conf, and it run successfully
    success log
map[test:{ tls://9.9.9.9:853 4096 0 0 0 0 }]
[test] &{ tls://9.9.9.9:853 4096 0 0 0 0 }
test.conf
Socks: 0.0.0.0:1080
Socks: test.test 443 &{ tls://9.9.9.9:853 4096 0 0 0 0 }
cached: test.test 1 [127.0.0.1]
interrupt

macronut commented 1 year ago

It will not use IPv6 when used as a proxy unless you set the interface to use IPv6, e.g. "hint": "ipv6,https" means it will use IPv6 and https.