Commit Graph

14 Commits

Author SHA1 Message Date
SamNet-dev
49ca2f8424 Upgrade telemt engine to v3.0.7 (Fake TLS V2, config reload, frame fixes) 2026-02-21 02:39:47 -06:00
SamNet-dev
d1881aab72 Add custom IP support for proxy links 2026-02-19 15:37:47 -06:00
SamNet-dev
e62512e3e0 Upgrade telemt engine to v3.0.4 and centralize update system 2026-02-19 15:19:14 -06:00
SamNet-dev
14425a3cc0 Update resource limit prompts to show unlimited as default 2026-02-19 02:40:12 -06:00
SamNet-dev
bca1fda425 Remove default CPU/memory caps and add LTO build optimization
- Default PROXY_CPUS and PROXY_MEMORY now empty (use full system resources)
- Docker run skips --cpus/--memory flags when not set
- Dockerfile: enable LTO, codegen-units=1 for optimized binary
2026-02-19 02:32:08 -06:00
SamNet-dev
f571f05c61 Upgrade telemt engine to v3.0.3 (cf71703) 2026-02-18 12:58:33 -06:00
SamNet-dev
86519d1042 Remove proxy URLs from bot messages to prevent Telegram bans
Send split details (server/port/secret) + QR images instead of
tg://proxy and t.me/proxy links that trigger auto-detection.
2026-02-18 12:45:00 -06:00
SamNet-dev
c132621c55 Fix box border misalignment — normalize literal \033 in _strlen 2026-02-17 15:55:50 -06:00
SamNet-dev
a78d8f763c Add https://t.me link to installation summary box 2026-02-17 15:22:47 -06:00
SamNet-dev
741f99a0f5 Replace release-based update with commit SHA tracking
- check_update_sha_bg(): background SHA fetch on TUI startup, sets
  badge file when new commits are available on main
- Main menu shows update banner when badge exists
- self_update(): download from main, SHA256 compare, backup, install,
  auto-regenerate + restart Telegram service after update
- Works without GitHub releases — every push to main is detectable
2026-02-17 13:49:51 -06:00
SamNet-dev
65ad3c8999 Fix Telegram messages: expand literal \n to real newlines before sending
In bash, \n in double-quoted strings is literal backslash+n, not a
newline character. curl --data-urlencode sends them as %5Cn and
Telegram renders them literally in message text, causing \n\n to
appear visibly around proxy links.

Fix: run msg through printf '%b' in telegram_send_message() and
tg_send() to convert \n to actual newlines (0x0A) before the string
is URL-encoded and sent to the Telegram API.

Validated: _esc() markdown escapes (\_,  \*) are unaffected since
underscore and asterisk are not printf escape sequences.
2026-02-17 13:38:53 -06:00
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
SamNet-dev
a36759dc1d Add geo-blocking, optimize TUI rendering, add README
- Implement real iptables/ipset geo-blocking with ipdeny.com CIDR lists
- Tag-based cleanup (mtproxymax-geoblock comment, mtpmax_ ipset prefix)
- Batch ipset loading via restore for fast rule application
- Auto-reapply geo-blocks on proxy start, full cleanup on uninstall
- Fix _repeat() and _strlen() to use pure bash (no subprocesses)
- Cache docker inspect result across main menu renders
- Cache get_public_ip() for 5 minutes, reduce timeout 5s -> 3s
- Parse proxy stats with single read instead of 3 awk subprocesses
- Cache _cached_start_epoch outside render loop
- Add comprehensive README with feature docs, comparison table,
  user management recipes, and practical examples
2026-02-17 09:49:17 -06:00
SamNet-dev
5ee6e0fdf9 Initial release — MTProxyMax v1.0.0 2026-02-17 01:06:48 -06:00