Files
MTProxyMax/mtproxymax.sh
SamNet-dev 10ca34513c Fix Telegram bot: IP caching, metrics efficiency, escaping, error messages
- Add get_cached_ip() with 5-minute TTL to bot service; replaces raw
  curl to api.ipify.org in tg_send(), /mp_link, /mp_add, /mp_rotate
- Escape server label with _esc() in tg_send() and tg_send_photo()
  headers so underscores/asterisks don't break Telegram Markdown
- Escape label with _esc() in all error message strings across handlers
- Refactor update_traffic() to fetch /metrics once and pass raw data
  to get_user_stats_tg() — eliminates one curl per user per interval
- get_user_stats_tg() accepts pre-fetched metrics as optional arg
- /mp_secrets fetches metrics once before iterating users
- Fix /mp_remove: check label existence first, then guard against
  removing the last secret with a clear dedicated error message
2026-02-17 10:04:14 -06:00

217 KiB