mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
HTTP_PROXY, HTTPS_PROXY and NO_PROXY now work for every outgoing request that goes through the SSRF guard: webhooks, imports, avatar downloads, list sync. The destination is still resolved once and checked against the blocked ranges first, and the proxy is handed that checked address, never the name: an http:// request goes to the proxy in absolute form on the pinned address with the real Host, an https:// one through a CONNECT tunnel to the pinned address with TLS still verified against the real name (and WEBHOOK_TLS_CA_CERT). A name resolving to an internal address is refused before the proxy is asked anything. Proxy credentials in the URL become Proxy-Authorization. The snap gets http-proxy, https-proxy and no-proxy. tests/outboundProxy.test.cjs runs a real proxy on loopback: the pinned address, the Host header, the credentials, the CONNECT authority, and that a refused destination never reaches the proxy. Thanks to gbarre and xet7 ! Fixes #1455.