4-Proxy.md

May 27, 2026 · View on GitHub

← Transport | Proxy(中文) | Timeout →


HTTP(S) Proxy

Default

  • No proxy

Configure HTTP(S) Proxy

var ak, sk, region string
config = volcengine.NewConfig().
	WithCredentials(credentials.NewStaticCredentials(ak, sk, "")).
	WithRegion(region).WithHTTPProxy("http://your_proxy:8080").WithHTTPSProxy("http://your_proxy:8080")

sess, _ = session.NewSession(config)
client = ecs.New(sess)

Notes

Supported environment variables:

  • http_proxy / HTTP_PROXY
  • https_proxy / HTTPS_PROXY

Priority: code > environment variables.


← Transport | Proxy(中文) | Timeout →