Closed mr-karan closed 2 years ago
Instead of doing a strings.Split on RemoteAddr which didn't work for IPv6, this commit addresses that by using net.SplitHostPort. It gets the underlying IP representation from the host string and returns IPv4/IPv6 address.
strings.Split
RemoteAddr
net.SplitHostPort
Fixes https://github.com/knadh/dns.toys/issues/27
Instead of doing a
strings.Split
onRemoteAddr
which didn't work for IPv6, this commit addresses that by usingnet.SplitHostPort
. It gets the underlying IP representation from the host string and returns IPv4/IPv6 address.Fixes https://github.com/knadh/dns.toys/issues/27