-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check and improve proxy support #336
Comments
I just did a test on Mac M2 with KNIME 5.2.3, below is what I found,
import os
os.environ['HTTP_PROXY'] = 'http://localhost:8080'
os.environ['HTTPS_PROXY'] = 'http://localhost:8080'
|
Once os.environ was set all nodes that use the request package used the proxy. But the OSMnx nodes still didn't work even so the documentation states that it uses the request package that can be configure via _kwargs. @koettert to check with the Python team about: "Does os.setenv(...) not work but os.environ dose?" @wybert please check out the above mentioned solutions and try to understand from reading their code and the OSMnx code why setting the proxy via os.environ doesn't work |
@koettert There is a mistake when testing with OSMNx, OSMNx will use cache for executed query. That's why OSMNx seems never use proxy during my test (It actually doesn't make a request at all). import os
os.environ['HTTP_PROXY'] = 'http://localhost:8080'
os.environ['HTTPS_PROXY'] = 'http://localhost:8080' Or proxies = {
"http": "http://localhost:8080",
"https": "http://localhost:8080",
}
ox.settings.requests_kwargs = {'proxies': proxies, 'verify': False} |
The goal of this ticket is to ensure that all geospatial nodes use the newly available proxy settings. With AP-20960 that was released with KNIME AP 5.2 the Python framework sets the proxy information configured via the HTTP_PROXY and HTTPS_PROXY environment variables (via
os.setenv(...)os.environ). In addition the proxy settings can be retrieved viaknext.get_proxy_settings()
For debugging and testing we can use https://mitmproxy.org/ and Ask Adrian for help.
Steps to do:
The text was updated successfully, but these errors were encountered: