warpplus icon indicating copy to clipboard operation
warpplus copied to clipboard

能否添加前置代理

Open eve2ptp opened this issue 2 years ago • 1 comments

screen 模式可以设置终端代理,但 systemd 直连会被墙(局域网树莓派)

eve2ptp avatar Jan 24 '23 07:01 eve2ptp

目前在 urllib 和 requests 的调用方法这里加上代理链,能正常工作

proxy_support` = urllib.request.ProxyHandler({
    'http' : 'http://127.0.0.1:7890',
    'https': 'https://127.0.0.1:7890'
})
opener = urllib.request.build_opener(proxy_support)
urllib.request.install_opener(opener)

def main():
    updater = Updater(TOKEN, use_context=True, request_kwargs={"proxy_url": "http://127.0.0.1:7890"})

eve2ptp avatar Jan 24 '23 07:01 eve2ptp