Spaces:
Sleeping
Sleeping
Commit History
-
feat: telegram-proxy.cjs intercepts fetch() to bypass HF DNS block
HF Spaces blocks DNS for api.telegram.org. grammY uses Node 22's built-in fetch (undici) which bypasses dns.lookup monkey-patching. New approach: 1. sync_hf.py probes Telegram API endpoints at startup (no bot token needed) 2. If official API unreachable, selects first working mirror 3. Sets TELEGRAM_API_ROOT env var for the Node process 4. telegram-proxy.cjs (loaded via --require) intercepts globalThis.fetch() and rewrites api.telegram.org URLs to the working mirror Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>d88aa6c