commit b986f6b4e3447d8f6cb8f232be57113516b8ad28
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2026-06-09T22:37:34Z |
| subject | Update README |
commit b986f6b4e3447d8f6cb8f232be57113516b8ad28
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2026-06-09T22:37:34Z
Update README
---
Benchmark.md | 69 ++++++++++++++++++++++++++++++++++++++
README.md | 7 ++++
dockerfiles/github-perf.Dockerfile | 8 ++++-
3 files changed, 83 insertions(+), 1 deletion(-)
diff --git a/Benchmark.md b/Benchmark.md
new file mode 100644
index 0000000..396ca75
--- /dev/null
+++ b/Benchmark.md
@@ -0,0 +1,69 @@
+## Which image should I use?
+
+Use the default image unless you specifically care about maximum TCP throughput.
+
+For static/minimal deployments:
+
+```sh
+ghcr.io/tgckpg/tinyproxy:v0.2.8
+```
+
+For high-throughput Linux deployments:
+
+```sh
+ghcr.io/tgckpg/tinyproxy:v0.2.8-debian-slim
+```
+
+The glibc image is not required for correctness. It is only a performance-oriented variant.
+
+## Benchmarks
+Please note that the throughput varies on different builds. The following data only serves as a reference.
+
+
+### Baseline (Direct loopback, running on Archlinux)
+Setup: `iperf3 -> iperf3`
+
+(PENDING)
+
+### Baseline (Rawproxy, running on Archlinux)
+Setup: `iperf3 -> rawproxy -> iperf3`
+
+(PENDING)
+
+### glibc, built locally (running on Archlinux)
+Setup: `iperf3 -> tinyproxy (glibc) -> iperf3`
+
+(PENDING)
+
+### static musl, built from CI (running on Archlinux)
+Setup: `iperf3 -> tinyproxy (musl) -> iperf3`
+
+(PENDING)
+
+
+## Container Images
+
+`tinyproxy` currently provides two Linux container image variants:
+
+| Image tag | Runtime | Size | Intended use |
+| ------------------------------------------------ | --------------------- | ---------: | ----------------------------------- |
+| `ghcr.io/tgckpg/tinyproxy:<version>` | static musl / scratch | very small | default, minimal deployments |
+| `ghcr.io/tgckpg/tinyproxy:<version>-debian-slim` | glibc / Debian slim | larger | higher-throughput Linux deployments |
+
+The default image is the static musl build. It is small in size and suitable for most uses, such as sidecars, internal forwarding, probes, and lightweight Kubernetes deployments.
+
+```sh
+docker run --rm ghcr.io/tgckpg/tinyproxy:v0.2.8 \
+ -L "tcp :8080 tcp 127.0.0.1:80"
+```
+
+### glibc (debian-slim) image
+
+The glibc image is larger because it uses a Debian slim runtime, but it may perform better for high-throughput TCP proxying on normal Linux hosts. In local benchmarks, the glibc build showed better throughput than the fully static musl build for the stream proxy hot path.
+
+Use the glibc image for traffic-heavy routes such as:
+
+* public `:80` / `:443` forwarding
+* Git clone / push traffic
+* large file transfers
+* throughput-sensitive TCP routes
diff --git a/README.md b/README.md
index 5b70dd2..345b38d 100644
--- a/README.md
+++ b/README.md
@@ -25,6 +25,13 @@ tinyproxy \
-L "udp :31232 udp 127.0.0.1:41232"
```
+Docker example:
+
+```sh
+docker run --rm ghcr.io/tgckpg/tinyproxy:v0.2.8-debian-slim \
+ -L "tcp :443 tcp 10.0.1.1:443 proxy_v2,keep_alive"
+```
+
Minecraft Bedrock public-to-LAN proxy
Makes a remote Minecraft Bedrock server appear as a LAN server.
diff --git a/dockerfiles/github-perf.Dockerfile b/dockerfiles/github-perf.Dockerfile
index f791eb5..32f0fb2 100644
--- a/dockerfiles/github-perf.Dockerfile
+++ b/dockerfiles/github-perf.Dockerfile
@@ -19,11 +19,17 @@ COPY src /build/src
COPY mk /build/mk
COPY Makefile /build/Makefile
+# We've already ran the real test in earlier build stages
+# Reduce the stress test requirments for faster build here
RUN mkdir -p /build/libevent \
&& tar zxf /build/libevent.tar.gz -C /build/libevent --strip-components=1 \
&& find . \
&& make clean test LIBEVENT_SRC=./libevent \
- && make clean all LIBEVENT_SRC=./libevent
+ CONCURRENCY=20 \
+ TOTAL=20 \
+ FD_LIMIT=512 \
+ LARGE_ROUNDTRIP_SIZE=4096 \
+ SEQUENTIAL_CONNECTIONS=20
FROM debian:trixie-slim AS runtime