Blob Blame History Raw
From 5c161c56ec7568b6eeb698be5d5e18970c8146a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
Date: Thu, 9 Jul 2015 18:49:09 +0200
Subject: [PATCH] Subject: [PATCH] session: disable default socket proxy

GSocketClient uses the system proxy by default, and it may end up using
the system HTTP proxy with bad results if CONNECT is not
supported. spice-gtk uses it's own SPICE_PROXY instead, and doesn't rely
on GSocketClient default proxy but GProxyAddress instead. Disabling the
default proxy solve a wrong proxy from being used.

It may be worth to revisit this change if GSocketClient can be told to
ignore proxies that are not eligible for Spice connections. (HTTP could
be though, in which case it would be a user configuration issue)

Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1040679
---
 gtk/spice-session.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index 0663380..7d84c07 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -1895,6 +1895,7 @@ GSocketConnection* spice_session_channel_open_host(SpiceSession *session, SpiceC
 
     open_host.client = g_socket_client_new();
 #if GLIB_CHECK_VERSION(2,26,0)
+    g_socket_client_set_enable_proxy(open_host.client, FALSE);
     g_socket_client_set_timeout(open_host.client, SOCKET_TIMEOUT);
 #else
     open_host.timeout_id =
-- 
2.4.4