Reputation: 11
I am using google-cloud-cpp (C++ API for Google Cloud Platform functions) to create/read/write to buckets. When I am working from within the organization's firewall, I have to use a proxy to be able to connect to google cloud. I see that we can configure a proxy using the gcloud command line: gcloud config set proxy/type http gcloud config set proxy/address x.x.x.x gcloud config set proxy/port
Can I do something similar when I use google-cloud-cpp?
Upvotes: 0
Views: 1591
Reputation: 15266
If we look at the source code of the google-cloud-cpp library as found on GitHub, we seem to see that it is based on libcurl.
Following on from the comments by @Travis Webb, we then look at the docs for libcurl and find:
https://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html
This documents API that can be used to set proxy settings for programs that use libcurl. However, if we read deeper, we find a section on environment variables that declares that http_proxy
and https_proxy
can be set.
Upvotes: 5