webkitpdf.vala
authorAlan Knowles <alan@roojs.com>
Tue, 24 Nov 2015 09:27:07 +0000 (17:27 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 24 Nov 2015 09:27:07 +0000 (17:27 +0800)
webkitpdf.vala

index d03fcaf..f64386b 100644 (file)
@@ -20,9 +20,12 @@ public class webkitpdf {
        };
     public static int main(string[] args) {
         Gtk.init(ref args);
-               var sess = WebKit.get_default_session();
-               sess.proxy_uri = new Soup.URI("http://192.168.252.12:3128");
+               
+               unowned string proxy = Environment.get_variable ("http_proxy");
+               if (proxy.length > 0) {
+                       var sess = WebKit.get_default_session();
+                       sess.proxy_uri = new Soup.URI(proxy);
+               }
                
         var opt_context = new OptionContext ("webkitpdf");