Log message:
net/xfr: update to 0.12.1
[0.12.1] - 2026-10-21
Security
Distrusted emSign intermediates are rejected — updated webpki-roots and \
webpki-root-certs to 1.0.10 and rustls-webpki to 0.103.16, closing \
RUSTSEC-2026-0381, RUSTSEC-2026-0383 and RUSTSEC-2026-0382. The private keys of \
several emSign intermediate CAs are now public. The bundled roots still included \
emSign ECC Root CA - G3, and certificate verification did not reject the \
compromised intermediates, so a network attacker holding one of those keys could \
impersonate an HTTPS server xfr talks to: the update check and the Prometheus \
push gateway. The new roots drop that CA and verification rejects paths through \
those intermediates. QUIC tests are unaffected, since xfr authenticates QUIC \
peers with the PSK channel binding, not the public CA set. Lockfile-only; no \
source or API changes.
[0.12.0] - 2026-10-17
Security
Updated rustls to 0.23.46 — closes RUSTSEC-2026-0346 (Debug impls could \
expose TLS session secrets), RUSTSEC-2026-0349 (a ServerHello could downgrade \
the handshake to classical key exchange), RUSTSEC-2026-0347 (data leak after an \
ECH rejection; xfr does not use ECH), and RUSTSEC-2026-0348 (brotli certificate \
decompression; xfr does not enable rustls's brotli feature). rustls backs \
xfr's QUIC transport and its HTTPS clients (update check, Prometheus push \
gateway). Lockfile-only; no source or API changes.
Added
xfr::persistence::atomic_write(path, bytes) — the library's \
crash-safe save routine (used for JSON and CSV results and preferences) is \
public, so other output paths can share it.
Changed
Behavior change: client options given with a subcommand are now a usage \
error — xfr --json -t 5 -P 4 diff a b or xfr -p 9000 serve used to run with \
those options silently dropped, so xfr -p 9000 serve listened on the default \
port instead of 9000. Top-level test, output and connection options typed \
alongside serve, diff or discover now fail with a usage error (exit 2) naming \
the option. When the subcommand takes the same option, the error's tip \
shows the corrected command (tip: put serve options after the subcommand: xfr \
serve --port 9000); otherwise it says the option only applies to client tests. \
Scripts and service units that put options before serve must move them after it \
(xfr serve -p 9000). --theme, --log-file, --log-level, --no-update-check and \
--completions still work with any subcommand, but as top-level options they go \
before it: xfr --no-update-check serve works, xfr serve --no-update-check is a \
usage error. Only --theme is also accepted after the subcommand,
and serve has its own --log-file and --log-level, which go after it. Options \
set through environment variables (XFR_DURATION, XFR_PORT, XFR_PSK, ...) are not \
affected.
Maintenance
Less allocation in interval aggregation — jitter and RTT averages and the \
total TCP congestion window are computed without temporary vectors. Missing and \
measured-zero values, RTT rounding, and saturating congestion-window totals \
retain their existing meaning.
Less allocation in TUI reporting — help paging counts wrapped rows without \
building a temporary vector, and server tables format only visible cells while \
borrowing protocol and direction labels.
Native Windows tests in CI — the Windows job now runs Clippy on all \
targets and the all-features test suite, including integration tests, instead of \
cargo check. The job is informational and does not fail the workflow while \
Windows support is experimental. The two QUIC upload pacing tests are skipped on \
Windows, where QUIC delivers far below the -b target (see Known Issues).
Dropped the typos CI check — it mostly flagged false positives (test \
fixtures, changelog wording); spelling is left to review.
Less allocation in Push Gateway formatting — Prometheus metric lines are \
written directly into the payload buffer instead of allocating a temporary \
string for each line. Metric names, labels, ordering, and text formatting are \
unchanged.
Less allocation in plain and CSV reporting — formatted report fragments \
and CSV summary rows are written directly into their output buffer, and plain \
reports reuse a static separator. Output text and CSV column ordering are \
unchanged.
Documentation
README restructured — the README is now a short entry point; installation \
moved to docs/INSTALL.md, a documentation index to docs/README.md, and the \
detailed reference into docs/FEATURES.md. Old README anchors are kept so \
existing links still land. docs/COMPARISON.md no longer says iperf3 uses a port \
per stream, describes its authentication as username/password with RSA-encrypted \
credentials, and credits its --json-stream.
README demo re-recorded — the GIF opens on a populated throughput view in \
colour at real-time speed, from docs/demo.tape.
Fixed
QUIC servers no longer hang up to 30 s after a test, and SIGTERM closes QUIC \
clients — the client closed its connection the moment the result arrived. \
Quinn holds back a CONNECTION_CLOSE while the congestion window is full, which \
an upload's is, so the client's acknowledgement of the result, carried \
in that close, often never left. The server waits for that acknowledgement \
before it lets go of a test, so it waited out the 30 s idle timeout instead. \
serve --one-off exited 30 s late, and other servers held the test's slot \
for 30 s. The client now waits up to 1 s for the server to close before closing \
itself, the server closes the connection once the result is acknowledged, and \
xfr serve handles SIGINT and SIGTERM (now exit status 0) by closing its QUIC \
connections before it exits. A client whose server is stopped mid-test fails \
within a few hundred milliseconds instead of after 30 s. Servers still wait up \
to 30 s for older clients.
Every TCP stream carries data at high stream counts — unpaced TCP tests \
with many streams on a fast link left some streams with zero bytes while the run \
exited 0 and reported a plausible total: about 10 of 64 streams on loopback, and \
60–90 of 128. The send loop (since zero-copy sends) waited for socket \
readiness and wrote with calls that bypass tokio's cooperative scheduling \
budget, so on a socket that stayed writable it never gave up its worker thread. \
The remaining streams' connects and the server's routing of them, and \
wakeups for sockets that had filled, then waited until the test ended. The send \
loop now yields to the scheduler regularly. With the fix, -P 4 on loopback also \
splits throughput evenly across streams and raises the total by about 60% \
(before, the slowest stream ran at a fraction of the others' rate). If a \
TCP stream still carries nothing in a direction it was meant to use, the client \
warns (Warning: N of M streams carried no data; the totals cover on
ly the rest, and zero_byte_streams in --json), and the server logs it. -n tests \
are exempt, since a small budget can leave streams empty by design.
Prometheus /metrics no longer grows with every test — the server exported \
each finished test's xfr_stream_* and xfr_tcp_* series (labelled with \
test_id) forever, so a long-running serve --prometheus grew in scrape size and \
memory with every test: in a 20-minute soak of 120 short tests the series count \
rose from 14 to 1626. Per-test series are now kept for the 16 most recently \
finished tests, including tests that errored or were cancelled, and removed \
after that. A test's final values therefore stay visible to the next \
scrapes. The aggregate xfr_bytes_total, xfr_tests_total and \
xfr_test_duration_seconds still count every test.
Ctrl-C works throughout both TUIs — client Settings no longer swallows \
interrupts (Ctrl-C closes it and cancels the test), and the server dashboard now \
accepts Ctrl-C. Terminals that send a literal ETX are supported too. Client \
cancellation keeps the existing summary wait and second-interrupt force exit.
Preference, JSON result and CSV result saves are atomic — writes now \
complete and sync beside the destination before replacing it, preserving the \
previous save on failure, Unix permission bits, and valid symlinks. Read-only \
files, broken symlinks, and directories are rejected; devices, FIFOs, and pipes \
(-o /dev/null, -o /dev/stdout) are written in place as before. A writable file \
in a directory that is not writable is still overwritten in place, as before, \
with a warning that the save is not atomic. Save errors name the destination and \
the cause (Cannot save to out/x.json: directory does not exist) instead of the \
temporary file's path.
TUI theme readability — the default theme uses the terminal foreground for \
light and dark terminals, and RGB themes use brighter secondary text on their \
intended dark backgrounds. Per-stream bar labels and empty tracks now follow the \
theme's dim text color instead of a fixed dark gray. Secondary text in the \
default theme (labels, footer key names, stream IDs, empty bar tracks) is a \
fixed mid grey (xterm 244, #808080) rather than a named ANSI grey: Solarized \
Dark draws ANSI 8 in its background colour, which made all of it invisible, and \
light palettes put ANSI 7 next to theirs. The monochrome theme's borders \
and secondary text, which had the same ANSI 8 problem, use that grey too. Loss \
indicators retain their existing styles.
TUIs stay readable in small terminals — the client prioritizes live \
throughput and progress on short terminals and never cuts the rate mid-unit (the \
state label is shortened or dropped first), and its footer now leads with the ? \
help hint so narrow widths drop the other hints first, then the Status: label, \
then the status itself; the server dashboard omits optional table columns on \
narrow terminals, drops its Blocked / Auth Fail and then Tests / Failed header \
stats instead of running them into the bandwidth figure, names how many active \
tests don't fit in the table title (Active Tests (3, 2 hidden)), and keeps \
its header and help hint on short terminals; its footer now lists help first in \
the client's hint style (?:Help q:Quit, or [?] Help | [q] Quit on wide \
terminals); both help overlays page with PgUp/PgDn and Home/End and show PgDn \
more in the border when they overflow, and draw their descriptions in the body \
text colour, aligned in one column past the widest key.
TUI History reports the UDP loss of each interval — UDP loss: +N packets \
treated the per-interval loss count as cumulative, so a steady ~700 packets lost \
per second logged +708 once and then the small interval-to-interval differences \
(+8, +73, ...). Each line now gives the packets newly lost since the previous \
report, and -u -R runs, whose loss is measured by the client, log it too.
Update-check overrides stay locked in Settings — builds without the \
checker, environment opt-outs, --no-update-check, and explicit config values \
show their reason and cannot overwrite saved preferences. A locked row reads \
dimmed and no longer shows the ◀ ▶ change arrows when selected.
Bounded Prometheus HTTP connections — request headers have a 5-second \
total deadline and connections have a 10-second total lifetime, including \
stalled response writes. HTTP keep-alive is disabled; each connection serves one \
request. At most 64 connections are served at once; further connections wait in \
the accept backlog. An accept error (e.g. Too many open files during a \
connection flood) no longer stops the metrics server: it is logged and retried \
after 100 ms. Per-connection errors are logged at debug level instead of being \
printed to stderr, which corrupted the server TUI.
--connect-timeout now bounds hostname resolution — the client resolved the \
target with the blocking system resolver on a runtime thread, so a stuck DNS \
lookup hung the connect and the timeout could never fire; QUIC also resolved \
outside its connect deadline entirely. Lookups now run on tokio's blocking \
pool inside the deadline for TCP, UDP and QUIC. Library: xfr::net::resolve_host \
is now async.
--csv -o FILE saves CSV — the file always received the JSON result, even \
though --csv -o data.csv is the documented way to save CSV. With --csv the file \
now holds the same header and summary row printed to stdout; every other mode \
still saves JSON.
-o destinations are checked before the test starts — -o ro.json, -o \
somedir/ and -o nodir/x.json failed only after the whole test had run, \
discarding its result. The client now checks the destination before connecting \
and exits 1 with the save error (Cannot save to nodir/x.json: directory does not \
exist). The check creates and truncates nothing, and skips devices, FIFOs and \
pipes such as /dev/null and /dev/stdout.
No terminal no longer breaks the client (LAN-2197) — with stdout piped \
(xfr <host> | cat) or no controlling terminal (setsid xfr <host> \
</dev/null) and no --no-tui, the client failed with Error: No such device or \
address (os error 6); with stdout redirected to a file from a terminal, the TUI \
wrote its escape sequences into the file and hung. The TUI now starts only when \
stdout and stdin are both terminals; otherwise the client prints plain output, \
as with --no-tui. xfr serve --tui without a terminal likewise runs the plain \
server and logs a warning that --tui needs a terminal.
QUIC runs no longer warn about random payloads unless --random is given \
(LAN-2199) — every -Q run printed Warning: random payloads are ignored with \
QUIC (payload is already encrypted), because random payloads are the default. \
The warning now appears only with an explicit --random.
--json-stream and -q are rejected together — -q suppresses interval \
output, so the combination silently emitted only the final summary line instead \
of a stream. Use --json for the summary alone.
UDP streams could lose their traffic to another socket on the same port — \
every UDP data socket set SO_REUSEADDR, including the ones bound to an ephemeral \
port. With that option the kernel can give a new socket a port another live \
socket already holds: on Linux, after a few hundred live sockets in one process, \
and Windows shares ports the same way. The newer socket then receives every \
datagram sent to that port. A server's per-stream UDP socket (on servers \
that don't support single-port UDP, such as Windows, or with clients that \
predate it) could count zero packets for an upload, or never learn the \
client's address in a -R or --bidir test. The odds grew with stream count \
and concurrent tests. Ephemeral UDP sockets no longer set SO_REUSEADDR. Sockets \
on an explicit port (--cport) still set it.
Library API (pre-1.0 break)
net::resolve_host is now async — callers must .await it. Lookups run on \
tokio's blocking pool so a surrounding timeout can abandon a stuck \
resolver.
Struct-literal constructors must supply new public fields: \
tui::server::ServerApp.help_scroll, tui::widgets::StreamBar.dim_color \
(StreamBar::new sets it; StreamBar::dim_color overrides it), and \
protocol::TestResult.zero_byte_streams (serde-optional, so the wire format stays \
compatible).
protocol::TestResult.mtu_probe is now \
Option<Box<probe::MtuProbeReport>> — boxed to keep ControlMessage \
small; wrap assignments in Box::new. JSON is unchanged.
net::create_udp_socket* no longer set SO_REUSEADDR on a port-0 bind — \
create_udp_socket and create_udp_socket_bound set it only for an explicit port, \
and create_udp_socket_for_remote, which always binds port 0, no longer sets it.
Additive: tui::ui::help_scroll (help-overlay paging for a key press), \
tui::ui::draw_help_overlay (now public, with scroll and server parameters), \
update::check_lock_reason, impl Display for tui::app::AppState, \
persistence::check_destination (validates an -o destination without creating or \
truncating anything), serve::Server::run_until (stops on a caller's \
shutdown future and closes QUIC connections on the way out), and \
protocol::TestResult::count_zero_byte_streams / describe_zero_byte_streams.
|
Log message:
net/xfr: update to 0.9.25
[0.9.25] - 2026-07-31
Fixed
Heavy-loss columns no longer render as red fragments floating at the top of \
the sparkline — v0.9.24's hue-free severity marking applied reverse video \
in every theme, but reverse video swaps foreground and background within each \
cell, and a partial bar glyph only covers the cell's bottom — so the swap \
painted the empty top fraction and hid the bar (reported by brettowe within a \
day). Color themes now carry heavy loss as a red bar plus an underline (the \
artifact-free modifier), and the reverse-video treatment is reserved for the \
monochrome theme — where the widget now fills the whole column so heavy loss \
renders as one solid full-height pillar with the throughput bar as a negative \
silhouette inside it, instead of fragments at whatever height each bar's \
top cell sat. (#93 follow-up, #158)
[0.9.24] - 2026-07-30
Fixed
Quitting on an effectively-dead link no longer discards your stats — on a \
zombie connection (e.g. WiFi that is associated but passing nothing), pressing \
q/Ctrl+C in the TUI waits up to 5 seconds for the server's final summary \
with a visible Waiting for server (Ns)... countdown, then exits with a partial \
summary built from locally accumulated counters and a warning — previously it \
printed "Test cancelled." and dropped everything. One genuinely \
unbounded hang is also closed: the control-channel Cancel write ran before its \
timeout was armed, so a full send buffer could stall quit until the \
test-duration deadline. Partial summaries are never written to --output files. \
(#159)
Changed
The monochrome theme is now actually usable in sunlight — it was built \
from hardcoded RGB grays whose mid-tone distinctions are exactly what glare \
washes out, and its fixed white text was invisible on light terminal backgrounds \
(the setup that works best outdoors, since dark screens mirror). It now renders \
in the terminal's own default colors at maximum contrast with just three \
levels, adapting to dark and light backgrounds alike. Loss severity in the \
throughput sparkline is additionally encoded without color in every theme: light \
loss underlines the bar, heavy loss reverses the cell into a bright pillar — \
so lossy intervals survive glare, monochrome, NO_COLOR, and colorblindness. \
Setting the standard NO_COLOR environment variable now selects the monochrome \
theme by default (an explicit --theme, config value, or saved preference still \
wins, and the env-induced choice is never persisted). (#158)
[0.9.23] - 2026-07-29
Added
Test by transfer size, not time (-n/--bytes) — xfr <host> -n 1G \
sends exactly 1 GiB and stops, instead of running for a fixed number of seconds. \
Runs are then comparable across links of different speeds, which is what CI and \
benchmarking usually want; a timed test moves a different amount of data on \
every link. Binary suffixes (K/M/G = KiB/MiB/GiB), and the count is the total \
across all streams rather than per stream — -P 8 -n 1G still transfers 1 GiB, \
with faster streams simply carrying more of it. Without an explicit -t there is \
no clock at all; with one, -t becomes an upper bound and the test reports \
however much it managed. Works for TCP, UDP and QUIC in all three directions, \
and needs a server advertising the new byte_budget_v1 capability — against an \
older server the client refuses to start rather than quietly running a timed \
test instead. UDP transfers whole datagrams, so its final one may be short — \
and a budget below one packet header warns rather than si
lently transferring nothing. Under the TUI the progress bar tracks bytes against \
the requested size instead of showing an "infinite" bar.
Changed
--help is now grouped into sections — Test, Connection, Output, and \
Authentication options on the client help; serve --help adds Server Options and \
Access Control — instead of one flat list, mirroring iperf3's man-page \
structure. Help text only; no flag names, defaults, or behavior changed.
Control-channel crypto moved onto one RustCrypto generation — \
chacha20poly1305 0.10 → 0.11 and hkdf 0.12 → 0.13, which lets the protected \
control channel share sha2 0.11 / hmac 0.13 with PSK authentication instead of \
pinning a second copy of the older crypto-common 0.1 stack alongside it. Two \
duplicate dependencies (the renamed sha2_010 / hmac_012) are gone and the build \
no longer compiles two generations of the same crates. The wire format is \
unchanged: key derivation, AEAD framing, and the server proof are byte-for-byte \
identical, verified against fixed vectors captured from the previous release and \
by running PSK-protected tests in both directions between old and new binaries.
Fixed
No more spurious send-error noise at the end of timed UDP/QUIC tests — \
when the server tears down its sockets at its own deadline slightly before the \
client stops sending, the client logged Connection refused (os error 111) (UDP) \
or sending stopped by peer: error 0 (QUIC, once per stream) on tests that \
succeeded. These are now logged at debug level when the test is cancelling or \
within 250 ms of its deadline, mirroring the existing TCP teardown-grace \
handling; a genuine mid-test failure still surfaces as a warning/error and a \
failed run.
Dropped an unused dependency — async-trait was declared in Cargo.toml but \
never referenced in the source.
Scripted output now reports loss while upload saturation stalls interval \
reports — --json-stream and plain interval rows print on control-channel \
Interval arrival, which is exactly what upload-mode UDP saturation clogs; the \
numbers went dark during loss episodes and then landed in a burst. When full \
reports stall for two report periods, the locally-clocked 2 Hz receiver feedback \
now surfaces directly: plain text prints a (reports stalled) line with \
cumulative loss, and --json-stream emits an explicitly marked udp_feedback event \
carrying cumulative packet counts — interval rows are unchanged, and CSV keeps \
its fixed columns. (#70 follow-up, the scripted half of #93)
UDP download (-u -R) display no longer stalls when saturation clogs the \
control channel — in download mode the server's Interval messages ride \
the same server→client path as the UDP flood, so pacing the display off their \
arrival froze it exactly when the link got interesting: rows and sparkline bars \
stopped, then a backlog burst landed all at once. Since every displayed value in \
-u -R is already receiver-side truth (bytes and loss since #81, jitter since \
#143), progress now runs on a local 1 Hz clock built entirely from the \
client's own receive counters, and the server's Intervals are ignored \
— the display keeps its rhythm, with per-second loss and true degraded \
throughput, no matter what happens to the control channel. (#93)
Sparkline no longer jumps forward with green bars after a loss episode — \
when upload saturation clogs the control channel, the queued Interval messages \
flush in a burst once the loss eases; each one appended its own bar (the graph \
"jumped" several columns) and, because their stale cumulative loss \
counts were filtered out, those bars rendered primary-colored right after heavy \
loss. Bar appends are now rate-limited to the report cadence, and the bar that \
does render takes its loss tint from the freshest feedback state — the same \
source the stall-synthesized bars already use. (#93)
[0.9.22] - 2026-07-24
Fixed
Live jitter now updates during UDP download (-u -R) — the TUI's \
jitter readout averaged the per-stream jitter reported in the server's \
Interval messages, but in download mode the server is the sender and never \
measures jitter, so the display stayed frozen at 0.00 ms until the final summary \
(and forever with -t 0). Per-stream intervals now overlay the client's own \
receiver-side jitter, the same receiver-truth substitution already used for byte \
counts and packet loss. (#143)
--locked builds no longer warn about a yanked dependency — bumped \
transitive spin 0.9.8 → 0.9.9 (0.9.8 was yanked on crates.io; pulled in via \
mdns-sd → flume). (#142)
Added
Opt out of the update check — the background "newer release \
available" check can now be turned off several ways: the --no-update-check \
flag, the DO_NOT_TRACK (cross-tool standard) or XFR_NO_UPDATE_CHECK environment \
variables, no_update_check = true under [client] in config.toml, or the new \
Update check toggle in the TUI settings (Display tab, persisted to prefs.toml). \
It can also be compiled out entirely with --no-default-features — the \
update-check cargo feature is on by default, so package builds can drop the \
phone-home code. (LAN-235)
Client transport defaults in config.toml — [client] now supports bitrate, \
congestion, dscp, interval_secs, bind, and cport, closing the gap with their CLI \
counterparts. Values use the same forms as the flags (for example, bitrate = \
"100M" and dscp = "EF"), and an explicit CLI value takes \
precedence.
Changed
Dependency refresh — all semver-compatible updates taken (152 packages, \
including tokio 1.53, clap 4.6.4, rustls 0.23.42, socket2 0.6.5); cleared the \
crossbeam-epoch RUSTSEC-2026-0204 advisory (dev-dependency only, via criterion). \
The chacha20poly1305/hkdf major bumps are deliberately deferred to a dedicated \
control-crypto port. The published crate also no longer bundles the README demo \
recording.
|