views:

1037

answers:

3

I know this is simple.. I am jus missing something.. I give up!!

#!/bin/sh
export http_proxy='http://unblocksitesnow.info'
rm -f index.html*
strace -Ff -o /tmp/mm.log -s 200 wget 'http://slashdot.org'

I have used different proxy servers.. to no avail.. I get some default page.. In /etc/wgetrc use_proxy = on

Actually I am trying to use this setting(http_proxy) with python's urllib2. It access some default page as well..

strace - does a dns lookup of the proxy server GET http://slashdot.org/ HTTP/1.0\r\nUser-Agent: Wget/1.11.4\r\nAccept: /\r\nHost: slashdot.org\r\n\r\n

Any pointers??

A: 

Often you need a port with the proxy-server, for example:

export http_proxy=http://unblocksitesnow.info:30000

Also, the single quotes are not needed.

Dave
That dint work either#!/bin/shexport http_proxy=http://unblocksitesnow.info:80rm -f index.html*strace -Ff -o /tmp/mm.log -s 200 wget 'http://slashdot.org'
Ramya
+1  A: 

For some apps, HTTP_PROXY is case sensitive. It's best to set it in upper case.

# export HTTP_PROXY=http://server/

or

# export HTTP_PROXY=http://server:8888/
crb
A: 

The problem was I was using proxy sites. These sites expect you to send GET request to the proxy site (with the target site as parameter in URL or whatever site specific mechanisms they implement).

I was looking for proxy sites like http://www.proxy4free.com/page1.html

I connect to their respective ports and send a get request to the original target site..

Ramya