Proxykonfiguration

Die Java-Clientbibliothek unterstützt Proxyeinstellungen zum Herstellen einer Verbindung zur API.

Einstellungen

Die Bibliothek unterstützt die Verwendung der Standard-Proxy-Einstellungen für Java.

Legen Sie für den HTTPS-Proxy die Proxy-Konfiguration so fest:

-Dhttps.proxyHost=HOST -Dhttps.proxyPort=PORT

Legen Sie für den HTTP-Proxy die Proxy-Konfiguration so fest:

-Dhttp.proxyHost=HOST -Dhttp.proxyPort=PORT

Es ist möglich, zur Laufzeit sowohl den HTTP- als auch den HTTPS-Proxy zu konfigurieren.

System.setProperty("https.proxyHost", HOST);
System.setProperty("https.proxyPort", PORT);

Wenn Sie diese Einstellung ändern, müssen Sie alle von GoogleAdsClient.getVersionX().createYServiceClient() bereitgestellten Dienstclients neu erstellen.