Skip to content

Commit

Permalink
docs: improve proxy docs (ALL_PROXY vs HTTPS_PROXY) (#1025)
Browse files Browse the repository at this point in the history
Fixes #1023.
  • Loading branch information
enocom committed Nov 30, 2021
1 parent 77bdcf3 commit 3ba1b8a
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions README.md
Expand Up @@ -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]
Expand Down

0 comments on commit 3ba1b8a

Please sign in to comment.