khtml proxy configuration

Andres Riancho andres.riancho at gmail.com
Fri Oct 26 22:18:26 CEST 2007


Just to let you know, I'm using:

    def configNeeded(self, protocol, host):
        #print "Sending user agent", self.configuration.userAgent(host)
        #print "Set Config Data"
        self.slaveConfig.setConfigData(protocol, host, "UserAgent",
self.UserAgent)

        #self.slaveConfig.setConfigData(protocol, host, "UseProxy", '1')
        self.slaveConfig.setConfigData(protocol, host, "UseProxy",
'http://127.0.0.1:8080/')
        self.slaveConfig.setConfigData(protocol, host, "ProxyType", '1')
        self.slaveConfig.setConfigData(protocol, host,
"PersistentProxyConnection", '0')
        self.slaveConfig.setConfigData(protocol, host, "ReversedException", '0')

        self.slaveConfig.setConfigData(protocol, host, "NoProxyFor", '1.2.3.4')

        self.slaveConfig.setConfigData(protocol, host, "Proxy",
'http://127.0.0.1:8080/')
        self.slaveConfig.setConfigData(protocol, host, "httpProxy",
'http://127.0.0.1:8080/')
        self.slaveConfig.setConfigData(protocol, host, "httpsProxy",
'http://127.0.0.1:8080/')
        self.slaveConfig.setConfigData(protocol, host, "ProxyHost", '127.0.0.1')
        self.slaveConfig.setConfigData(protocol, host, "ProxyPort", '8080')

and the proxy configuration is STILL *not* working.

On 10/25/07, Andres Riancho <andres.riancho at gmail.com> wrote:
> 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
>


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


More information about the konq-e mailing list