Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 723 Bytes

File metadata and controls

34 lines (22 loc) · 723 Bytes

← 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 →