[Qgis-developer] http proxy support

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Fri Aug 15 15:18:30 EDT 2008


2008/8/15 Tim Sutton <tim at linfiniti.com>:

> No setApplicationProxy as I have written it in qgisapp is for http
> proxying not socks and as far as I know its working for proxy users
> using e.g. wms plugin, wfs plugin etc.
>
> http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qnetworkproxy.html
> has some examples and further explanation.

 Ah. What I need is HttpCachingProxy. Sadly my PyQt (4.3.3) doesn't
have it, and what Qgis does is the HttpProxy which, as it explains,
uses the CONNECT call to tunnel out.

 The docs you pointed me to strengthens my argument. HttpProxy types
are for tunnelling all networking out through an open port 80, and
HttpCachingProxy types are for web access only:

"The application's default proxy should not be set to the type
HttpCachingProxy, since normal, outgoing TCP connections will fail,
including those necessary to send the HTTP request in the first
place."

 Those of us behind an http caching proxy (e.g. squid) need any QHttp
requests to have an HttpCachingProxy set on them. Currently I only see
this can be done on each QHttp request individually. Python's urllib
does this, and gets its proxy settings from the system (env variables
in Linux). It does it right.

 In summary, Qt's proxy system isn't quite developed yet...

Barry


More information about the Qgis-developer mailing list