Issue 53 in pywebkitgtk: Patch to allow setting global proxy uri.

50 views
Skip to first unread message

pyweb...@googlecode.com

unread,
Aug 31, 2010, 4:31:29 PM8/31/10
to pyweb...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

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

pyweb...@googlecode.com

unread,
Oct 1, 2010, 5:48:58 AM10/1/10
to pyweb...@googlegroups.com

Comment #1 on issue 53 by jhuangjiahua: Patch to allow setting global proxy
uri.
http://code.google.com/p/pywebkitgtk/issues/detail?id=53

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')

}}}


pyweb...@googlecode.com

unread,
Oct 22, 2010, 6:29:37 AM10/22/10
to pyweb...@googlegroups.com
Updates:
Status: Started

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.)

pyweb...@googlecode.com

unread,
Oct 22, 2010, 7:41:35 PM10/22/10
to pyweb...@googlegroups.com
Updates:
Status: Fixed

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.

pyweb...@googlecode.com

unread,
Apr 13, 2011, 11:52:31 AM4/13/11
to pyweb...@googlegroups.com

Comment #4 on issue 53 by t.ce...@gmail.com: Patch to allow setting global
proxy uri.
http://code.google.com/p/pywebkitgtk/issues/detail?id=53

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.

pyweb...@googlecode.com

unread,
Jun 11, 2012, 1:50:13 PM6/11/12
to pyweb...@googlegroups.com

Comment #5 on issue 53 by daen...@gmail.com: Patch to allow setting global
proxy uri.
http://code.google.com/p/pywebkitgtk/issues/detail?id=53

Is this ever going to get released? Or is pywebkitgtk a dead project? This
issue was patched almost 2 years ago and still not released as far as I can
tell.

pyweb...@googlecode.com

unread,
Jun 14, 2012, 7:28:18 AM6/14/12
to pyweb...@googlegroups.com

Comment #6 on issue 53 by stefan.g...@gmail.com: Patch to allow setting
i used the following code (PyGObject based) without problems in ubuntu
12.04:


from gi.repository import WebKit
from gi.repository import Soup

proxy_uri = Soup.URI.new("http://127.0.0.1:3128")
session = WebKit.get_default_session()
session.set_property("proxy-uri",proxy_uri)



pyweb...@googlecode.com

unread,
Jun 14, 2012, 11:43:07 AM6/14/12
to pyweb...@googlegroups.com

Comment #7 on issue 53 by daen...@gmail.com: Patch to allow setting global
proxy uri.
http://code.google.com/p/pywebkitgtk/issues/detail?id=53

That's using some other library. You get this library from "import webkit"

Reply all
Reply to author
Forward
0 new messages