New issue 53 by pathensley: Patch to allow setting global proxy uri.
http://code.google.com/p/pywebkitgtk/issues/detail?id=53
There is an Ubuntu Launchpad ticket complaining about the inability to set
the Webkit proxy url in recent releases:
https://bugs.launchpad.net/ubuntu/+source/pywebkitgtk/+bug/424833?comments=all
I've created a patch which adds a "set_proxy" method to
webkit/webkitmodule.c. I'll submit it to the Ubuntu package maintainer as
well. Hopefully this solves the problem for some folks.
Attachments:
pywebkit-add-set-proxy-method.patch 4.0 KB
good job~
I use this code to setting global proxy uri::
{{{
import gtk, webkit
import ctypes
libgobject = ctypes.CDLL('/usr/lib/libgobject-2.0.so.0')
libwebkit = ctypes.CDLL('/usr/lib/libsoup-2.4.so.1')
libsoup = ctypes.CDLL('/usr/lib/libsoup-2.4.so.1')
libwebkit = ctypes.CDLL('/usr/lib/libwebkit-1.0.so')
proxy_uri = libsoup.soup_uri_new('http://127.0.0.1:8000')
session = libwebkit.webkit_get_default_session()
libgobject.g_object_set(session, "proxy-uri", proxy_uri, None)
import gtk, webkit; w = gtk.Window() ; s = gtk.ScrolledWindow() ; v =
webkit.WebView() ; s.add(v); w.add(s) ; w.show_all()
v.open('http://www.youtube.com')
}}}
Comment #2 on issue 53 by jmalonzo: Patch to allow setting global proxy uri.
http://code.google.com/p/pywebkitgtk/issues/detail?id=53
(No comment was entered for this change.)
Comment #3 on issue 53 by jmalonzo: Patch to allow setting global proxy uri.
http://code.google.com/p/pywebkitgtk/issues/detail?id=53
Thanks path. Committed in http://goo.gl/Fejc.
Thanks for the code, jhuangjiahua, it works for me with minor changes in
library filenames. Is there a way to avoid hardcoding these filenames?
I'm afraid I will need to use this code until pywebkitgtk with the new
set_proxy method gets into Debian.