Proxy for command line utilities in Win XP

2019-04-13 06:48发布

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.

4条回答
Emotional °昔
2楼-- · 2019-04-13 06:50

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?

查看更多
The star\"
3楼-- · 2019-04-13 06:59

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?

查看更多
冷血范
4楼-- · 2019-04-13 07:06

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.

查看更多
淡お忘
5楼-- · 2019-04-13 07:11

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).

查看更多
登录 后发表回答