【发布时间】:2016-09-16 15:35:40
【问题描述】:
我在 Mac El Capitan 上使用 bash shell。如何使用 curl 为代理服务器传递空白用户名/密码?我试过这个
localhost:tmp davea$ curl http://www.google.com --proxy localhost:9050 --proxy-user "":""
514 Authentication required.
我正在使用这个命令在我的机器上运行一个 Tor 守护进程
tor --CookieAuthentication 0 --HashedControlPassword "" --ControlPort 9050 --SocksPort 50001
我可以通过 Telnet 连接而无需像这样输入密码
localhost:tmp davea$ telnet localhost 9050
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
AUTHENTICATE
250 OK
所以我知道我的密码至少是正确的。
【问题讨论】:
-
为什么不直接连接到socks端口?
curl -vvvv http://www.google.com --socks5 localhost:50001
标签: bash curl proxy passwords tor