-
Notifications
You must be signed in to change notification settings - Fork 2
Adds ability for the user to set whether or not proxyless should be used #1509
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -23,8 +23,7 @@ func newParallelPreferProxyless(proxyless proxyless, d Dialer, opts *Options) Di | |||||||||
| } | ||||||||||
|
|
||||||||||
| func (d *parallelDialer) DialContext(ctx context.Context, network, addr string) (net.Conn, error) { | ||||||||||
| if !common.SupportsProxyless() { | ||||||||||
| log.Debugf("Proxyless transport not supported, falling back to default dialer for %s", addr) | ||||||||||
| if !common.SupportsProxyless() || !d.opts.UseProxyless() { | ||||||||||
| // If the proxyless transport is not supported, we fall back to the default dialer. | ||||||||||
|
Comment on lines
+26
to
27
|
||||||||||
| if !common.SupportsProxyless() || !d.opts.UseProxyless() { | |
| // If the proxyless transport is not supported, we fall back to the default dialer. | |
| if !common.SupportsProxyless() || d.opts.UseProxyless() == false { | |
| // If proxyless transport is not supported or not enabled, fall back to the default dialer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
useProxylessfield is added to the Client struct but there's no nil check before using it ininitDialers. IfuseProxylessis nil when passed toUseProxyless, this could cause a panic when the function is called.