Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Both OpenDNS and Google DNS has problems looking up the public IP on IPv6 connections. Lookup up using HTTP (TCP) seems more stable. The lookup time is about 110ms longer with this mechanism. checkip.amazonaws.com for now only resolvs to IPv4 addresses. If that would change we would need to lookup the A address of the domain and connect to that IP manually. It's like 2 more lines of code only, if connect_timeout isn't needed, then it's a bit more involved.
- Loading branch information