views:

5108

answers:

5

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.

+1  A: 

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?

Harley
+1  A: 

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?

Michael Burr
A: 

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.

Kunal Dua
A: 

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.

Harley
+1  A: 

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

Alexander