I generally use telnet command to test whether a given port is listening on a remote machine. For e.g., telnet remote_host 80. But once I was in a situation to test a port on a remote machine via HTTP proxy. I did use a CONNECT method to achieve that. Here’s how you can use CONNECT method on a HTTP proxy using telnet.
# telnet 192.168.1.100 8080 Trying 192.168.11.100... Connected to 192.168.1.100. Escape character is '^]'. CONNECT google.com:80 HTTP/1.0
:::::::::::::Hit Enter twice:::::::::::::::: HTTP/1.1 200 Connection established GET / HTTP/1.0 HTTP/1.0 200 OK
In the above snapshot, we are first connecting to a proxy server on port 8080. Once done, you can use CONNECT method to open a HTTP tunnel to remote machine. Finally hit enter twice to make a connection. After the connection is established, you can send commands according to the respective protocols.
CONNECT method can be used to connect to SMTP, Internet Relay Chat etc…
Thank you for sharing the information.
Probably could mention that 192.168.1(1?).100 is your proxy (obvious, but for those who are in too hurry to think).