mehrdadrad/mylg

scan does not support ipv6

jfesler opened this issue · 5 comments

Jasons-MacBook:~ jfesler$ mylg dig ipv6.test-ipv6.com 
Trying to query server: 192.168.1.1  your local dns server
;; opcode: QUERY, status: NOERROR, id: 17040
;; flags: qr rd ra;
ipv6.test-ipv6.com. 70  IN  AAAA    2001:470:1:18::125
ipv6.test-ipv6.com. 70  IN  AAAA    2001:470:1:18::119
;; Query time: 2 ms

;; CHAOS CLASS BIND
Jasons-MacBook:~ jfesler$ mylg scan ipv6.test-ipv6.com 
no suitable address found

While the dig results may vary depending on where you query from; they will always return just AAAA records for ipv6.test-ipv6.com.

Thank you for reporting this issue. It should be fixed

Whoops, not yet. :-)

2016/09/19 20:48:58 dial tcp: too many colons in address 2001:470:1:18::125:33

When connecting to an IPv6 address, the dial string should instead look like [2001:470:1:18::125]:33

If this function will only ever get IP addresses, you can search for ":" as a hint as whether to [bracket] or not. Alas, with IPv4, you can't bracket.

I love net.JoinHostPort, it will fix this issue :)

I just committed pls let me know when you get a chance to try it.

Good to go now!