GIScience / orstools-qgis-plugin

Plugin for QGIS with a set of tools to use openrouteservice API´s, based on openstreetmap
https://plugins.qgis.org/plugins/ORStools/
MIT License
92 stars 31 forks source link

OSMTools via Proxy?! #58

Closed ghost closed 5 years ago

ghost commented 6 years ago

It looks like OSMTools don't work in a proxy server environment. Would it be possible for the plugin to use the proxy settings configured in the QGIS Network Settings? Or is there already a workaround?

Maybe one of the following is useful? https://qgis.org/api/classQgsNetworkAccessManager.html https://geogear.wordpress.com/2014/04/12/setting-proxy-parameter-in-qgis-plugins-how-to/

Error Message: "...requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.openrouteservice.org', port=443): Max retries exceeded with url: /geocoding?location=9.16237%2C48.77638&api_key=[XXX] (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000000056724E0>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',))..."

nilsnolde commented 6 years ago

Perfect, thanks for the tip!

nilsnolde commented 5 years ago

Ok, @xenovortex changed it in the #70 PR and it's available in leo-proxy branch.

If you like, pls test and revert if everything works as expected. If no answer, I'll merge into master soon and see if anyone complains.