WebSocket-to-TCP relay with bundled iperf3, so a Samsung Tizen TV app can speed test itself
984
The server side of samsung-tv-iperf3 — a network speed test for Samsung Smart TVs.
A Tizen TV app runs in a browser sandbox: it cannot execute a binary, so it
cannot run iperf3 as a process, and it has no raw TCP sockets — only fetch,
XHR and WebSocket. The TV therefore speaks the real iperf3 wire protocol in
JavaScript, and this relay supplies the one capability the sandbox withholds:
each WebSocket is paired 1:1 with a TCP connection to an iperf3 server, bytes
passed through untouched. iperf3's own model — first connection is the control
channel, later ones bearing the same cookie are data streams — survives intact.
The image bundles its own iperf3 -s, so there is nothing else to install
and no clash with an iperf3 you may already run on :5201.
docker run -d --name iperf3-ws-relay --restart unless-stopped \
-p 5202:5202 -p 15201:5201 \
dmitry0xff/iperf3-ws-relay:latest
Then build and sideload the TV app with that host's address — see the repository README.
linux/amd64 and linux/arm64 are both published, so x86 servers and ARM
NAS/Pi hosts pull the right image automatically.
| Port | Purpose |
|---|---|
5202 | WebSocket relay — what the TV connects to |
5201 | the bundled iperf3; map it high (e.g. 15201:5201) to calibrate with a native iperf3 -c |
| Variable | Default | Purpose |
|---|---|---|
RELAY_PORT | 5202 | WebSocket listen port |
IPERF_HOST | 127.0.0.1 | iperf3 to relay to. Set this to an external server and the container skips starting its own |
IPERF_PORT | 5201 | iperf3 port |
IDLE_TIMEOUT_MS | 300000 | drops genuinely silent sockets. Must exceed the longest test duration — the control connection is idle for the whole test body |
permessage-deflate would both inflate the reported
throughput and cap the real throughput on CPU.Content type
Image
Digest
sha256:80031c8a3…
Size
46.4 MB
Last updated
3 months ago
docker pull dmitry0xff/iperf3-ws-relay