Adding router proxy support - #747
Open
cx-serhii-stanislavskyi wants to merge 7 commits into
Open
cx-serhii-stanislavskyi wants to merge 7 commits into
cx-serhii-stanislavskyi wants to merge 7 commits into
Conversation
plorenz
reviewed
Jul 17, 2025
| @@ -127,3 +130,44 @@ func NewConfigFromFile(confFile string) (*Config, error) { | |||
| func GetControllerWellKnownCaPool(controllerAddr string) (*x509.CertPool, error) { | |||
| return rest_util.GetControllerWellKnownCaPool(controllerAddr) | |||
| } | |||
Member
There was a problem hiding this comment.
Apologies for the late review.
First, if you haven't yet, please take a look at https://github.com/openziti/sdk-golang/blob/main/CONTRIBUTING.md as a CLA is required for contributors.
Second, overall looks good. I'd like this function to be available to SDK users, but not have it set on RouterProxy by default. To that end, could you remove the set and make the method public?
Author
There was a problem hiding this comment.
My apologies for the late response.
- We're still clarifying question with CLA with legal team.
- I made this method public, but I'm not sure how to implement it in zrok.
We're expecting the routerProxy configuration here:
https://github.com/openziti/sdk-golang/blob/main/ziti/ziti.go#L1461
if context.routerProxy != nil {
if proxyConfig := context.routerProxy(ingressUrl); proxyConfig != nil {
dialerConfig.TransportConfig[transport.KeyCachedProxyConfiguration] = proxyConfig
}
}
That's inside connectEdgeRouter method.
It's for passing proxy configuration to edge router when we're creating public share
…upport # Conflicts: # ziti/config.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add Router Proxy Configuration from Environment Variables
This PR adds two new functions to improve router connectivity options:
Changes
Added
routerProxyFromEnvironmentfunctionHTTPS_PROXYorHTTP_PROXYenvironment variables to determine proxy settingsNewConfigFromFile()Added
parseTLS(raw string)helper functiontls:router.example.com:443tls:scheme URLs to proper HTTPS URLs for processingUse Cases
tls:URL formatThese changes maintain backward compatibility while adding flexibility for different network configurations.