e1732a364fed / v2ray_simple

a verysimple proxy
MIT License
530 stars 104 forks source link

http代理协议入站和pip不兼容?[Bug] #260

Open bash99 opened 1 year ago

bash99 commented 1 year ago

Describe the bug【描述 bug】 服务器上启动verysimple客户端,入站 ··· [[listen]] protocol = "http" host = "127.0.0.1" port = 10268 ···

pip3用此代理安装会报错 To Reproduce【如何复现该bug】 执行

 pip3 --proxy http://localhost:10268 search numpy

响应

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response'))': /pypi

verysimple这边log的错误

2023-04-12 15:02:09.320 INFO    New Accepted Conn       {"connid": 885235, "from": "127.0.0.1:59548", "handler": "http://127.0.0.1:10268"}
2023-04-12 15:02:09.321 WARN    Failed handshakeInserver        {"connid": 885235, "handler": "127.0.0.1:10268", "client RemoteAddr": "127.0.0.1:59548", "error": " [ get method/path failed , Detail: invalid data, Data: [CONNECT -12] ] , with Buffer,len 33"}

Expected behavior【预期的行为】 pip3能正常访问。 BTW, curl、conda都能正常,所以只是某种不兼容。但是换naive这种简单代理pip3能兼容。

Envs (please complete the following information):【系统环境】 1.2.5版本

Aruelius commented 1 year ago

可以把 http 改成 socks5http

bash99 commented 1 year ago

可以把 http 改成 socks5http

这样倒是pip3用sock5访问能过,不过http入站可能还是算有点兼容性问题。