enricofer / go2streetview

22 stars 22 forks source link

Network proxies (exclusions) #14

Closed sebastian-r-schmidt closed 8 years ago

sebastian-r-schmidt commented 8 years ago

From our company network we need to access external data sources through a authenticating proxy server. In QGIS Settings you can configure that proxy server. So far so good, go2streetview does work.

But additionally, we need to set proxy exclusions (urls not to connect to through the proxy) for our internal Geodata servers as these aren't reachable through the proxy.

Unfortunately, when activating go2streetview these exceptions aren't working anymore, so access to internal datasource is tried through the proxy and doesn't work anymore.

proxy-settings

Anything we can do about that?

enricofer commented 8 years ago

Hi Sebastian, Unfortunately the api providing proxy connection to plugin doesn't support subnet exclusions: http://doc.qt.io/qt-5/qnetworkproxy.html It's possible to support this dealing directly with the http connection but it is a little bit tricky workaround. But I exclude to solve the problem in the short term.... Regards

sebastian-r-schmidt commented 8 years ago

Hi, thanks for your fast reply.

Could it be helpful to use some of the functionality QGIS does provide to overcome with those limitiations in QT? It seems that http://www.qgis.org/api/classQgsNetworkAccessManager.html does deal correctly with proxy exclusions. Is it reachable through the python API?

Kind regards, Sebastian

enricofer commented 8 years ago

Hi sebastian, perhaps you got it. Qgis guys wide exposed API. It is possible to assign to QWebview the QgsNetworkAccessManager in two lines of code. Evidently I was reinventing the wheel.... Please download, test and feedback: https://github.com/enricofer/go2streetview/archive/proxyingTest.zip Thank you

sebastian-r-schmidt commented 8 years ago

This works for us - I can access go2StreetView through our proxy and the exclusions for internal datasources are taken into respect as well. Great, this is really hepful.

Would be glad to find this in an "official" go2streetView release.

Kind regards, Sebastian

enricofer commented 8 years ago

Maybe soon, I'm working on other features. Regards