github valnesfjord/tg-ws-proxy-rs v2.3.1
tg-ws-proxy-rs v2.3.1

latest releases: v2.3.3, v2.3.2
4 hours ago

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 COPY and 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 --version and fails the
    build unless it matches Cargo.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.

Don't miss a new tg-ws-proxy-rs release

NewReleases is sending notifications on new releases.