Compare commits

..
22 Commits
Author SHA1 Message Date
SamNet-dev 8deda0f96c fix: update all install URLs from GitHub to dl.samnet.dev
GitHub account suspended - migrate download URLs to Gitea mirror.
2026-02-24 08:05:09 -06:00
SamNet-dev b490190b89 Add changelog section and document engine v3.0.7 features 2026-02-21 02:49:23 -06:00
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 1ecfb9f2e6 Redesign README with badges, emojis, and collapsible sections 2026-02-18 12:50:46 -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 00d1de85ed Resize main menu screenshot in README 2026-02-17 13:58:32 -06:00
SamNet-dev c7e339ca50 Add main menu screenshot to README 2026-02-17 13:57:24 -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 fd38e1ff54 Remove traffic masking limitation from README
Removed the note about traffic masking from the limitations section.
2026-02-17 11:03:43 -06:00
SamNet-dev 199c779f4c Update README.md 2026-02-17 11:01:10 -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 4844799f4b Add telemt engine credit to README 2026-02-17 09:50:49 -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
5 changed files with 25 additions and 40 deletions
@@ -6,36 +6,36 @@ on:
telemt_commit:
description: 'Telemt commit hash to build from'
required: true
default: 'd38d7f2'
default: '1a525f7'
version_tag:
description: 'Version tag (e.g. 3.0.13-d38d7f2)'
description: 'Version tag (e.g. 3.0.7-1a525f7)'
required: true
default: '3.0.13-d38d7f2'
default: '3.0.7-1a525f7'
env:
REGISTRY: git.samnet.dev
PUSH_REGISTRY: registry.samnet.dev
REGISTRY: ghcr.io
IMAGE_NAME: mtproxymax-telemt
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Set up QEMU (for ARM builds)
uses: docker/setup-qemu-action@v3
with:
cache-image: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Gitea Container Registry
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.PUSH_REGISTRY }}
username: ${{ gitea.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create Dockerfile
run: |
@@ -60,7 +60,7 @@ jobs:
- name: Lowercase owner
id: owner
run: echo "name=$(echo '${{ gitea.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
run: echo "name=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
- name: Build and push multi-arch image
uses: docker/build-push-action@v6
@@ -71,7 +71,7 @@ jobs:
build-args: |
TELEMT_COMMIT=${{ github.event.inputs.telemt_commit }}
tags: |
${{ env.PUSH_REGISTRY }}/${{ steps.owner.outputs.name }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.version_tag }}
${{ env.PUSH_REGISTRY }}/${{ steps.owner.outputs.name }}/${{ env.IMAGE_NAME }}:latest
cache-from: type=registry,ref=${{ env.PUSH_REGISTRY }}/${{ steps.owner.outputs.name }}/${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.PUSH_REGISTRY }}/${{ steps.owner.outputs.name }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
${{ env.REGISTRY }}/${{ steps.owner.outputs.name }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.version_tag }}
${{ env.REGISTRY }}/${{ steps.owner.outputs.name }}/${{ env.IMAGE_NAME }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
-3
View File
@@ -1,3 +0,0 @@
__pycache__/
*.pyc
.claude/
+1 -13
View File
@@ -28,11 +28,6 @@ MTProxyMax is a full-featured Telegram MTProto proxy manager powered by the **te
<img src="main.png" width="600" alt="MTProxyMax Main Menu"/>
```bash
sudo bash -c "$(curl -fsSL https://git.samnet.dev/SamNet-dev/MTProxyMax/raw/branch/main/install.sh)"
```
Alternative (mirror, for restricted regions):
```bash
sudo bash -c "$(curl -fsSL https://dl.samnet.dev/SamNet-dev/MTProxyMax/raw/branch/main/install.sh)"
```
@@ -57,11 +52,6 @@ Most MTProxy tools give you a proxy and a link. That's it. MTProxyMax gives you
### One-Line Install
```bash
sudo bash -c "$(curl -fsSL https://git.samnet.dev/SamNet-dev/MTProxyMax/raw/branch/main/install.sh)"
```
Alternative (mirror, for restricted regions):
```bash
sudo bash -c "$(curl -fsSL https://dl.samnet.dev/SamNet-dev/MTProxyMax/raw/branch/main/install.sh)"
```
@@ -71,13 +61,11 @@ The interactive wizard walks you through everything: port, domain, first user se
### Manual Install
```bash
curl -fsSL https://git.samnet.dev/SamNet-dev/MTProxyMax/raw/branch/main/mtproxymax.sh -o mtproxymax
curl -fsSL https://dl.samnet.dev/SamNet-dev/MTProxyMax/raw/branch/main/mtproxymax.sh -o mtproxymax
chmod +x mtproxymax
sudo ./mtproxymax install
```
Alternative (mirror): `curl -fsSL https://dl.samnet.dev/SamNet-dev/MTProxyMax/raw/branch/main/mtproxymax.sh -o mtproxymax`
### After Install
```bash
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash
# MTProxyMax Quick Installer — SamNet Technologies
# Usage: curl -sL https://git.samnet.dev/SamNet-dev/MTProxyMax/raw/branch/main/install.sh | sudo bash
# Usage: curl -sL https://dl.samnet.dev/SamNet-dev/MTProxyMax/raw/branch/main/install.sh | sudo bash
set -e
SCRIPT_URL="https://git.samnet.dev/SamNet-dev/MTProxyMax/raw/branch/main/mtproxymax.sh"
SCRIPT_URL="https://dl.samnet.dev/SamNet-dev/MTProxyMax/raw/branch/main/mtproxymax.sh"
if [ "$(id -u)" -ne 0 ]; then echo "Run as root: curl -sL $SCRIPT_URL | sudo bash" >&2; exit 1; fi
curl -fsSL "$SCRIPT_URL" -o /tmp/mtproxymax.sh && bash /tmp/mtproxymax.sh install && rm -f /tmp/mtproxymax.sh
+6 -6
View File
@@ -22,10 +22,10 @@ UPSTREAMS_FILE="${INSTALL_DIR}/upstreams.conf"
BACKUP_DIR="${INSTALL_DIR}/backups"
CONTAINER_NAME="mtproxymax"
DOCKER_IMAGE_BASE="mtproxymax-telemt"
TELEMT_MIN_VERSION="3.0.13"
TELEMT_COMMIT="d38d7f2" # Pinned: v3.0.13 — ME pool hardswap, TLS full cert, stability fixes
TELEMT_MIN_VERSION="3.0.7"
TELEMT_COMMIT="1a525f7" # Pinned: v3.0.7 — Fake TLS V2, config reload, ME frame fixes
GITHUB_REPO="SamNet-dev/MTProxyMax"
REGISTRY_IMAGE="git.samnet.dev/samnet-dev/mtproxymax-telemt"
REGISTRY_IMAGE="ghcr.io/samnet-dev/mtproxymax-telemt"
# Bash version check
if [ "${BASH_VERSINFO[0]:-0}" -lt 4 ]; then
@@ -864,7 +864,7 @@ wait_for_docker() {
return 1
}
# Build telemt Docker image from source
# Build telemt Docker image from latest GitHub release binary
build_telemt_image() {
local force="${1:-false}"
@@ -5384,7 +5384,7 @@ show_info_autoupdate() {
draw_header "AUTO-UPDATE"
echo ""
echo -e " ${BOLD}How Auto-Update works:${NC}"
echo -e " MTProxyMax checks for new releases and can update"
echo -e " MTProxyMax checks GitHub for new releases and can update"
echo -e " itself with a single command."
echo ""
echo -e " ${BOLD}Update process:${NC}"
@@ -5846,7 +5846,7 @@ show_about() {
draw_box_line " ${BOLD}Version:${NC} v${VERSION}" "$w"
draw_box_line " ${BOLD}Engine:${NC} telemt v$(get_telemt_version) (Rust)" "$w"
draw_box_line " ${BOLD}License:${NC} MIT" "$w"
draw_box_line " ${BOLD}Repository:${NC} git.samnet.dev/${GITHUB_REPO}" "$w"
draw_box_line " ${BOLD}GitHub:${NC} github.com/${GITHUB_REPO}" "$w"
draw_box_empty "$w"
draw_box_sep "$w"
draw_box_center "${BOLD}FEATURES${NC}" "$w"