LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Command to check if open proxy works (https://www.linuxquestions.org/questions/linux-networking-3/command-to-check-if-open-proxy-works-4175498710/)

postcd 03-19-2014 06:00 AM

Command to check if open proxy works
 
Hello,

please what is the least server resources intensive linux command to veriffy an open proxy works.

I mean one should probably send and receive any data via this proxy? and if data found it returns true

Assuming proxy is 1.2.3.4:1080

I used this: curl -x $proxy $url --connect-timeout 8 --max-time 20

but it appears my proxy timeout, but still connect, not sure if after timeout no proxy is used, so i want to load via proxy or return false

nini09 03-20-2014 02:54 PM

You can use telnet to check proxy connection, like following.
telnet: > telnet proxy.example.com 8080
telnet: Trying 192.0.2.2...
telnet: Connected to 192.0.2.2.
telnet: Escape character is '^]'.
client: CONNECT mx1.example.com:25 HTTP/1.0

server: HTTP/1.0 200 Connection established

server: 220 mx1.example.com ESMTP server ready Thu, 5 Feb 2004 00:38:22 +0200


All times are GMT -5. The time now is 09:39 AM.