server: Go skeleton — control plane, UDP data plane, Docker + systemd modes
Pure stdlib. Implements the spec's core: enrollment (single-use tokens), profile (SPKI pin, only real capabilities advertised), sessions with the §2.4 HKDF-SHA256 key schedule; UDP data plane with the 32-byte ELT1 header, 4-byte HMAC gate, 1024-wide anti-replay window, ECHO_RESP with observation block, TIMESYNC, and the §3.4 anti-amplification cap. Wire format has tests (roundtrip + silent-drop cases); enroll→profile→session smoke-tested live. Modes: container (autodetect /.dockerenv|/run/.containerenv|cgroup, or --docker/ECHOLOT_DOCKER=1; config via ECHOLOT_* env; distroless image; network_mode host required — Docker NAT would falsify observed sources) and native (--install-systemd/--uninstall-systemd with a hardened unit, opt-in --self-update from Gitea releases; refused in containers). CI: tests on any server/ push; server-v* tags build+push the image to the Gitea registry and attach linux amd64/arm64 binaries + SHA256SUMS to a release — the artifact self-update consumes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
ee66648e3c
commit
8a80026d49
@@ -98,6 +98,23 @@ them); `ip monitor` 2 s window caught nothing on a quiet net — consider longer
|
||||
capture; IP_MTU read via getsockoptInt reflection unavailable — reader belongs in the errqueue
|
||||
shim if that lands.
|
||||
|
||||
## Go server skeleton — `server/` (2026-07-30)
|
||||
Pure-Go stdlib implementation of the spec's core: control plane (enroll with single-use tokens,
|
||||
profile with SPKI pin, sessions with the §2.4 HKDF key schedule) + UDP data plane (ELT1 header,
|
||||
HMAC gate, 1024-wide anti-replay, ECHO_RESP with observation block, TIMESYNC, §3.4
|
||||
anti-amplification). Wire format covered by `go test` (roundtrip, replay/bad-HMAC/unknown-prefix
|
||||
silent drops); full enroll→profile→session flow smoke-tested live. Two run modes: **container**
|
||||
(autodetected via /.dockerenv etc. or `--docker`; config from `ECHOLOT_*` env; distroless image,
|
||||
`network_mode: host` required — Docker NAT would falsify the observed sources the protocol
|
||||
measures) and **native** (`--install-systemd`/`--uninstall-systemd`, opt-in `--self-update`
|
||||
against a Gitea releases API). CI: `.gitea/workflows/build-server.yml` — tests on push;
|
||||
`server-v*` tags push the image to the Gitea registry + attach linux amd64/arm64 binaries that
|
||||
self-update consumes. Not yet: TCP/TLS echo, STUN, canary DNS, actions, observations API,
|
||||
real admin UI, self-update signature verification.
|
||||
|
||||
Prober build numbering: ascending `versionCode` shown on screen + as `proberBuild` in the JSON
|
||||
report; current deployed build = **2**. Bump on every deployed change.
|
||||
|
||||
## Next steps
|
||||
1. Build locally, run on several physical devices (varied Android versions/vendors), collect the
|
||||
JSON reports — especially the real per-device Shizuku dump formats.
|
||||
|
||||
Reference in New Issue
Block a user