golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.01k stars 17.54k forks source link

net: don't attempt DNS on .onion addresses #13705

Closed bradfitz closed 8 years ago

bradfitz commented 8 years ago

(Now that .onion addresses are an official TLD)

RFC7686 says:

Applications (including proxies) that implement the Tor protocol MUST recognize .onion names as special by either accessing them directly or using a proxy (e.g., SOCKS [RFC1928]) to do so. Applications that do not implement the Tor protocol SHOULD generate an error upon the use of .onion and SHOULD NOT perform a DNS lookup.

See https://lists.w3.org/Archives/Public/ietf-http-wg/2015OctDec/0222.html and

https://bugzilla.mozilla.org/show_bug.cgi?id=1228457 https://code.google.com/p/chromium/issues/detail?id=562265 https://github.com/bagder/curl/issues/543

mikioh commented 8 years ago

And ".local." too, as per RFC 6762.

The discussion goes on at IAB/IESG like https://tools.ietf.org/html/draft-adpkja-dnsop-special-names-problem and https://www.icann.org/en/system/files/files/name-collision-mitigation-final-28oct15-en.pdf. Hope the consensus will be landed safely.

gopherbot commented 8 years ago

CL https://golang.org/cl/21328 mentions this issue.