v2sub icon indicating copy to clipboard operation
v2sub copied to clipboard

curl: (7) Failed to connect to 127.0.0.1 port 1081: Connection refused

Open abc767234318 opened this issue 3 years ago • 3 comments

image 我想问一下,这样是为什么呢,我这个是服务器

abc767234318 avatar Feb 10 '22 02:02 abc767234318

curl 尝试在1081端口建立http代理连接,而1081监听的是socks协议,所以失败了。

解决方法之一是修改监听端口,比如 v2sub -http 1081 -socks 1082

arkrz avatar Feb 10 '22 03:02 arkrz

想让 sock跟http 代理共用一个端口?

snail2sky avatar Mar 22 '22 06:03 snail2sky

想让 sock跟http 代理共用一个端口?

可以共用一个端口,但我不建议这么做。指定参数 v2sub -http 1081 -socks 1081 监听相同端口即可。

可以用 curl --proxy http://127.0.0.1:1081 https://www.google.com 来测试 http 代理,用 curl --socks5-hostname 127.0.0.1:1081 https://www.google.com 来测试 socks 代理。

如遇到 curl: (56) Proxy CONNECT aborted 建议多试几次。

arkrz avatar Mar 22 '22 14:03 arkrz