Remove the pax intermediary.
[surf.git] / surf.c
diff --git a/surf.c b/surf.c
index c5da191..02656ec 100644 (file)
--- a/surf.c
+++ b/surf.c
@@ -300,7 +300,6 @@ buttonrelease(WebKitWebView *web, GdkEventButton *e, Client *c) {
 
        g_object_get(result, "context", &context, NULL);
        g_object_get(result, "link-uri", &arg.v, NULL);
-       printf("%d %d\n", context, e->button);
        for(i = 0; i < LENGTH(buttons); i++) {
                if(context & buttons[i].click && e->button == buttons[i].button &&
                CLEANMASK(e->state) == CLEANMASK(buttons[i].mask) && buttons[i].func) {
@@ -1271,8 +1270,12 @@ setup(void) {
 
        /* proxy */
        if((proxy = getenv("http_proxy")) && strcmp(proxy, "")) {
-               new_proxy = g_strrstr(proxy, "http://") ? g_strdup(proxy) :
-                       g_strdup_printf("http://%s", proxy);
+               new_proxy = g_strrstr(proxy, "http://")
+            || g_strrstr(proxy, "socks://")
+            || g_strrstr(proxy, "socks4://")
+            || g_strrstr(proxy, "socks5://")
+            ? g_strdup(proxy)
+            : g_strdup_printf("http://%s", proxy);
                puri = soup_uri_new(new_proxy);
                g_object_set(G_OBJECT(s), "proxy-uri", puri, NULL);
                soup_uri_free(puri);