On Tue, 17 Apr 2018 13:55:43 +0100 Kevin Steen wrote:
>
> Tor now returns IPv6 addresses when hostnames are resolved, but
> torsocks cannot handle this case.
>
> To reproduce:
> torsocks -d nc ipv6.test-ipv6.com 80
>
Without torsocks nc(1) can't perform this request too.
$ nc ipv6.test-ipv6.com 80
ipv6.test-ipv6.com: forward host lookup failed: Unknown host
$ host ipv6.test-ipv6.com
ipv6.test-ipv6.com has IPv6 address 2001:470:1:18::115
This is because nc appears to be using gethostbyname()
1609896026 DEBUG torsocks[27929]: [gethostbyname] Requesting ipv6.test-ipv6.com
hostname (in tsocks_gethostbyname() at gethostbyname.c:68)
which can't handle records.
There is getaddrinfo(3) which is implemented in torsocks. Unfortunately
AF_INET6 appears not to be supported yet. If you look at
tsocks_tor_resolve() in src/lib/torsocks.c, you will find a stub [1].
[1]
https://github.com/dgoulet/torsocks/blob/d4b0a84bdf2a1895c8ec3091dc2767fd9f8c2d66/src/lib/torsocks.c#L527
--
Kind regards,
Łukasz Stelmach
signature.asc
Description: PGP signature