[Feature Request] Add forward proxy support via HTTP_PROXY / HTTPS_PROXY / NO_PROXY environment variables #6755
Unanswered
aewtemp
asked this question in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Summary
Homepage currently ignores standard system proxy environment variables (
HTTP_PROXY,HTTPS_PROXY,NO_PROXY). All outbound HTTP requests made by Homepage (e.g. for widgets fetching data from external services) bypass any configured system or container-level proxy, making Homepage unusable in environments that require egress traffic to go through a forward proxy.Problem
In corporate or restricted network environments, outbound internet access is commonly routed through a forward proxy (e.g. Squid, Tinyproxy, corporate MITM proxies). The standard convention on Linux — honored by
curl,wget, and most well-behaved applications — is to read the following environment variables:HTTP_PROXY/http_proxyHTTPS_PROXY/https_proxyNO_PROXY/no_proxyNode.js does not pick these up automatically for its built-in
fetch/http/httpsmodules. Homepage therefore needs to explicitly implement proxy support.Affected functionality: Any widget that makes outbound requests to the internet (e.g. Healthchecks.io, Uptime Kuma cloud, weather services, etc.) silently fails or returns
ENETUNREACHwhen behind a forward proxy.Proposed Solution
Integrate proxy-awareness into Homepage's HTTP client layer using the
proxy-agentnpm package (or the lower-levelproxy-from-env+https-proxy-agent), which together:HTTP_PROXY,HTTPS_PROXY,NO_PROXY(case-insensitive, lowercase takes precedence per convention)http.Agent/https.Agentthat routes requests through the configured proxyNO_PROXYexclusions for local/internal servicesThe agent would ideally be applied globally to all outbound requests made by Homepage, so individual widgets do not need to be modified.
Alternatively, once Node.js's native
--use-env-proxyflag stabilizes (currently experimental), Homepage could opt into it at startup.Expected Behavior
When
HTTP_PROXY=http://proxy.example.com:3128(and/orHTTPS_PROXY) is set in the environment, all outbound Homepage requests are routed through the specified proxy. Hosts listed inNO_PROXYare contacted directly, as expected.Current Behavior
Homepage ignores all proxy environment variables. Widgets that contact external services fail in proxy-only environments.
Environment
Additional Context
proxy-agentpackage is well-maintained, widely used, and purpose-built for exactly this use case.Other
No response
Beta Was this translation helpful? Give feedback.
All reactions