如何使用Tor与cURL(在Windows中)? [英] How do I use Tor with cURL (in Windows)?

查看:195
本文介绍了如何使用Tor与cURL(在Windows中)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了Vidalia,设置Chrome使用端口8118作为代理,我已通过 https: //check.torproject.org/ ,但是我无法使用命令行工具cURL来完成这项工作。这是我尝试:

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

已解决

curl -v --socks4a localhost:9050 http://check.torproject.org/


推荐答案

使用 - socks5 破折号)。 -socks5 不是curl的有效参数,因此curl将其解释为主机名。

Use --socks5 (two dashes). -socks5 is not a valid parameter for curl, so curl is interpreting it as a hostname.

这篇关于如何使用Tor与cURL(在Windows中)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆