AI-generated Key Takeaways
-
The Java client library enables connections to the API through proxy settings, utilizing standard Java proxy configurations.
-
For HTTPS proxy connections, use
-Dhttps.proxyHost=HOST -Dhttps.proxyPort=PORT
, while HTTP proxy (less secure) uses-Dhttp.proxyHost=HOST -Dhttp.proxyPort=PORT
. -
Both HTTP and HTTPS proxy settings can be dynamically configured at runtime using
System.setProperty()
. -
Any changes to the proxy settings require recreating service clients via
GoogleAdsClient.getVersionX().createYServiceClient()
to apply the new configuration.
The Java client library supports proxy settings for connecting to the API.
Settings
The library supports using the standard proxy settings for Java.
For HTTPS proxy set the proxy configuration as:
-Dhttps.proxyHost=HOST -Dhttps.proxyPort=PORT
For HTTP proxy (not recommended unless you're providing your own HTTP endpoint), set the proxy configuration as:
-Dhttp.proxyHost=HOST -Dhttp.proxyPort=PORT
It is possible to configure both HTTP and HTTPS proxy at runtime.
System.setProperty("https.proxyHost", HOST);
System.setProperty("https.proxyPort", PORT);
If you change this setting then you must recreate any service clients provided
by GoogleAdsClient.getVersionX().createYServiceClient()
.