-
Notifications
You must be signed in to change notification settings - Fork 18k
x/net/proxy: doesn't allow custom Dialers #13455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Milestone
Comments
@nathanleclaire I think golang/net#38 effectively addresses this issue by implementing checks for a |
Change https://golang.org/cl/168921 mentions this issue: |
dweomer
added a commit
to dweomer/golang-net
that referenced
this issue
May 1, 2019
The existing API does not allow client code to take advantage of Dialer implementations that implement DialContext receivers. This a familiar API, see net.Dialer. Fixes golang/go#27874 Fixes golang/go#19354 Fixes golang/go#17759 Fixes golang/go#13455
dweomer
added a commit
to dweomer/golang-net
that referenced
this issue
May 2, 2019
The existing API does not allow client code to take advantage of Dialer implementations that implement DialContext receivers. This a familiar API, see net.Dialer. Fixes golang/go#27874 Fixes golang/go#19354 Fixes golang/go#17759 Fixes golang/go#13455
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If desired to use a custom
Dialer
as the inner, directDialer
in theproxy
package, for instance to use anet.Dialer
with a configured timeout, it is not possible to use the convenience wrappers such asDialerFromEnvironment
with a customized innerDialer
.Perhaps https://github.com/golang/net/blob/master/proxy/direct.go#L14 could be changed so that
Direct
is an instance oftype Dialer interface
, not atype direct struct
, and consequently users could set it however they like? Or, the dialers inPerHost
(https://github.com/golang/net/blob/master/proxy/per_host.go#L15) could be exposed for modification after return from a function such asProxyFromEnvironment
.The text was updated successfully, but these errors were encountered: