pufferffish / wireproxy

Wireguard client that exposes itself as a socks5 proxy
ISC License
4.55k stars 272 forks source link

Prefer ipv6 over ipv4 in socks proxy #75

Closed FireMasterK closed 1 year ago

FireMasterK commented 1 year ago

With a configuration having:

[Socks5]
BindAddress = 0.0.0.0:1080

When I run curl --proxy socks5://127.0.0.1:1080 icanhazip.com I get an ipv4 address, although that hostname is dual stack. I would expect to see an ipv6 address here. When I run curl --proxy socks5://127.0.0.1:1080 ipv6.icanhazip.com I see an ipv6 address.

kubrickfr commented 1 year ago

socks5:// protocol in curl resolves hostnames locally, therefore it's a problem with your local setup (for example, you don't have IPv6 on your machine and the local resolver ignores IPv6 answers from the DNS.

Try using hte socks5h:// protocol instead. (see man curl)

FireMasterK commented 1 year ago

That seems to be it, thanks!