Adds ability for the user to set whether or not proxyless should be used #1509
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new
useProxyless
function to enable or disable proxyless dialing dynamically across the application. The changes primarily involve replacing the previousProxyAll
functionality withUseProxyless
and updating the relevant code to reflect this new approach. Below are the key changes grouped by theme:Client Updates:
useProxyless
field to theClient
struct inclient/client.go
, allowing the client to determine whether to use proxyless dialing dynamically.NewClient
constructor to accept theuseProxyless
function and initialize it in theClient
struct. [1] [2]initDialers
method to pass theuseProxyless
function to the dialer options instead of the previousproxyAll
function.Dialer Updates:
ProxyAll
field in theOptions
struct withUseProxyless
, and updated the corresponding comments to reflect the new functionality indialer/dialer.go
.Clone
method of theOptions
struct to include the newUseProxyless
field.newParallelPreferProxyless
function indialer/parallel_dialer.go
to check bothcommon.SupportsProxyless()
and theUseProxyless
function before falling back to the default dialer.Flashlight Updates:
useProxyless
field to theFlashlight
struct inflashlight.go
to propagate the proxyless functionality.New
function inflashlight.go
to pass theuseProxyless
function to the client during initialization.Option Enhancements:
WithUseProxyless
option inoption.go
to allow external configuration of theuseProxyless
function for theFlashlight
client.