khtml proxy configuration

Andres Riancho andres.riancho at gmail.com
Thu Oct 25 17:38:12 CEST 2007


List,

    I'm trying to embed khtml in python, and one of the things that I
want to do is to change the proxy server that khtml uses to connect to
the remote sites. Right now, I'm successfully catching the needConfig
signal and handling it this way:

    def configNeeded(self, protocol, host):
        self.slaveConfig.setConfigData(protocol, host, "UserAgent",
self.UserAgent)
        self.slaveConfig.setConfigData(protocol, host, "UseProxy",
'localhost:8080')
        self.slaveConfig.setConfigData(protocol, host, "NoProxyFor", '')

    With this setConfigData calls, I'm able to set the user agent that
khtml uses; but the proxy configuration doesn't seem to apply. I have
read through the kprotocolmanager source code [0] and coudln't
understand what setConfigData calls I must make in order to instruct
khtml to ALWAYS use a specified HTTP proxy.

    Could you please help me and specify the variables(like UserAgent,
UseProxy,etc) I must set to make khtml use an HTTP proxy ? Is there
any good documentation for this ?

[0] http://www.google.com/codesearch?hl=en&q=+khtml+UserAgent+UseProxy+show:4YigsnRr7Kc:Pc4znfTNJ6s:xzBvx8xA3VE&sa=N&cd=3&ct=rc&cs_p=http://security.debian.org/debian-security/pool/updates/main/k/kdelibs/kdelibs_3.3.2.orig.tar.gz&cs_f=kdelibs-3.3.2/kio/kio/kprotocolmanager.cpp

Cheers,
-- 
Andres Riancho
http://w3af.sourceforge.net/
Web Application Attack and Audit Framework


More information about the konq-e mailing list