tg-ws-proxy-rs v2.3.1
Fixes the Docker image published for 2.3.0, which did not contain the proxy.
What went wrong
The 2.3.0 image was 300 KB instead of ~2.2 MB and its entrypoint exited 0
immediately, so the container "started" and stopped with an empty log whatever
flags it was given (#117).
The Dockerfile builds dependencies in their own layer first, against a stub
fn main() {}, so that a source-only change does not recompile the dependency
tree. COPY then restores the real sources — with the mtimes they carry in the
build context, which for a fresh checkout are older than the stub layer that
ran minutes later inside the same build. Cargo decides freshness by mtime,
compared the real sources against the stub's artifacts, found them older,
declared the crate up to date, and did nothing. The cp that follows shipped
the stub.
The trap only springs when that dependency layer actually executes instead of
coming from cache, which is why it stayed hidden until a release changed
Cargo.toml, Cargo.lock and the layer's own command at the same time.
Fixed
- The real sources are touched after
COPYand before the build, so cargo sees
them as newer than anything the dependency layer left behind. - The builder now asks the binary it just produced for
--versionand fails the
build unless it matchesCargo.toml. A stub is a valid binary that exits 0,
so image size, a successful build and a container that starts all look
identical either way — the only thing that can tell them apart is asking.
No source, CLI, protocol or Android change. Binaries, APKs and OpenWrt packages
published for 2.3.0 were built by a different path and were never affected;
only the Docker image was.