internal/socks: add the ability to control socks5 resolution#163
internal/socks: add the ability to control socks5 resolution#163sjpotter wants to merge 1 commit intogolang:masterfrom
Conversation
not all servers support remote resolution, and require one to send only ip addresses this add a new SOCKS5 dialer creation function that lets one pass in a custom *net.Resolver. if a resolver is set on the dialer, it will use it it convert non ip addresses into ip addresses. For instance, can simply be used with net.DefaultResolver to do local resolution
|
This PR (HEAD: ed93932) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/net/+/465395 to see it. Tip: You can toggle comments from me using the |
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/465395. |
|
In working more on this, I'd want to argue that there should be a Resolver interface type, so custom resolution solutions can be passed in to any place that wants a resolver. Currently, there's only a concrete Resolver type, which means any place (such as this PR) that takes a resolver cannot work as one might want. |
not all servers support remote resolution, and require one to send only ip addresses
this add a new SOCKS5 dialer creation function that lets one pass in a custom *net.Resolver.
if a resolver is set on the dialer, it will use it it convert non ip addresses into ip addresses. For instance, can simply be used with net.DefaultResolver to do local resolution