如何将 Tor 与 cURL 结合使用(在 Windows 中)?
我安装了 Vidalia,将 Chrome 设置为使用端口 8118 作为代理,并通过 https://check 检查了我的连接.torproject.org/ 但我很难使用命令行工具 cURL 来完成这项工作。这就是我尝试的:
C:\>curl -v --proxy localhost::9050 http://google.com
* About to connect() to proxy localhost port 0 (#0)
* Failed to connect to ↕: Address not available
* No error
* Trying 127.0.0.1... Failed to connect to 127.0.0.1: Address not available
* No error
* couldn't connect to host
* Closing connection #0
curl: (7) Failed to connect to ↕: Address not available
已解决:
curl -v --socks4a localhost:9050 http://check.torproject.org/
I have Vidalia installed, set up Chrome to use port 8118 for the proxy and I've checked my connection through https://check.torproject.org/ but I'm having difficulties getting this work with the command-line tool cURL. This is what I try:
C:\>curl -v --proxy localhost::9050 http://google.com
* About to connect() to proxy localhost port 0 (#0)
* Failed to connect to ↕: Address not available
* No error
* Trying 127.0.0.1... Failed to connect to 127.0.0.1: Address not available
* No error
* couldn't connect to host
* Closing connection #0
curl: (7) Failed to connect to ↕: Address not available
Solved:
curl -v --socks4a localhost:9050 http://check.torproject.org/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用
--socks5
(两个破折号)。-socks5
不是curl 的有效参数,因此curl 将其解释为主机名。Use
--socks5
(two dashes).-socks5
is not a valid parameter for curl, so curl is interpreting it as a hostname.事实证明,这整个混乱只是语法问题。正确的命令如下:
socks4a 前有两个破折号,端口前有一个冒号。
Turns out this entire mess was just syntax problems. A proper command is here:
With TWO dashes before socks4a and ONE colon before the port.
使用
socks5
进行更多更新的响应。因此,使用袜子 5 的
端口 9150
。More updated response using
socks5
.So, using
port 9150
for socks 5.