Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.1 KB

4-Proxy-EN.md

File metadata and controls

31 lines (23 loc) · 1.1 KB

← SSL Verify | Proxy(中文) | Timeout →


Proxy

Description

When you need to use proxy to send your request, you can set environment variables or you can set them by client: HTTP_PROXY: Only the HTTP request to take effect. HTTPS_PROXY: Only the HTTPS request to take effect. NO_PROXY: The Ips or domains in it will not use proxy.

Setting

Setting by environment variables

You can set environment variables HTTP_PROXY, HTTPS_PROXY or NO_PROXY

Setting by client

// client proxy has a high priority than environment variables.
client.SetHttpProxy("http://127.0.0.1:8080")   // Set Http Proxy.
client.GetHttpProxy()                          // Get Http Proxy.

client.SetHttpsProxy("https://127.0.0.1:8080")   // Set Https Proxy.
client.GetHttpsProxy()                           // Get Https Proxy.

client.SetNoProxy("127.0.0.1,localhost")     // Set No Proxy.
client.GetNoProxy()                          // Get No Proxy.

← SSL Verify | Proxy(中文) | Timeout →