2024-09-26 22:50:31 发布
网友
在Python中,我需要访问Azure blob存储,但需要通过Socks代理(ssh DynamicForward)
通常,我会这样做:
client = azure.storage.blob.BlobServiceClient(url, credentials)
如何使此客户端使用代理
Azure API使用requests进行HTTPS访问。 您可以将请求会话设置为使用socks,如下所示:
requests
import requests session = requests.Session() session.proxies["https"] = "socks5h://127.0.0.1:9876" client = azure.storage.blob.BlobServiceClient(url, credentials, session=session)
Azure API使用
requests
进行HTTPS访问。 您可以将请求会话设置为使用socks,如下所示:相关问题 更多 >
编程相关推荐