[webkit-help] How to set proxy when using WebKit.

余飞 feifaith at gmail.com
Mon Sep 7 00:59:02 PDT 2009

Thanks Nevo,

Having read the source code of some browser using WebKit, i found that we
must set proxy using the following three lines,
SoupSession* pSession = webkit_get_default_session();
SoupURI* pURI = soup_uri_new("http://<proxy server address>:<port>");
g_object_set( pSession, "proxy-uri", pURI, NULL );
and you could also retrieve environment http_proxy to get the proxy setting
and set the proxy using the code above.

Best wishes,
Yu Fei

2009/9/7 Nevo <sakur.deagod at gmail.com>

> Im assuming you are using libsoup as its network backend, then there's a
> environment variable for the network proxy for latest libsoup . But
> unfortunately , I simply didn't remember that, you may check the ChangeLog
> in libsoup package , try to grep "http_proxy" or "HTTP_PROXY".
> Nevo
> 2009/9/7 余飞 <feifaith at gmail.com>
>> Hi, all,
>>   I've write a simple browser using WebKit under Ubuntu. And it can open
>> local web pages.
>>   But when i use it to access internet, it doesn't work although i export
>> http_proxy.
>>   So, how can i change the proxy setting of WebKit manually in the code?
>> Thanks a lot!
>> Sincerely,
>> Fei, Yu
>> _______________________________________________
>> 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/20090907/5c6f5b53/attachment.html>

More information about the webkit-help mailing list