-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Labels
Milestone
Description
If desired to use a custom Dialer
as the inner, direct Dialer
in the proxy
package, for instance to use a net.Dialer
with a configured timeout, it is not possible to use the convenience wrappers such as DialerFromEnvironment
with a customized inner Dialer
.
Perhaps https://github.com/golang/net/blob/master/proxy/direct.go#L14 could be changed so that Direct
is an instance of type Dialer interface
, not a type direct struct
, and consequently users could set it however they like? Or, the dialers in PerHost
(https://github.com/golang/net/blob/master/proxy/per_host.go#L15) could be exposed for modification after return from a function such as ProxyFromEnvironment
.