Closed papillonyi closed 4 weeks ago
I think this is correct, we don't support the http_proxy or https_proxy env vars at present.
We use the finch library. We would need to pass the conn_opts
to the pool configuration: https://hexdocs.pm/finch/Finch.html#start_link/1-pool-configuration-options
This in turn needs to have a proxy
value containing an appropriate tuple: https://hexdocs.pm/mint/1.5.2/Mint.HTTP.html#connect/4
An example is in this bug report (but note this doesn't support https proxies): https://github.com/sneako/finch/issues/157
Our pool configuration is here: https://github.com/teslamate-org/teslamate/blob/master/lib/teslamate/http.ex#L2-L7
I think our pool configuration would need to be changed to occur at run-time, not build-time.
Allow users to customize the API URL, enabling them to use a proxy server (e.g., http://your_proxy_address:api.github.com). This way, different servers can employ distinct proxies.
Thanks for reporting. From the logs you provided it looks like only OpenSteetMap is failing, thus I assume you are in an area where this is blocked by some sort of proxy, geoblocking etc.
In addition, I do see the additional effort to support http_proxy via env variables will not lead to an improved product. You can easily use TeslaMate behind a reverse proxy, which is designed to be configurable and archive what you try to build as of now.
Thanks for reporting. From the logs you provided it looks like only OpenSteetMap is failing, thus I assume you are in an area where this is blocked by some sort of proxy, geoblocking etc.
In addition, I do see the additional effort to support http_proxy via env variables will not lead to an improved product. You can easily use TeslaMate behind a reverse proxy, which is designed to be configurable and archive what you try to build as of now.
I'm sorry, I don't quite understand how to use a reverse proxy for egress. I thought it was only for ingress. Could you clarify?
I'm sorry, I don't quite understand how to use a reverse proxy for egress. I thought it was only for ingress. Could you clarify?
You are right, I mean you can use a proxy server for egress without the need for TeslaMate to support it directly
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Is there an existing issue for this?
What happened?
I'm running TeslaMate on my NAS, which requires a proxy to connect to the internet. I've set the http_proxy and https_proxy environment variables, but it's still trying to connect directly. Any advice on how to fix this?
Expected Behavior
By setting the http_proxy and https_proxy, TeslaMate can connect to the internet through my proxy server.
Steps To Reproduce
TeslaMate is deployed with Docker Compose and should connect via the proxy, but it’s not working. However, connecting to the internet using curl works.
Relevant log output
Screenshots
No response
Additional data
No response
Type of installation
Docker
Version
v1.30.1