← Back to team overview

desktop-packages team mailing list archive

[Bug 259830] Re: Honor gnome proxy setting

 

This is a hack to get twitter working behind proxy. I don't know how to make this gwibber-wide :(
I'll try to look for ways to do it.

Gwibber 2.32.0.1, Ubuntu 10.10

--- twitter.py	2011-12-06 17:41:26.741085914 +0400
+++ /usr/share/pyshared/gwibber/lib/gtk/twitter.py	2011-12-06 17:42:12.421057531 +0400
@@ -16,6 +16,15 @@
 
 sigmeth = oauth.OAuthSignatureMethod_HMAC_SHA1()
 
+#dirty ugly proxy hack
+import ctypes
+libgobject = ctypes.CDLL('/usr/lib/libgobject-2.0.so.0')
+libsoup = ctypes.CDLL('/usr/lib/libsoup-2.4.so.1')
+libwebkit = ctypes.CDLL('/usr/lib/libwebkit-1.0.so.2')
+proxy_uri = libsoup.soup_uri_new('http://127.0.0.1:5865')
+session = libwebkit.webkit_get_default_session()
+libgobject.g_object_set(session, "proxy-uri", proxy_uri, None)
+
 class AccountWidget(gtk.VBox):
   """AccountWidget: A widget that provides a user interface for configuring twitter accounts in Gwibber
   """

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gwibber in Ubuntu.
https://bugs.launchpad.net/bugs/259830

Title:
  Honor gnome proxy setting

Status in Gwibber:
  Confirmed
Status in “gwibber” package in Ubuntu:
  Triaged

Bug description:
  Currently gwibber seems to expect a direct connection to the net, no
  use of a proxy.  Gwibber should really query gnome for proxy
  information and use it for connecting to the net.  You could also
  consider using libproxy.

To manage notifications about this bug go to:
https://bugs.launchpad.net/gwibber/+bug/259830/+subscriptions