Skip to content

v0.7.0

Latest

Choose a tag to compare

@github-actions github-actions released this 24 Nov 01:15
Immutable release. Only release title and notes can be modified.
1a98f7b

mimicry v0.7.0

This release adds a traffic meter, decodes gzip and deflate responses about 1.7× faster, and fixes TLS 1.3 handshakes that failed on some servers, most often with the Safari profiles.

New API

  • Config.Traffic (*TrafficMeter, from NewTrafficMeter(TrafficOptions{ByHost: true})) counts the bytes a client sends and receives on the wire, by protocol (HTTP1, HTTP2, HTTP3, WebSocket, DNS, Other) and optionally by host and proxy (ByHost[Peer{Host, Proxy}]). Snapshot() reads the counts; Reset() reads them and starts from zero. It costs one uncontended atomic add per socket read or write, and nothing without a meter.

    • Python: new_traffic_meter(by_host=True), Config(traffic=meter), meter.snapshot() / reset().
    • Node: await newTrafficMeter({ byHost: true }), Config.traffic, await meter.snapshot() / reset().
    • Coming from tls-client: the counterpart of GetBandwidthTracker (see the tls-client mapping in the docs).

    (#162, #164, decision 0070)

Faster

  • gzip and deflate responses decode with klauspost/compress instead of the standard library: on a 250 KB HTML page, gzip 497 → 292 µs, zlib-wrapped deflate 548 → 340 µs and raw deflate 487 → 272 µs (Apple M3 Pro). This closes the one gap a user measured against tls-client, about 20% more CPU per gzipped request. Thanks to @themaanda for the report and benchmarks. (#168, #166)

Fixed

  • TLS 1.3 handshakes failed with invalid signature by the server certificate on servers whose certificate extensions came in an order uTLS didn't rebuild, for example example.com and payments.braintree-api.com. Safari profiles hit it most, since few servers support the zlib certificate compression Safari offers. mimicry now uses roachadam/utls v1.8.4, which hashes the server's messages as received. Thanks to @reverseSHA256, whose diagnosis in roachadam/utls#17 shaped the fix. (#167)
  • A ServerHello record with version 0x0301 after a HelloRetryRequest no longer fails the handshake; as in Chrome (BoringSSL), only the major version of unencrypted records is checked. (roachadam/utls#24, in v1.8.4)

Dependencies

  • roachadam/utls v1.8.3 → v1.8.4, klauspost/compress v1.20.2 → v1.20.5, molecule-man/go-brrr v1.2.0 → v1.3.1.
  • Go 1.27.4 or later, as in v0.6.0.

What's Changed

  • quic: a Cork never splits a datagram the send loop already checked by @roachadam in #160
  • Config.Traffic: bandwidth tracking by protocol and host by @roachadam in #164
  • Decode gzip and deflate with klauspost/compress by @roachadam in #166
  • Use roachadam/utls v1.8.4 by @roachadam in #167

Full Changelog: v0.6.0...v0.7.0