diff options
author | Ariel Calzada <ariel@acivitycentral.com> | 2013-01-03 16:20:38 (GMT) |
---|---|---|
committer | Ariel Calzada <ariel@acivitycentral.com> | 2013-01-03 16:20:38 (GMT) |
commit | af152cc97998b23c53b2e751eb9bb31bb83861da (patch) | |
tree | 06586e82132c59d7a776e4f990fbd9d26d5d548b /webactivity.py | |
parent | 6c270c0c6c34a07923ce1b1b24dbdddc7753de06 (diff) |
Add proxy support to browse
Diffstat (limited to 'webactivity.py')
-rw-r--r-- | webactivity.py | 5 |
1 files changed, 5 insertions, 0 deletions
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: |