LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   test a remote proxy from the command line (https://www.linuxquestions.org/questions/linux-networking-3/test-a-remote-proxy-from-the-command-line-647459/)

cccc 06-06-2008 11:59 AM

test a remote proxy from the command line
 
hi

howto test a remote proxy from the command line ?
proxy port should be open:
Code:

# telnet 192.168.0.1 3128
Trying 192.168.0.1...
Connected to 192.168.0.1.
Escape character is '^]'.

but what are next steps to test HTTP ?

I have debian Etch stable on the local machine and on the proxy server.

sarin 06-06-2008 01:05 PM

hmm... why can't you just configure this proxy in your browser and test?
<edit>
Sorry, I missed the command line part.
export http_proxy=http://remote.proxy:port
no use wget to get a page
wget www.google.com
</edit>

firewallengineer 09-22-2014 05:44 AM

Use the following syntax to configure the proxy for http, https and ftp traffic on the Linux command line :

Quote:

$ export http_proxy="http://proxy-server:port"
$ export https_proxy="https://proxy-server:port"
$ export ftp_proxy="http://proxy-server:port"
Use the following syntax if the proxy server requires authentication :
Quote:

$ export http_proxy="http://user:password@proxy-server:port"
$ export https_proxy="https://user:password@proxy-server:port"
$ export ftp_proxy="http://user:password@proxy-server:port"
Testing Proxy
Use the following command to check current proxy settings :
Quote:

$ env | grep -i proxy
You can test the proxy by checking your public IP address from the command line :
Quote:

$ wget -q -O - checkip.dyndns.org \ | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
You may also use the time command to test the differences in the connection speed with proxy and without it :
Quote:

$ time wget -q -O - checkip.dyndns.org \ | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
REFERENCE:
http://www.shellhacks.com/en/HowTo-U...x-Command-Line


All times are GMT -5. The time now is 04:55 AM.