-
Notifications
You must be signed in to change notification settings - Fork 3
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
HTTP 400 error code for HTTP proxy workaround with LDClientConfigBuilder_ServiceEndpoints_RelayProxyBaseURL #459
Comments
Hi @TouHouPolice , the client determines whether to use TLS or not based on the scheme of the URL. For example, if you give it I see you are using port Can you verify if the proxy is an http or https proxy? |
Hi @cwaldren-ld , I believe the proxy I'm testing against is http proxy.
Additionally, I've actually tried your deprecated SDK's |
Hi @TouHouPolice , Thanks for testing that out. The reason I'm asking is because it seems confusing for the proxy to serve HTTP traffic on port 443. That is usually reserved for HTTPS traffic. It's unclear to me if this proxy is transparent or explicit (needs Can you please try the following:
For the Paste the output here, redact any sensitive information. If you aren't comfortable doing that, you can contact LaunchDarkly support (link to this Github issue) and I can review it internally. |
Hi @cwaldren-ld , though the proxy server is not setup by myself, our document did label it as transparent.
curl to http://xx.xx.xx.xxx:80:
curl to http://xx.xx.xx.xxx:443:
curl to https://xx.xx.xx.xxx:443:
|
Ok great, thanks for testing. It looks like it is Squid proxy. I believe I misunderstood your issue. Unfortunately I don't believe the workaround I provided in the other link will work. If the proxy is truly transparent and the target machine (running the LaunchDarkly SDK) has a Squid SSL root certificate installed on it, then it should be able to intercept HTTPS requests from the SDK without modifying any SDK configuration. In this case, the SDK will think that it is communicating with LaunchDarkly but Squid will act as a man-in-the-middle. It sounds like this might not be the case for your setup, especially since you are given a proxy IP address to use, but please correct me if I'm wrong. Assuming this is true, I will file a feature request for properly supporting HTTPS proxy. It would help if you could email me at [email protected] from your company email address so I could associate it with the request. |
@cwaldren-ld Can I just confirm with you about the setup you were talking about?
Can you clarify the scenarios where this walkaround could be used? Thanks! |
Yes, you have the idea. It definitely will not work for the public as a general solution, you are correct. It would only work if you can map the specific request paths to the correct LD endpoints, which means this would only work if the SDK is running in a network that you control. This is why it's called What I'm talking about with the transparent proxy, is a scenario where the proxy software is totally invisible to the application running on the host (because the proxy is running at the network layer.) Think a corporate or school network, or at the airport. The application makes a request to For your use-case of operating in networks you don't control, where people need to configure explicit proxy, the SDK needs to add support for this feature (similar to how you can set HTTP_PROXY or HTTPS_PROXY when using In this case, the SDK might be configured to use a proxy, but other applications running on the host might not be. |
Is this a support request?
Yes
Describe the bug
I'm trying to use
LDClientConfigBuilder_ServiceEndpoints_RelayProxyBaseURL
walk-around mentioned in #394 to set HTTP proxy.To reproduce
Expected behavior
SDK connects to LD endpoints through proxy.
Logs
Logs in streaming mode:
Logs in polling mode:
SDK version
3.5.0
Language version, developer tools
C++17
OS/platform
Apple M3 Pro, 14.3
Additional context
The proxy servers are working without issue for other testings. I've also verified them using
curl -x http://my-proxy:port https://www.google.com
The text was updated successfully, but these errors were encountered: