-
Notifications
You must be signed in to change notification settings - Fork 27
Adding router proxy support #747
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?
Adding router proxy support #747
Conversation
// request is required. | ||
func GetControllerWellKnownCaPool(controllerAddr string) (*x509.CertPool, error) { | ||
return rest_util.GetControllerWellKnownCaPool(controllerAddr) | ||
} |
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.
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?
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.
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
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.
See comment
…upport # Conflicts: # ziti/config.go
Add Router Proxy Configuration from Environment Variables
This PR adds two new functions to improve router connectivity options:
Changes
Added
routerProxyFromEnvironment
functionHTTPS_PROXY
orHTTP_PROXY
environment variables to determine proxy settingsNewConfigFromFile()
Added
parseTLS(raw string)
helper functiontls:router.example.com:443
tls:
scheme URLs to proper HTTPS URLs for processingUse Cases
tls:
URL formatThese changes maintain backward compatibility while adding flexibility for different network configurations.