إعداد الخادم الوكيل
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تتيح مكتبة برامج Java إعدادات الخادم الوكيل للاتصال بواجهة برمجة التطبيقات.
الإعدادات
تدعم المكتبة استخدام
إعدادات الخادم الوكيل القياسية لـ Java.
بالنسبة إلى الخادم الوكيل HTTPS، يمكنك ضبط إعدادات الخادم الوكيل على:
-Dhttps.proxyHost=HOST -Dhttps.proxyPort=PORT
بالنسبة إلى خادم وكيل HTTP (لا يُنصح به ما لم توفّر نقطة نهاية HTTP خاصة بك)،
ضبط إعدادات الخادم الوكيل على:
-Dhttp.proxyHost=HOST -Dhttp.proxyPort=PORT
يمكن ضبط كل من الخادم الوكيل HTTP وHTTPS في وقت التشغيل.
System.setProperty("https.proxyHost", HOST);
System.setProperty("https.proxyPort", PORT);
إذا غيّرت هذا الإعداد، يجب عليك إعادة إنشاء أي برامج خدمة تم توفيرها
من قناة "GoogleAdsClient.getVersionX().createYServiceClient()
"
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-21 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-21 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThe Java client library enables connections to the API through proxy settings, utilizing standard Java proxy configurations.\u003c/p\u003e\n"],["\u003cp\u003eFor HTTPS proxy connections, use \u003ccode\u003e-Dhttps.proxyHost=HOST -Dhttps.proxyPort=PORT\u003c/code\u003e, while HTTP proxy (less secure) uses \u003ccode\u003e-Dhttp.proxyHost=HOST -Dhttp.proxyPort=PORT\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eBoth HTTP and HTTPS proxy settings can be dynamically configured at runtime using \u003ccode\u003eSystem.setProperty()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAny changes to the proxy settings require recreating service clients via \u003ccode\u003eGoogleAdsClient.getVersionX().createYServiceClient()\u003c/code\u003e to apply the new configuration.\u003c/p\u003e\n"]]],[],null,["# Proxy configuration\n\nThe Java client library supports proxy settings for connecting to the API.\n\nSettings\n--------\n\nThe library supports using the\n[standard proxy settings for Java](//docs.oracle.com/en/java/javase/12/docs/api/java.base/java/net/doc-files/net-properties.html).\n\nFor HTTPS proxy set the proxy configuration as: \n\n -Dhttps.proxyHost=HOST -Dhttps.proxyPort=PORT\n\nFor HTTP proxy (not recommended unless you're providing your own HTTP endpoint),\nset the proxy configuration as: \n\n -Dhttp.proxyHost=HOST -Dhttp.proxyPort=PORT\n\nIt is possible to configure both HTTP and HTTPS proxy at runtime. \n\n System.setProperty(\"https.proxyHost\", HOST);\n System.setProperty(\"https.proxyPort\", PORT);\n\nIf you change this setting then you must recreate any service clients provided\nby `GoogleAdsClient.getVersionX().createYServiceClient()`."]]