From 1631895d5a05d3489ec82be72d8f599b1d217065 Mon Sep 17 00:00:00 2001 From: Teknium Date: Wed, 8 Apr 2026 13:45:04 -0700 Subject: [PATCH] docs(telegram): add proxy support section Documents the proxy env var support added in PR #3591 (salvage of #3411 by @kufufu9). Covers HTTPS_PROXY/HTTP_PROXY/ALL_PROXY precedence, configuration methods, and scope. --- website/docs/user-guide/messaging/telegram.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/website/docs/user-guide/messaging/telegram.md b/website/docs/user-guide/messaging/telegram.md index a59b73ca5..4e4495ad2 100644 --- a/website/docs/user-guide/messaging/telegram.md +++ b/website/docs/user-guide/messaging/telegram.md @@ -463,6 +463,40 @@ platforms: You usually don't need to configure this manually. The auto-discovery via DoH handles most restricted-network scenarios. The `TELEGRAM_FALLBACK_IPS` env var is only needed if DoH is also blocked on your network. ::: +## Proxy Support + +If your network requires an HTTP proxy to reach the internet (common in corporate environments), the Telegram adapter automatically reads standard proxy environment variables and routes all connections through the proxy. + +### Supported variables + +The adapter checks these environment variables in order, using the first one that is set: + +1. `HTTPS_PROXY` +2. `HTTP_PROXY` +3. `ALL_PROXY` +4. `https_proxy` / `http_proxy` / `all_proxy` (lowercase variants) + +### Configuration + +Set the proxy in your environment before starting the gateway: + +```bash +export HTTPS_PROXY=http://proxy.example.com:8080 +hermes gateway +``` + +Or add it to `~/.hermes/.env`: + +```bash +HTTPS_PROXY=http://proxy.example.com:8080 +``` + +The proxy applies to both the primary transport and all fallback IP transports. No additional Hermes configuration is needed — if the environment variable is set, it's used automatically. + +:::note +This covers the custom fallback transport layer that Hermes uses for Telegram connections. The standard `httpx` client used elsewhere already respects proxy env vars natively. +::: + ## Message Reactions The bot can add emoji reactions to messages as visual processing feedback: