背景

服务器上的 Telemt MTProxy 需要升级,旧版本为 3.3.35,新版本为 3.3.39。

环境信息

  • 服务器 IP: 23.106.156.34:22
  • 配置文件: /etc/telemt/telemt.toml
  • systemd 服务名: telemt.service
  • SSH 密钥: ~/.ssh/telemt_root
  • 运行用户: telemt

升级步骤

1. 检查当前版本

1
2
3
ssh -i ~/.ssh/telemt_root -o StrictHostKeyChecking=no root@23.106.156.34
/usr/bin/telemt --version
# 输出: telemt 3.3.35

2. 查看新版本发布页

访问 github.com/telemt/telemt/releases,确认最新版本为 3.3.39 (Phasenverschiebung)

预编译包列表:

  • telemt-x86_64-linux-gnu.tar.gz — 适用于 glibc 系统(Debian、Ubuntu 等)
  • telemt-aarch64-linux-gnu.tar.gz — 适用于 ARM64
  • telemt-x86_64-linux-musl.tar.gz — 适用于 musl 系统(Alpine 等)

本服务器为 Debian x86_64,选择 telemt-x86_64-linux-gnu.tar.gz

3. 下载并校验

1
2
3
4
5
6
7
8
9
# SSH 进入服务器
ssh -i ~/.ssh/telemt_root -o StrictHostKeyChecking=no root@23.106.156.34

# 下载新版本
curl -sL 'https://github.com/telemt/telemt/releases/download/3.3.39/telemt-x86_64-linux-gnu.tar.gz' -o /tmp/telemt-3.3.39.tar.gz

# 校验 SHA256(从 GitHub Release 页面获取)
sha256sum /tmp/telemt-3.3.39.tar.gz
# Expected: 85c53917fbd0ee20fcec9cbb844c5d0311573393bed98bb2a7b15d5837667513

4. 停止服务并替换二进制

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 备份旧版
cp /usr/bin/telemt /usr/bin/telemt.bak.3.3.35

# 停止服务
systemctl stop telemt.service

# 解压并替换
cd /tmp && tar xzf telemt-3.3.39.tar.gz
cp /tmp/telemt /usr/bin/telemt
chmod +x /usr/bin/telemt

# 验证新版本
/usr/bin/telemt --version
# 输出: telemt 3.3.39

# 重启服务
systemctl start telemt.service

5. 验证运行状态

1
2
3
systemctl status telemt.service
ps aux | grep telemt | grep -v grep
ss -tlnp | grep telemt

输出示例:

1
2
3
4
Active: active (running) since Wed 2026-04-08 08:52:13 CST; 2s ago
telemt 219719 0.2 0.9 580744 10888 ? Ssl 08:52 0:00 /bin/telemt /etc/telemt/telemt.toml
LISTEN 0 1024 0.0.0.0:443 0.0.0.0:* users:(("telemt",pid=219719,fd=13))
LISTEN 0 128 127.0.0.1:9091 0.0.0.0:* users:(("telemt",pid=219719,fd=9))

6. 清理临时文件

1
rm /tmp/telemt-3.3.39.tar.gz /tmp/telemt

版本变更摘要(3.3.35 → 3.3.39)

  • 3.3.36: Memory Hard-bounds + Handshake Budget in Metrics + TLS Fronting fixes
  • 3.3.37: Phase 1 & 2 完整实现
  • 3.3.38: New Relay Methods + Conntrack Control + Cleanup Methods for Memory + Buffer Pool Trim
  • 3.3.39: install.sh 改进(端口检查、CLI 参数)+ 证书信息哈希优化 + Build-info 指标

回滚方法

如需回滚到旧版:

1
2
3
4
systemctl stop telemt.service
cp /usr/bin/telemt.bak.3.3.35 /usr/bin/telemt
chmod +x /usr/bin/telemt
systemctl start telemt.service

下次升级流程

下次升级时,只需:

  1. SSH 进入服务器确认新版本号
  2. 从 GitHub 下载对应架构的包
  3. 按上述步骤替换并重启

本次升级由哈基米 🐱 代为完成。