Win XP 中命令行实用程序的代理
如何使用 ping 等命令行实用程序来使用 Windows XP 中的默认代理。
proxycfg -u 将代理设置为默认(IE)代理,但它似乎不起作用。
更新:我在代理后面,想要一种方法来检查站点是否启动,因此尝试使用 ping! 还想要一种通过 telnet(不使用 Putty)到特定站点和端口来检查连接性的方法。
How do I get command line utilities like ping to use the default proxy in Windows XP.
proxycfg -u sets the proxy to the default (IE) proxy alright, but it doesn't seem to be working.
Update: I am behind a proxy and would like a way to check if a site is up or not hence trying to use ping! Also would like a way to telnet (without using Putty) to a specific site and port to check connectivity.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
代理通常用于 Web (HTTP) 流量,ping 使用 ICMP,这是一个完全独立的协议。 你到底想做什么?
A proxy is usually used for web (HTTP) traffic, ping uses ICMP, which is a completely separate protocol. What, exactly are you trying to do?
因此,正如大家已经提到的那样,标准 ping 并不通过 HTTP 代理进行。 您可能想要的是使用 CONNECT 方法通过 HTTP 代理建立 TCP 连接(例如 HTTP、telnet、ssh)隧道。 例如,使用 netcat(telnet 也可以工作,但 netcat 更好),您将执行以下操作:
然后按两次 Enter 键。
还有一些工具可以为您执行此操作。 请记住,某些 HTTP 代理配置为仅允许 CONNECT 连接到某些目标,例如仅到端口 443(对于 TLS/SSL/HTTPS)。
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:
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).
Ping 不使用 TCP - 它使用 ICMP,因此使用代理并没有真正的意义。
您还有其他命令行实用程序吗?
Ping doesn't use TCP - it uses ICMP, so using a proxy doesn't really make sense.
Do you have another command line utility in mind?
您最好的选择可能是 Windows 命令行浏览器。
您可以尝试 lynx,它几乎是一个完整的浏览器,或者您也可以做一些更简单的事情并使用 wget。 我自己会推荐wget。
这两个程序都有某种配置代理的方法,并且 Linux 和 Windows 版本的文档应该相同。
Your best bet will probably be a command line browser for Windows.
You can try out lynx, which is nearly a full browser, or you can go something simpler and use wget. I would recommend wget myself.
Both programs have some way of configuring a proxy, and the documentation should be the same for both Linux and Windows versions.