2

如何让命令行实用程序(如 ping)使用 Windows XP 中的默认代理。

proxycfg -u 可以将代理设置为默认 (IE) 代理,但它似乎不起作用。

更新:我在代理后面,想要一种方法来检查站点是否启动,因此尝试使用 ping!还想要一种远程登录(不使用 Putty)到特定站点和端口以检查连接性的方法。

4

4 回答 4

3

代理通常用于 Web (HTTP) 流量,ping 使用 ICMP,这是一个完全独立的协议。什么,你到底想做什么?

于 2008-09-29T04:57:45.450 回答
2

So, standard ping doesn't go via an HTTP proxy, as everyone's already mentioned. What you probably want is to tunnel your TCP connections (e.g., HTTP, telnet, ssh) via your HTTP proxy using the CONNECT method. For instance, using netcat (telnet will also work, but netcat's better) you'll do the following:

$ nc yourproxy 3128
CONNECT yourtelnetserver:23 HTTP/1.0

then press enter twice.

There are also tools that can do this for you. Keep in mind that some HTTP proxies are configured to allow CONNECT connections only to certain destinations, for example, to port 443 ony (for TLS/SSL/HTTPS).

于 2008-09-29T10:18:41.560 回答
1

Ping 不使用 TCP - 它使用 ICMP,因此使用代理没有任何意义。

您是否想到了另一个命令行实用程序?

于 2008-09-29T04:58:56.897 回答
0

您最好的选择可能是 Windows 的命令行浏览器。

您可以尝试lynx,它几乎是一个完整的浏览器,或者您可以使用更简单的东西并使用wget。我会推荐 wget 自己。

这两个程序都有一些配置代理的方法,Linux 和 Windows 版本的文档应该是相同的。

于 2008-09-29T05:53:27.423 回答