telegram-warp-stabilize

Routes Telegram API traffic through sing-box WARP outbound to stabilize connections.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill telegram-warp-stabilize-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: telegram-warp-stabilize
Source: https://github.com/CHENHUI-X/toolbox/tree/main/custom-skills/devops/telegram-warp-stabilize
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill telegram-warp-stabilize-chenhui-x

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Telegram bots and gateways hosted on GCP frequently disconnect from the Telegram API (15-30 times per day), causing stuck "typing" indicators, delayed messages, and missed updates. This Skill stabilizes the connection by routing Telegram traffic through Cloudflare WARP instead of the unstable GCP native network. ## Core Features & Use Cases - Traffic Routing via WARP: Adds sing-box route rules that direct Telegram API domains and IP ranges (149.154.x.x, 91.108.x.x) through the warp-out WireGuard outbound. - SOCKS5 Proxy Configuration: Sets TELEGRAM_PROXY to the local sing-box socks-in endpoint (127.0.0.1:10808) so the gateway uses the WARP path. - Verification Workflow: Provides log-based checks to confirm the proxy is detected and that network-error reconnect counts drop. - Use Case: A Hermes gateway on GCP loses Telegram connectivity dozens of times daily; after applying this routing, it runs 29+ hours without a single disconnect. ## Quick Start Ask the agent to configure sing-box so that all Telegram API traffic goes through the WARP outbound and update the gateway proxy environment variable accordingly.

Frequently Asked Questions about telegram-warp-stabilize

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Telegram API connection drops on GCP?

Route Telegram traffic through a Cloudflare WARP outbound in sing-box instead of the GCP native network. Add route rules for api.telegram.org and Telegram IP ranges (149.154.160.0/20, 91.108.4.0/22, 91.108.56.0/22) pointing to warp-out, then set the bot's proxy to the local sing-box SOCKS5 endpoint.

How to route specific domains through WARP in sing-box?

Add a rule in the sing-box route.rules array matching the domain (e.g., api.telegram.org) or ip_cidr ranges, with outbound set to warp-out. Restart sing-box with systemctl restart sing-box for the rules to take effect.

What are the prerequisites for using WARP with sing-box?

sing-box must already be installed and running with a warp-out WireGuard endpoint configured under endpoints, plus a socks-in inbound listening on port 10808. If warp-out is missing, you must first configure the Cloudflare WARP WireGuard endpoint.

Why should the Telegram proxy use 127.0.0.1 instead of an external IP?

Using 127.0.0.1 keeps traffic on the local sing-box instance so routing rules apply correctly. Pointing to an external IP loops traffic back through the GCP network itself, which defeats the purpose of the WARP proxy.

How do I verify the Telegram proxy is working after configuration?

Check the gateway log for "Proxy detected" entries using grep on ~/.hermes/logs/gateway.log. Then count "polling restarted after network error" occurrences over time; a successful setup shows the disconnect count dropping to near zero.