Skip to content
This repository was archived by the owner on Apr 5, 2026. It is now read-only.

Commit 881e0ac

Browse files
committed
feat: add static binary releases for linux/amd64 and arm64 (#65)
GitHub Actions workflow builds musl-static binaries on tag push, uploads them as release assets with SHA256 checksums.
1 parent ef13537 commit 881e0ac

3 files changed

Lines changed: 104 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
build:
12+
strategy:
13+
matrix:
14+
include:
15+
- arch: amd64
16+
platform: linux/amd64
17+
- arch: arm64
18+
platform: linux/arm64
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Set up QEMU
26+
if: matrix.arch == 'arm64'
27+
uses: docker/setup-qemu-action@v3
28+
29+
- name: Build static binary
30+
run: |
31+
VERSION="${GITHUB_REF_NAME#v}"
32+
docker run --rm --platform ${{ matrix.platform }} \
33+
-v "$PWD:/src" -w /src alpine:3.21 sh -c "
34+
apk add --no-cache build-base openssl-dev openssl-libs-static zlib-dev zlib-static linux-headers git
35+
git config --global --add safe.directory /src
36+
make clean
37+
make -j\$(nproc) EXTRA_VERSION=${VERSION} EXTRA_LDFLAGS='-static'
38+
"
39+
40+
- name: Verify static linking
41+
run: |
42+
file objs/bin/mtproto-proxy | tee /dev/stderr | grep -q "statically linked"
43+
44+
- name: Upload artifact
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: mtproto-proxy-linux-${{ matrix.arch }}
48+
path: objs/bin/mtproto-proxy
49+
50+
release:
51+
needs: build
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v4
55+
56+
- uses: actions/download-artifact@v4
57+
with:
58+
path: artifacts
59+
60+
- name: Prepare release assets
61+
run: |
62+
mkdir -p release
63+
cp artifacts/mtproto-proxy-linux-amd64/mtproto-proxy release/mtproto-proxy-linux-amd64
64+
cp artifacts/mtproto-proxy-linux-arm64/mtproto-proxy release/mtproto-proxy-linux-arm64
65+
chmod +x release/mtproto-proxy-linux-*
66+
cd release
67+
sha256sum mtproto-proxy-linux-* > SHA256SUMS
68+
69+
- name: Create GitHub Release
70+
uses: softprops/action-gh-release@v2
71+
with:
72+
files: release/*
73+
generate_release_notes: true

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [3.3.0] - 2026-03-27
6+
7+
### Added
8+
- **Static binary releases** — pre-built `mtproto-proxy` binaries for Linux amd64 and arm64, statically linked against musl libc. Zero dependencies — download and run ([#65](https://github.com/GetPageSpeed/MTProxy/issues/65))
9+
- **Secret labels** — name your secrets with `label:hex` syntax for human-readable per-secret metrics in Prometheus (`mtproxy_secret_connections{label="office"}`) and stats endpoint ([#60](https://github.com/GetPageSpeed/MTProxy/issues/60))
10+
- CI: AddressSanitizer (ASan) job catches heap overflows and use-after-free at build time
11+
- CI: direct-mode E2E tests with real Telethon session (`get_me()` through proxy)
12+
13+
### Fixed
14+
- Direct mode: client transport tag (e.g. `0xdddddddd`) now correctly propagated to DC obfuscated2 init — previously hardcoded, breaking all direct-mode connections ([#64](https://github.com/GetPageSpeed/MTProxy/issues/64))
15+
- Direct mode: obfuscated2 init to DC written as raw bytes to post-crypto buffer, preventing double encryption
16+
517
## [3.2.0] - 2026-03-25
618

719
### Added

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ The table below compares it with the original and the two main third-party alter
5050
| ARM64 / Apple Silicon | No | Yes | Yes | Yes |
5151
| IPv6 | Yes | Yes | Yes | Yes |
5252
| Multi-worker processes | Yes | Yes |||
53+
| Static binary releases | No | Yes | Yes | Yes |
5354
| RPM packages | No | Yes | No | No |
5455
| Systemd integration | Partial | Yes || Yes |
5556
| ***Monitoring & management*** | | | | |
@@ -80,6 +81,24 @@ This includes:
8081
- Firewall configuration
8182
- Fake TLS setup instructions
8283

84+
### Static Binary (Any Linux)
85+
86+
Pre-built static binaries (musl libc, zero dependencies) are available for every [release](https://github.com/GetPageSpeed/MTProxy/releases):
87+
88+
```bash
89+
# Download (choose amd64 or arm64)
90+
curl -Lo mtproto-proxy https://github.com/GetPageSpeed/MTProxy/releases/latest/download/mtproto-proxy-linux-amd64
91+
chmod +x mtproto-proxy
92+
93+
# Generate a secret
94+
SECRET=$(head -c 16 /dev/urandom | xxd -ps)
95+
96+
# Run in direct mode (simplest — no config files needed)
97+
./mtproto-proxy -S "$SECRET" -H 443 --direct -p 8888 --aes-pwd /dev/null
98+
```
99+
100+
Binaries are available for `linux/amd64` and `linux/arm64`. SHA256 checksums are published alongside each release.
101+
83102
### Manual Build (Advanced)
84103

85104

0 commit comments

Comments
 (0)