From 3ba1b8a45136c03ff822d85a4fbf56e0306def50 Mon Sep 17 00:00:00 2001 From: Eno Compton Date: Tue, 30 Nov 2021 14:32:29 -0700 Subject: [PATCH] docs: improve proxy docs (ALL_PROXY vs HTTPS_PROXY) (#1025) Fixes #1023. --- README.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 18f088090..d08432872 100644 --- a/README.md +++ b/README.md @@ -299,14 +299,27 @@ Kubernetes Engine][connect-to-k8s]. ## Running behind a Socks5 proxy -The Cloud SQL Auth Proxy includes support for sending requests through a SOCKs5 -proxy. If a Socks5 proxy is running on `localhost:8000`, the command to start +The Cloud SQL Auth Proxy includes support for sending requests through a SOCKS5 +proxy. If a SOCKS5 proxy is running on `localhost:8000`, the command to start the Cloud SQL Auth Proxy would look like: ``` -ALL_PROXY=socks5://localhost:8000 cloud_sql_proxy -instances=$INSTANCE_CONNECTION_NAME=tcp:5432 +ALL_PROXY=socks5://localhost:8000 \ +HTTPS_PROXY=socks5://localhost:8000 \ + cloud_sql_proxy -instances=$INSTANCE_CONNECTION_NAME=tcp:5432 ``` +The `ALL_PROXY` environment variable specifies the proxy for all TCP +traffic to and from a Cloud SQL instance. The `ALL_PROXY` environment variable +supports `socks5` and `socks5h` protocols. To route DNS lookups through a proxy, +use the `socks5h` protocol. + +The `HTTPS_PROXY` (or `HTTP_PROXY`) specifies the proxy for all HTTP(S) traffic +to the SQL Admin API. Specifying `HTTPS_PROXY` or `HTTP_PROXY` is only necessary +when you want to proxy this traffic. Otherwise, it is optional. See +[`http.ProxyFromEnvironment`](https://pkg.go.dev/net/http@go1.17.3#ProxyFromEnvironment) +for possible values. + ## Reference Documentation - [Cloud SQL][cloud-sql]