Skip to content
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

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

Open
abc767234318 opened this issue Feb 10, 2022 · 3 comments

Comments

@abc767234318
Copy link

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

@arkrz
Copy link
Owner

arkrz commented Feb 10, 2022

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

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

@snail2sky
Copy link

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

@arkrz
Copy link
Owner

arkrz commented Mar 22, 2022

想让 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 建议多试几次。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants