Give gcloud Its Own SOCKS5 Route
Use Google Cloud CLI proxy properties and keep that scope separate from other SDKs or subprocesses.
In the gcloud configuration intended for these commands, select an existing SOCKS5 endpoint:
gcloud config set proxy/type socks5
gcloud config set proxy/address 127.0.0.1
gcloud config set proxy/port 1080
Replace the listener if needed. For permitted public-service calls, the SOCKS5 proxy list offers host and port candidates for this configuration. Use this public branch only without saved proxy usernames/passwords or proxy-authentication environment values. These are persistent properties of the active configuration; changing another configuration can leave a later command using the old route. Keep explicit properties and environment inputs consistent with the CLI's documented precedence.
The endpoint must already be reachable from the CLI machine. If SSH provides it, retain that tunnel; these properties do not create the listener.
Use the supported credential properties or documented environment equivalents for an authenticated endpoint, keeping secrets out of committed examples and command history.
Identify the first failure: reaching the listener, proxy authentication or the Google service. An API authorization rejection after network access concerns cloud credentials. Other SDKs, Python clients and subprocesses keep their own configuration; this route governs gcloud's supported path.