Skip to content
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

https_proxy env is ignored #54

Closed
thoomasb opened this issue May 15, 2021 · 0 comments · Fixed by #55
Closed

https_proxy env is ignored #54

thoomasb opened this issue May 15, 2021 · 0 comments · Fixed by #55

Comments

@thoomasb
Copy link

It is currently not possible to use threema-gateway with a web proxy, as aiohttp does not check the $https_proxy environment variable unless it is explicitly told to do so.

See aiohttp documentation: https://docs.aiohttp.org/en/stable/client_advanced.html?highlight=proxy

threema-gateway could either allow to submit the web proxy setting as command line option and pass it to aiohttp, or it could use trust_env to let aiohttp use $https_proxy.

It works for me by changing gateway/_gateway.py and pass trust_env=True to aiohttp:

        self._session = aiohttp.ClientSession(connector=connector, trust_env=True)

That way, aiohttp is instructed to use $https_proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant