Question

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??

Was it helpful?

Solution 2

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

OTHER TIPS

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/

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.

On Debian/Ubuntu if you need apt-get via the proxy you will also need to update

/etc/apt/apt.conf

If the file doesnt exist, create it and apt-get update to confirm

As well as export http_proxy="<ADD>:<PORT>"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top