Core: Support HTTP Proxy

Created on 14 Jun 2020  路  6Comments  路  Source: home-assistant/core

Hi,

I want to use HTTP proxy with HomeAssistant. It seems aiohttp supports reading HTTP_PROXY env var by setting trust_env=True when creating the client in https://github.com/home-assistant/core/blob/dev/homeassistant/helpers/aiohttp_client.py#L70 .

I can create a pull request but I was unsure.

Thanks

All 6 comments

Thank you for reaching out. We use GitHub for tracking issues, not for providing support or tracking feature requests.

If you want to suggest a feature, you should try our Community Forum: Feature Requests.

Implementing HTTP_PROXY in aiohttp will not do, as it is not the only HTTP client. Furthermore, we rely on external packages a lot, there is no guarantee they are using our client/session.

If you have additional questions, feel free to join our Discord chat server.

Thanks! 馃憤

@frenck I added the above argument to the mentioned file and it is working for me, I am not sure what do you mean by "Implementing HTTP_PROXY in aiohttp will not do".

It will not work in all cases, because not everything uses the home assistant session. Furthermore, it is not limited to aiohttp, a lot of components uses requests for example (not aiohttp).

Thanks for your reply @frenck .
It seems python-requests supports HTTP_PROXY environment variables by default without any configuration.

The problem remains, we do not control third-party libraries, which we have a lot and secondly, this is a feature request, which should go into the forums. Feel free to discuss it there further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

piitaya picture piitaya  路  3Comments

Elmardus picture Elmardus  路  3Comments

arangates picture arangates  路  3Comments

neonandu picture neonandu  路  3Comments

kirichkov picture kirichkov  路  3Comments