TencentCloud / tencentcloud-sdk-python

Tencent Cloud API 3.0 SDK for Python
Apache License 2.0
613 stars 251 forks source link

Feature Request: Support for environment parameter NO_PROXY #110

Closed FutureArchitect-wang2449 closed 3 years ago

FutureArchitect-wang2449 commented 3 years ago

Since you support https_proxy environment setting for configuring proxy, you had better also support no_proxy altogether.

https://github.com/TencentCloud/tencentcloud-sdk-python/blob/8d4efbcc69685eaa4828db9f6150eb902ca4b36d/tencentcloud/common/http/request.py#L25

The scinario I am facing to is that, I have to use proxy for my other https requests, but use no proxy for tccli command as an exception. But the no_proxy set in the environment variable does not work.

Best regards

zqfan commented 3 years ago

no_proxy has no specification or standard file to define it, and it is a bit complicated to support various cases, so I think I will implement a basic exact match, which means your requested endpoint(domain) in NO_PROXY, rather than supporting multiple settings with regex

zqfan commented 3 years ago

It might be more convenient for users if I replace underlying httplib with requests, but that needs a bit more work and might do in long term