From af152cc97998b23c53b2e751eb9bb31bb83861da Mon Sep 17 00:00:00 2001 From: Ariel Calzada Date: Thu, 03 Jan 2013 16:20:38 +0000 Subject: Add proxy support to browse --- (limited to 'webactivity.py') diff --git a/webactivity.py b/webactivity.py index 86d38f5..12c5280 100644 --- a/webactivity.py +++ b/webactivity.py @@ -161,6 +161,11 @@ class WebActivity(activity.Activity): session.set_property('ssl-use-system-ca-file', True) session.set_property('ssl-strict', False) + # Honor the http_proxy variable + if os.environ.get('http_proxy') is not None: + proxy_uri = Soup.URI.new(os.environ['http_proxy']) + session.set_property("proxy-uri",proxy_uri) + # By default, cookies are not stored persistently, we have to # add a cookie jar so that they get saved to disk. We use one # with a SQlite database: -- cgit v0.9.1