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
useProxylessfunction to enable or disable proxyless dialing dynamically across the application. The changes primarily involve replacing the previousProxyAllfunctionality withUseProxylessand updating the relevant code to reflect this new approach. Below are the key changes grouped by theme:Client Updates:
useProxylessfield to theClientstruct inclient/client.go, allowing the client to determine whether to use proxyless dialing dynamically.NewClientconstructor to accept theuseProxylessfunction and initialize it in theClientstruct. [1] [2]initDialersmethod to pass theuseProxylessfunction to the dialer options instead of the previousproxyAllfunction.Dialer Updates:
ProxyAllfield in theOptionsstruct withUseProxyless, and updated the corresponding comments to reflect the new functionality indialer/dialer.go.Clonemethod of theOptionsstruct to include the newUseProxylessfield.newParallelPreferProxylessfunction indialer/parallel_dialer.goto check bothcommon.SupportsProxyless()and theUseProxylessfunction before falling back to the default dialer.Flashlight Updates:
useProxylessfield to theFlashlightstruct inflashlight.goto propagate the proxyless functionality.Newfunction inflashlight.goto pass theuseProxylessfunction to the client during initialization.Option Enhancements:
WithUseProxylessoption inoption.goto allow external configuration of theuseProxylessfunction for theFlashlightclient.