[webkit-help] can not set proxy for webkit Gtk version.

Christophe Gillette christophe.public at gmail.com
Wed Dec 2 17:13:26 PST 2009


The GTK version is now using libsoup for the networking layer. If the
libsoup copy you are using is built --without-gnome, it won't retrieve the
information from the environment variable.

In your application (or GtkLauncher), you can read the environment variable
and set the proxy using the libsoup API by getting the default session
created by WebKit. For exmaple:

void setProxy(const char *szUri)
{
    SoupURI *soupUri = szUri ? soup_uri_new(szUri) : 0;
    g_object_set(webkit_get_default_session(), SOUP_SESSION_PROXY_URI,
soupUri, NULL);
    if (soupUri)
        soup_uri_free(soupUri);
}

Christophe

On Tue, Dec 1, 2009 at 10:02 PM, Fern Moon <fernmoon at gmail.com> wrote:

> I google the method to set http proxy for webkit.
>
> I  try the follows, but the webkit can still access internet directly.
>
> export http_proxy="127.0.0.1:8081"
> export http_proxy="127.0.0.1:8081"
>
> I verified that there is no such proxy in my machine.
>
> Thanks for help.
>
> Fern
> _______________________________________________
> webkit-help mailing list
> webkit-help at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20091202/1fcb1eac/attachment.html>


More information about the webkit-help mailing list