Request: Proxy support #218
Closed
owendswang
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
The latest version now includes proxy support :) Do note that it's required to use proxies that support HTTPS, so usually those are Socks4 and Socks5 proxies! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
(Moving from CivitAI.)
I didn't dig into the interface codes. So I just tried to add proxies to http requests.
There are 2 kinds of http request as I see from the py scripts (civitai_api.py, civitai_file_manager.py).
proxies = {'http': 'http://192.168.1.6:8118', 'https': 'http://192.168.1.6:8118'}
requests.get(url, proxies=proxies)
proxies = {'http': 'http://192.168.1.6:8118', 'https': 'http://192.168.1.6:8118'}
proxy = urllib.request.ProxyHandler(proxies)
opener = urllib.request.build_opener(proxy)
For current version v3.4.1, those line numbers are as below.
'civitai_api.py': Line 635,648,1255
'civitai_file_manager.py': Line 233,194,657,904,972
Hope this would help you to add proxy support in the web interface settings panel.
Beta Was this translation helpful? Give feedback.
All reactions