-
Notifications
You must be signed in to change notification settings - Fork 262
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
Proxy settings overrides curl option globally with http transport #665
Comments
Hi @mrpavlikov - Thank you for reporting. Workaround: You should be able to override existing environment variables that set the proxy to use by setting the Potential fix: The library could set the proxy from the gRPC channel options instead of setting environment variables. See |
So far I'm doing |
Is it "won't fix" or something? Like affecting global curl setting is fine? |
Sorry, it was a mistake. Let's keep this open for now. |
This problem still exists. The current method of setting environment variables in the source code has no effect, and the value of the proxy parameter is not transparently transmitted to the underlying guzzle and curl. |
For grpc transport it's need to use grpc.http_proxy='proxy_address' $options['transportConfig']['grpc']['stubOpts']['grpc.http_proxy'] = $this->getProxy(); But since the GoogleAdsClient class is final, it is not possible to override the getGoogleAdsClientOptions method in the proper way And withProxy doesn't work for rest transport at all |
yes |
Since version 14, GoogleAdsClient is no longer a final class and therefore it is easy to extend from it and override the method
|
Your client library and Google Ads API versions:
v10.1.0
V8
Your environment:
Linux 18c018ba8d92 5.11.0-37-generic #41-Ubuntu SMP Mon Sep 20 16:39:20 UTC 2021 x86_64
Description of the bug:
Using proxy settings in .ini file or having it set manually while building client with
(new GoogleAdsClientBuilder())->withProxy('protocol://user:pass@host:port')
sets environment variablehttp_proxy
and after that everything that uses curl automatically starts using this proxy too, which is not desired behavior and kinda unexpected side effect.Steps to reproduce:
Expected behavior:
Curl calls must stay unaffected.
The text was updated successfully, but these errors were encountered: