Compare commits
6
Commits
main
..
6399ca7f4c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6399ca7f4c | ||
|
|
232113336e | ||
|
|
4972401ec2 | ||
|
|
55774ba9c7 | ||
|
|
eefaaded23 | ||
|
|
d32e474025 |
@@ -6,35 +6,35 @@ on:
|
|||||||
telemt_commit:
|
telemt_commit:
|
||||||
description: 'Telemt commit hash to build from'
|
description: 'Telemt commit hash to build from'
|
||||||
required: true
|
required: true
|
||||||
default: 'ad1940b'
|
default: 'd38d7f2'
|
||||||
version_tag:
|
version_tag:
|
||||||
description: 'Version tag (e.g. 3.0.15-ad1940b)'
|
description: 'Version tag (e.g. 3.0.13-d38d7f2)'
|
||||||
required: true
|
required: true
|
||||||
default: '3.0.15-ad1940b'
|
default: '3.0.13-d38d7f2'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: registry.samnet.dev
|
REGISTRY: git.samnet.dev
|
||||||
|
PUSH_REGISTRY: registry.samnet.dev
|
||||||
IMAGE_NAME: mtproxymax-telemt
|
IMAGE_NAME: mtproxymax-telemt
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up QEMU (for ARM builds)
|
- name: Set up QEMU (for ARM builds)
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
with:
|
||||||
|
cache-image: false
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Log in to Container Registry
|
- name: Log in to Gitea Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.PUSH_REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ gitea.actor }}
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Create Dockerfile
|
- name: Create Dockerfile
|
||||||
@@ -60,7 +60,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Lowercase owner
|
- name: Lowercase owner
|
||||||
id: owner
|
id: owner
|
||||||
run: echo "name=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
|
run: echo "name=$(echo '${{ gitea.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Build and push multi-arch image
|
- name: Build and push multi-arch image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
@@ -71,7 +71,7 @@ jobs:
|
|||||||
build-args: |
|
build-args: |
|
||||||
TELEMT_COMMIT=${{ github.event.inputs.telemt_commit }}
|
TELEMT_COMMIT=${{ github.event.inputs.telemt_commit }}
|
||||||
tags: |
|
tags: |
|
||||||
${{ env.REGISTRY }}/${{ steps.owner.outputs.name }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.version_tag }}
|
${{ env.PUSH_REGISTRY }}/${{ steps.owner.outputs.name }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.version_tag }}
|
||||||
${{ env.REGISTRY }}/${{ steps.owner.outputs.name }}/${{ env.IMAGE_NAME }}:latest
|
${{ env.PUSH_REGISTRY }}/${{ steps.owner.outputs.name }}/${{ env.IMAGE_NAME }}:latest
|
||||||
cache-from: type=gha
|
cache-from: type=registry,ref=${{ env.PUSH_REGISTRY }}/${{ steps.owner.outputs.name }}/${{ env.IMAGE_NAME }}:buildcache
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=registry,ref=${{ env.PUSH_REGISTRY }}/${{ steps.owner.outputs.name }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
.claude/
|
||||||
@@ -24,16 +24,17 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
> **Note:** Please visit the [GitHub repository](https://github.com/SamNet-dev/MTProxyMax) for the latest updates. If you have an issue, please open an issue there.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
MTProxyMax is a full-featured Telegram MTProto proxy manager powered by the **telemt 3.x Rust engine**. It wraps the raw proxy engine with an interactive TUI, a complete CLI, a Telegram bot for remote management, per-user access control, traffic monitoring, proxy chaining, and automatic updates — all in a single bash script.
|
MTProxyMax is a full-featured Telegram MTProto proxy manager powered by the **telemt 3.x Rust engine**. It wraps the raw proxy engine with an interactive TUI, a complete CLI, a Telegram bot for remote management, per-user access control, traffic monitoring, proxy chaining, and automatic updates — all in a single bash script.
|
||||||
|
|
||||||
<img src="main.png" width="600" alt="MTProxyMax Main Menu"/>
|
<img src="main.png" width="600" alt="MTProxyMax Main Menu"/>
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo bash -c "$(curl -fsSL https://dl.samnettech.com/SamNet-dev/MTProxyMax/raw/branch/main/install.sh)"
|
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,7 +58,12 @@ Most MTProxy tools give you a proxy and a link. That's it. MTProxyMax gives you
|
|||||||
### One-Line Install
|
### One-Line Install
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo bash -c "$(curl -fsSL https://dl.samnettech.com/SamNet-dev/MTProxyMax/raw/branch/main/install.sh)"
|
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)"
|
||||||
```
|
```
|
||||||
|
|
||||||
The interactive wizard walks you through everything: port, domain, first user secret, and optional Telegram bot setup.
|
The interactive wizard walks you through everything: port, domain, first user secret, and optional Telegram bot setup.
|
||||||
@@ -65,11 +71,13 @@ The interactive wizard walks you through everything: port, domain, first user se
|
|||||||
### Manual Install
|
### Manual Install
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -fsSL https://dl.samnettech.com/SamNet-dev/MTProxyMax/raw/branch/main/mtproxymax.sh -o mtproxymax
|
curl -fsSL https://git.samnet.dev/SamNet-dev/MTProxyMax/raw/branch/main/mtproxymax.sh -o mtproxymax
|
||||||
chmod +x mtproxymax
|
chmod +x mtproxymax
|
||||||
sudo ./mtproxymax install
|
sudo ./mtproxymax install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Alternative (mirror): `curl -fsSL https://dl.samnet.dev/SamNet-dev/MTProxyMax/raw/branch/main/mtproxymax.sh -o mtproxymax`
|
||||||
|
|
||||||
### After Install
|
### After Install
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -504,19 +512,6 @@ mtproxymax telegram remove # Remove bot completely
|
|||||||
|
|
||||||
## 📋 Changelog
|
## 📋 Changelog
|
||||||
|
|
||||||
### v1.3.0 — Engine v3.0.15
|
|
||||||
|
|
||||||
**Engine Upgrade (v3.0.7 → v3.0.15):**
|
|
||||||
|
|
||||||
- **ME Connection Hardening** — Better error handling and recovery for lost middle-end connections
|
|
||||||
- **Secure Payload Fixes** — Payload length validation and ME protocol hardening
|
|
||||||
- **Bounded Backpressure** — Semaphore-based global gate prevents overload, ME buffer reuse for efficiency
|
|
||||||
- **TLS Full Certificate** — New TLS fetcher drafts real certificates in ServerHello, with TTL-based refresh
|
|
||||||
- **ME Pool Reinit** — Soft-staged reinit without reconcile, plus reinit polishing for smoother reconnects
|
|
||||||
- **Desync Forensics** — Full forensics for desync detection and debugging
|
|
||||||
- **ME Pool Hardswap** — Hard connection swap with softer fallback for graceful pool rotation
|
|
||||||
- **ME Pool Health + Rotation** — Active health checking with automatic rotation of unhealthy connections
|
|
||||||
|
|
||||||
### v1.2.0 — Engine v3.0.7 + Custom IP
|
### v1.2.0 — Engine v3.0.7 + Custom IP
|
||||||
|
|
||||||
**Engine Upgrade (v3.0.4 → v3.0.7):**
|
**Engine Upgrade (v3.0.4 → v3.0.7):**
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# MTProxyMax Quick Installer — SamNet Technologies
|
# MTProxyMax Quick Installer — SamNet Technologies
|
||||||
# Usage: curl -sL https://dl.samnettech.com/SamNet-dev/MTProxyMax/raw/branch/main/install.sh | sudo bash
|
# Usage: curl -sL https://git.samnet.dev/SamNet-dev/MTProxyMax/raw/branch/main/install.sh | sudo bash
|
||||||
set -e
|
set -e
|
||||||
SCRIPT_URL="https://dl.samnettech.com/SamNet-dev/MTProxyMax/raw/branch/main/mtproxymax.sh"
|
SCRIPT_URL="https://git.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
|
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
|
curl -fsSL "$SCRIPT_URL" -o /tmp/mtproxymax.sh && bash /tmp/mtproxymax.sh install && rm -f /tmp/mtproxymax.sh
|
||||||
|
|||||||
+10
-10
@@ -22,10 +22,10 @@ UPSTREAMS_FILE="${INSTALL_DIR}/upstreams.conf"
|
|||||||
BACKUP_DIR="${INSTALL_DIR}/backups"
|
BACKUP_DIR="${INSTALL_DIR}/backups"
|
||||||
CONTAINER_NAME="mtproxymax"
|
CONTAINER_NAME="mtproxymax"
|
||||||
DOCKER_IMAGE_BASE="mtproxymax-telemt"
|
DOCKER_IMAGE_BASE="mtproxymax-telemt"
|
||||||
TELEMT_MIN_VERSION="3.0.15"
|
TELEMT_MIN_VERSION="3.0.13"
|
||||||
TELEMT_COMMIT="ad1940b" # Pinned: v3.0.15 — ME Pool Health/Rotation, TLS cert TTL, desync forensics
|
TELEMT_COMMIT="d38d7f2" # Pinned: v3.0.13 — ME pool hardswap, TLS full cert, stability fixes
|
||||||
GITHUB_REPO="SamNet-dev/MTProxyMax"
|
GITHUB_REPO="SamNet-dev/MTProxyMax"
|
||||||
REGISTRY_IMAGE="registry.samnet.dev/samnet-dev/mtproxymax-telemt"
|
REGISTRY_IMAGE="git.samnet.dev/samnet-dev/mtproxymax-telemt"
|
||||||
|
|
||||||
# Bash version check
|
# Bash version check
|
||||||
if [ "${BASH_VERSINFO[0]:-0}" -lt 4 ]; then
|
if [ "${BASH_VERSINFO[0]:-0}" -lt 4 ]; then
|
||||||
@@ -864,7 +864,7 @@ wait_for_docker() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build telemt Docker image from latest GitHub release binary
|
# Build telemt Docker image from source
|
||||||
build_telemt_image() {
|
build_telemt_image() {
|
||||||
local force="${1:-false}"
|
local force="${1:-false}"
|
||||||
|
|
||||||
@@ -2486,8 +2486,8 @@ check_update_sha_bg() {
|
|||||||
{
|
{
|
||||||
local _remote_sha
|
local _remote_sha
|
||||||
_remote_sha=$(curl -fsSL --connect-timeout 5 --max-time 10 \
|
_remote_sha=$(curl -fsSL --connect-timeout 5 --max-time 10 \
|
||||||
"https://dl.samnettech.com/api/v1/repos/${GITHUB_REPO}/branches/main" \
|
"https://api.github.com/repos/${GITHUB_REPO}/commits/main" \
|
||||||
2>/dev/null | grep -o '"id":"[a-f0-9]*"' | head -1 | cut -d'"' -f4) || true
|
-H "Accept: application/vnd.github.sha" 2>/dev/null) || true
|
||||||
|
|
||||||
# Must be 40 lowercase hex chars
|
# Must be 40 lowercase hex chars
|
||||||
if [ -n "$_remote_sha" ] && [ ${#_remote_sha} -ge 40 ]; then
|
if [ -n "$_remote_sha" ] && [ ${#_remote_sha} -ge 40 ]; then
|
||||||
@@ -2523,7 +2523,7 @@ self_update() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local _script_updated=false
|
local _script_updated=false
|
||||||
local _url="https://dl.samnettech.com/${GITHUB_REPO}/raw/branch/main/mtproxymax.sh"
|
local _url="https://raw.githubusercontent.com/${GITHUB_REPO}/main/mtproxymax.sh"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
log_info "Checking for script updates..."
|
log_info "Checking for script updates..."
|
||||||
@@ -2579,8 +2579,8 @@ self_update() {
|
|||||||
# Save new commit SHA as baseline
|
# Save new commit SHA as baseline
|
||||||
local _new_sha
|
local _new_sha
|
||||||
_new_sha=$(curl -fsSL --connect-timeout 5 --max-time 10 \
|
_new_sha=$(curl -fsSL --connect-timeout 5 --max-time 10 \
|
||||||
"https://dl.samnettech.com/api/v1/repos/${GITHUB_REPO}/branches/main" \
|
"https://api.github.com/repos/${GITHUB_REPO}/commits/main" \
|
||||||
2>/dev/null | grep -o '"id":"[a-f0-9]*"' | head -1 | cut -d'"' -f4) || true
|
-H "Accept: application/vnd.github.sha" 2>/dev/null) || true
|
||||||
if [ -n "$_new_sha" ] && [ ${#_new_sha} -ge 40 ]; then
|
if [ -n "$_new_sha" ] && [ ${#_new_sha} -ge 40 ]; then
|
||||||
_new_sha="${_new_sha:0:40}"
|
_new_sha="${_new_sha:0:40}"
|
||||||
case "$_new_sha" in
|
case "$_new_sha" in
|
||||||
@@ -5388,7 +5388,7 @@ show_info_autoupdate() {
|
|||||||
echo -e " itself with a single command."
|
echo -e " itself with a single command."
|
||||||
echo ""
|
echo ""
|
||||||
echo -e " ${BOLD}Update process:${NC}"
|
echo -e " ${BOLD}Update process:${NC}"
|
||||||
echo -e " 1. Query repository for the latest release version"
|
echo -e " 1. Query GitHub API for the latest release version"
|
||||||
echo -e " 2. Compare with your installed version"
|
echo -e " 2. Compare with your installed version"
|
||||||
echo -e " 3. If newer, prompt for confirmation"
|
echo -e " 3. If newer, prompt for confirmation"
|
||||||
echo -e " 4. Backup current script to ${DIM}/opt/mtproxymax/backups/${NC}"
|
echo -e " 4. Backup current script to ${DIM}/opt/mtproxymax/backups/${NC}"
|
||||||
|
|||||||
Reference in New Issue
Block a user