Describe the Feature
When downloading the ngrok bindary, pyngrok uses urlopen. This means we go through the default filter chain, as documented here, so if the HTTP_PROXY environment variable is used, or if another default Python ProxyHandler is setup, this should work fine. However, this is not documented anywhere in pyngrok's docs.
In addition, urlopen takes a cafile or capath, but we never pass these vars. These optional variables should be accepted (and documented alongside the HTTP_PROXY usage) so people who are behind a corporate or similar proxy can still make use of pyngrok.
Describe Alternative Solutions/Workarounds
In the meantime, this can be worked around by using reviewing Python's own documentation on how default ProxyHandler's work (linked above) and extending what is in installer.py. Additionally, pyngrok only calls the code in installer.py if no ngrok binary is found at the given ngrok_path, so pre-installing the ngrok binary using your own code prior to calling any method in the ngrok module, and/or implementing your own install_ngrok() and _download_file(), should let you workaround this until it is supported.
Describe the Feature When downloading the
ngrok
bindary,pyngrok
usesurlopen
. This means we go through the default filter chain, as documented here, so if theHTTP_PROXY
environment variable is used, or if another default PythonProxyHandler
is setup, this should work fine. However, this is not documented anywhere inpyngrok
's docs.In addition,
urlopen
takes acafile
orcapath
, but we never pass these vars. These optional variables should be accepted (and documented alongside theHTTP_PROXY
usage) so people who are behind a corporate or similar proxy can still make use ofpyngrok
.Describe Alternative Solutions/Workarounds In the meantime, this can be worked around by using reviewing Python's own documentation on how default
ProxyHandler
's work (linked above) and extending what is ininstaller.py
. Additionally,pyngrok
only calls the code ininstaller.py
if nongrok
binary is found at the givenngrok_path
, so pre-installing thengrok
binary using your own code prior to calling any method in thengrok
module, and/or implementing your owninstall_ngrok()
and_download_file()
, should let you workaround this until it is supported.