This commit is contained in:
yumoqing 2022-08-23 14:01:37 +08:00
parent 944c4825a1
commit 95c01eabf4
2 changed files with 13 additions and 1 deletions

12
appPublic/proxy.py Normal file
View File

@ -0,0 +1,12 @@
import socket
import socks
import requests
original_socket = socket.socket
def set_socks_proxy(host, port):
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, host, port)
socket.socket = socks.socksocket
def unset_proxy():
socket.socket = original_socket

View File

@ -1 +1 @@
__version__ = '5.1.18'
__version__ = '5.1.19'