代理

如果您需要通过代理连接到 Google Ads API,可以在 googleads.properties 文件的 Network Connection 部分中设置 proxy 属性来实现此目的:

### Network Connection ###

# Optional proxy server URL to be used for internet connectivity.
# If your proxy connection requires authentication, make sure to include it in
# the URL, for example: http://user:password@proxy_hostname:8080
proxy=INSERT_PROXY_HERE

例如,您可以指定 http://user:pass@localhost:8082 作为代理。或者,您也可以像任何其他配置设置一样以编程方式配置代理设置:

my $api_client = Google::Ads::GoogleAds::GoogleAdsClient->new({
  proxy   => "INSERT_PROXY_HERE"
});