New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【讨论】代理类型及是否可用超时判断代码部分逻辑是否有问题? #756
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
以下个人整理,如有错漏欢迎指正,一起讨论让项目发展更好。
@jhao104
几点知识
http代理和https代理的区别:
http/https/socks4/socks5/socks5h/vmess/vless等都是代理服务器提供服务时候与客户端通讯的协议,即cleint <--->proxy server 采用哪种协议。
python的request库中proxies对象其中key包括http/https/socks5等
代码部分
httpTimeOutValidator
检测,是判断代理是否http协议,那么proxyies 写法应该是{"http": "http://{proxy}".format(proxy=proxy), "https": "http://{proxy}".format(proxy=proxy)}
httpsTimeOutValidator
proxyies 写法应该是{"http": "https://{proxy}".format(proxy=proxy), "https": "https://{proxy}".format(proxy=proxy)}
基于1 ,代理类型是http和https应该是分开处理的,一般来讲代理要么是http类型,要么是https类型,不排除有http/https双协议支持的,不过应该几乎不存在。
我的改法如下:具体可以看我fork的仓库
一些想法
The text was updated successfully, but these errors were encountered: