-1

How would I go about doing this in python? I need to establish a stronger connection than I may have to the server.

Michael
  • 157
  • 1
  • 2
  • 9

1 Answers1

1

Using urllib2 (which is the easiest way to fetch resources from a http server), you need to set the http_proxy environment variable.

If your proxy is unauthenticated it will be something like:

export http_proxy=http://proxy:port/

If your proxy is authenicating, it will be:

export http_proxy=http://username:password@proxy:port/

If you want to do this programattically, you can manually do this using a proxy handler.

Community
  • 1
  • 1
Andrew Walker
  • 40,984
  • 8
  • 62
  • 84