satmux README

项目的 README,来自 github.com/Th0rgal/satmux。合并为一个 markdown 文件:README.md。

satmux

TCP multiplexer and 1-RTT HTTP/TLS relay for geostationary (GEO) inflight Wi-Fi (Inmarsat GX, Viasat, Panasonic, SITA). Pure Python 3 stdlib, zero external dependencies.

Measured inflight over Inmarsat GX Ka-band (~620 ms RTT, SITA AS206433 Amsterdam ground station):

  ORIGIN (6× PARALLEL)  RAW CABIN WI-FI (:443)    1-RTT BBR + ZLIB MUX    SPEEDUP
  ────────────────────  ────────────────────────  ──────────────────────  ─────────
  GitHub Repo           ████████████    TIMEOUT  ███░░░░░░░░░    4.66s  FIXED ✓
  GitHub API            ████████████  TCP RESET  ██░░░░░░░░░░    2.66s  FIXED ✓
  Hacker News           ████████████    TIMEOUT  ██░░░░░░░░░░    2.28s  FIXED ✓
  MDN Docs              ████████░░░░     12.01s  ██░░░░░░░░░░    2.30s     5.2×
  Cloudflare            ██░░░░░░░░░░      2.97s  █░░░░░░░░░░░    1.40s     2.1×
  PyPI JSON API         █████░░░░░░░      7.09s  ██░░░░░░░░░░    2.64s     2.7×
  ──────────────────────────────────────────────────────────────────────────────────
  6-Origin Burst:    19.13s (3/6 failed)  →  5.35s (0/6 failed)   [3.6× faster · -76% TTFB]

Problem

Non-Starlink inflight Wi-Fi usually breaks on three things unrelated to raw bandwidth:

  1. Onboard :443 middleboxes and DNS interception. Cabin gateways intercept :53 DNS and run a transparent :443 split-TCP proxy (PEP) whose state table drops connections under load (Connection reset by peer / TLS timeouts on github.com, api.github.com, package registries). Non-443 TCP ports pass through untouched.
  2. Handshake round-trips (~620 ms per GEO hop). Every new origin normally pays multiple satellite round-trips (DNS + TCP + TLS) before transferring payload bytes.
  3. Cubic congestion collapse. Cabin Wi-Fi packet loss causes standard TCP to halve cwnd repeatedly, leaving most of your per-seat token-bucket cap unused.

How it works

Direct (:443):
  laptop ──▶ cabin DNS + :443 PEP ══(3–4 GEO RTTs)══▶ ground ──▶ origin  (frequent TCP resets)

satmux (:8444):
  laptop ══(12 persistent TCP :8444 BBR + zlib pipes)══▶ ground VM ──(2 ms)──▶ origin

Limits

Setup

1. Ground VM

Rent a small Linux VM ($0.01–$0.03/h, Python 3.9+, open TCP port 8444) close to where the satellite downlinks to fiber. Check curl ipinfo.io on raw cabin Wi-Fi first to see the egress country/ASN:

Pause UDP VPNs (Tailscale/WireGuard) inflight—blocked UDP retry traffic competes for cabin airtime.

2. Run

With a coding agent:

Spin up a temporary Ubuntu VM near my current satellite egress IP, start https://github.com/Th0rgal/satmux on port 8444, connect the local 12-carrier client, enable bin/satmux-macos on, and run bin/satmux-bench.

Or manually:

# 1. Laptop: generate PSK
git clone https://github.com/Th0rgal/satmux.git && cd satmux
openssl rand -hex 32 > mux.psk && chmod 600 mux.psk

# 2. Ground VM: start server
scp satmux.py mux.psk root@<SERVER_IP>:/root/
ssh root@<SERVER_IP> 'nohup env SATMUX_PSK=$(cat /root/mux.psk) python3 /root/satmux.py server --port 8444 >/var/log/satmux.log 2>&1 &'

# 3. Laptop: start client + enable macOS / git / gh routing
SATMUX_PSK=$(cat mux.psk) python3 satmux.py client --host <SERVER_IP> --port 8444 --carriers 12 &
./bin/satmux-macos on <SERVER_IP>

Benchmark or run parallel range downloads:

./bin/satmux-bench
./bin/satmux-get https://example.com/archive.tar.gz

3. Teardown after landing

./bin/satmux-macos off

Restores macOS Wi-Fi proxy settings, ~/.gitconfig, gh http_unix_socket, and launchctl env vars, then destroy the temporary VM.

License

MIT

satmux (Th0rgal/satmux)

正在搜索数据库…

1.1K ·GitHub
这是什么?satmux 是一个 TCP 多路复用器,也是一个 1-RTT 的 HTTP/TLS 中继。它通过在地面站附近的服务器上保持预热连接,来加速慢速、丢包多的静止轨道(GEO)机上 Wi-Fi。
这是要我安装的应用,还是我要运行的服务器?两者都是。你 Mac 上的本地客户端会监听 127.0.0.1:1080(SOCKS5)和 127.0.0.1:8080(HTTP CONNECT),并连接到你在临时 Ubuntu 虚拟机上启动的中继。
我要怎么把它跑起来?在靠近你当前卫星出口 IP 的地方启动一台临时 Ubuntu 虚拟机,在 8444 端口启动服务端,连接本地的 12-carrier 客户端,然后执行 bin/satmux-macos on 启用代理,再运行 bin/satmux-bench 进行测速。
我还需要额外安装什么吗?只需要 Python 3,因为本项目只使用标准库,没有任何外部依赖。另外你还需要在卫星地面站附近准备自己的 Ubuntu 虚拟机,因为中继程序运行在那里。
用完之后我需要撤销哪些设置?收尾步骤会恢复 macOS 的 Wi-Fi 代理设置、~/.gitconfig、gh 的 httpunixsocket 以及 launchctl 环境变量,然后销毁这台临时虚拟机。如果跳过这一步,你的 Mac 可能会继续指向一个已经不存在的代理。
它也适用于 Starlink 吗?不适用。README 面向的是非 Starlink 的 GEO 链路,例如 Inmarsat GX、Viasat、Panasonic 和 SITA,其性能数据也是在 Inmarsat GX 的 Ka-band 链路上测得的。
它能在 Windows 笔记本上用吗?README 只记录了 macOS 客户端(bin/satmux-macos)和 Ubuntu 服务端,没有提及 Windows。
我的流量会经过我自己控制的服务器吗?会。数据流经过你在卫星地面站附近启动的一台 Linux 虚拟机,降落后,收尾步骤会销毁这台虚拟机。
为什么 GEO 航班上打开 github.com 这么慢?机舱网关会拦截 DNS,并运行一个 :443 的分段 TCP 代理,在负载高时会断开连接。每一次约 620 ms 的卫星往返延迟,都会在 DNS、TCP 和 TLS 握手中不断累加。
satmux 如何绕开机舱的 :443 代理?它的载波池运行在 8444 端口,这个端口不会被机舱代理拦截。它会与一台 Linux 虚拟机保持 12 个预热的 TCP 连接,并把每个数据流分配给当前负载最低的那个连接。
satmux 如何应对机上 Wi-Fi 的丢包?标准的 Cubic 算法每次丢包都会把拥塞窗口反复减半,从而浪费你每个座位的流量上限。satmux 运行的是预热的 BBR 连接,目标是更充分地利用这份令牌桶上限。
作者
Th0rgal
大小
<0.1 MB
星标
1.1K
更新
提交Nov 07
时长
11天
提交 · 90 天