Skip to content

Releases

v0.7.0

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

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 19 Nov 01:37
Immutable release. Only release title and notes can be modified.
f6e5f72

mimicry v0.6.0

The first published Python and Node SDKs. The Go module itself has no API changes since v0.5.0.

Python and Node SDKs

  • Python: pip install mimicry-http, imported as mimicry. Sync and asyncio APIs. Python 3.11+.
  • Node: npm install mimicry-http. Promise API, ReadableStream bodies, AbortSignal. Node 22.12+ or 24+.
  • Both start mimicry's Go client as a small built-in binary (mimicry-core): no cgo, no install scripts, nothing downloaded at run time. Requests are byte-identical to the Go client's, checked in CI.
  • Platforms: Linux (glibc and musl), macOS 13+ and Windows, on x64 and arm64. On npm, the binary for your platform comes from the matching @mimicry-http/<platform>-<arch> package, installed automatically.
  • Slim Docker images without root certificates (e.g. node:*-slim) need ca-certificates installed for HTTPS.

Verifying a release

Every file is built by release.yml from this tag and published with trusted publishing (no tokens):

  • npm packages have provenance: npm audit signatures.
  • PyPI wheels have PEP 740 attestations, shown on each file's page.
  • The binaries, wheels and tarballs attached here have GitHub build provenance: gh attestation verify <file> --repo roachadam/mimicry. SHA256SUMS lists their checksums.

See docs/releasing.md.

What's Changed

  • Bindings: release pipeline for the Python and Node SDKs (#130) by @roachadam in #142
  • release: reproducible cores (ignore dist/, check vcs.modified) by @roachadam in #143
  • bindings/node: platform packages in the @mimicry-http scope by @roachadam in #144
  • release: stage npm tarballs by ./ path by @roachadam in #147
  • e2e server: take an HTTP/3 capture once the client's unidirectional streams are read (#133) by @roachadam in #146
  • bindings/python: no pipe leak on Windows spawn; file objects off the loop thread by @roachadam in #145

Full Changelog: v0.5.0...v0.6.0

v0.6.0-rc.3

v0.6.0-rc.3 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 19 Nov 00:38
Immutable release. Only release title and notes can be modified.
f6e5f72

What's Changed

  • Bindings: release pipeline for the Python and Node SDKs (#130) by @roachadam in #142
  • release: reproducible cores (ignore dist/, check vcs.modified) by @roachadam in #143
  • bindings/node: platform packages in the @mimicry-http scope by @roachadam in #144
  • release: stage npm tarballs by ./ path by @roachadam in #147
  • e2e server: take an HTTP/3 capture once the client's unidirectional streams are read (#133) by @roachadam in #146
  • bindings/python: no pipe leak on Windows spawn; file objects off the loop thread by @roachadam in #145

Full Changelog: v0.5.0...v0.6.0-rc.3

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 17 Nov 16:46
0ee8f64

mimicry v0.5.0

This release adds Brave on macOS, Windows and Linux, and Chrome 157 on macOS. Real ECH is now sent to sites that publish an ECH config. You can now use client certificates and https:// and SOCKS4 proxies. HTTP/3 can run through CONNECT-UDP proxies, TLS tickets can be saved and loaded, and a TLS key log can be written. The repository also has the first Python and Node SDKs, built from source and not yet published.

New profiles

  • brave-157-macos, brave-157-windows and brave-157-linux (profiles.BraveMacOS(), profiles.BraveWindows(), profiles.BraveLinux(); pinned as profiles.Brave157MacOS() and so on). Brave 1.99.55 (Chromium 157) was captured on each platform, with nothing inherited (decision 0067). On the wire Brave is:

    • Edge's TLS hello with Chrome's HTTP/2 preface;
    • Chrome's user agent with the Brave brand, sec-gpc: 1, and fewer client hints (all 157.0.0.0);
    • Shields, as profile rules:
      • the Accept-Language q value is farbled per site (profile.Context.AcceptLanguageQ);
      • third-party cookies are partitioned;
      • a cross-site beacon is refused with the new ErrBlocked (profile.Context.BlocksCrossSiteBeacons), and nothing is sent;
    • HTTP/3 racing TCP after 2–5 ms. On a degrading QUIC path Brave moves after 4 PTOs on every platform, as Chrome and Edge do.

    (#109, #121, #140)

  • chrome-157-macos (profiles.Chrome157MacOS()). profiles.ChromeMacOS() now returns it. chrome-156-macos stays. (#124)

New API

  • Config.Tickets (*TicketCache, from NewTicketCache()) keeps TLS and QUIC session tickets. Every Transport given the same cache shares them, as a browser's tabs do. WriteJSON and ReadJSON carry an identity's sessions to another process, so its first connections resume; Clear forgets them all.

    • A cache belongs to one browser: NewTransport refuses a profile of another browser, and ReadJSON refuses another browser's tickets.
    • Through a proxy, tickets are filed under a hash of the proxy URL, credentials included. The URL itself never goes in the saved file.
    • Chrome 156 and Firefox 159 keep tickets in memory only, so a loaded cache models a browser that stayed open (decision 0062).
    • Without the field nothing changes: each Transport keeps its own cache.

    (#103, #113)

  • Config.KeyLogWriter receives every connection's TLS secrets in NSS key log format: TCP, QUIC and WebSockets, and an https:// proxy's TLS too. Captures can then be decrypted in Wireshark. Nothing changes on the wire, and mimicry never reads SSLKEYLOGFILE (decision 0061). (#107, #112)

  • Config.GetClientCertificate answers a server that asks for a client certificate (mutual TLS), as Chrome, Edge, Brave and Firefox 159 send one (decision 0064). Profiles hold what each browser does in the new tls.clientAuth section (profile.ClientAuth):

    • signatures: the certificate is signed with the browser's scheme. Over TLS 1.2 with RSA, Chrome and Edge use PKCS#1 and Firefox uses PSS;
    • resumption: Chrome and Edge resume such a session without sending the certificate again. Firefox never resumes it;
    • restart: Chrome and Edge drop the first connection to each host and port after its CertificateRequest and send the request again on a new connection. The Transport does the same, once per host and port;
    • no coalescing: a connection that carries a certificate takes no other host's requests;
    • over HTTP/3: a server that asks over HTTP/3 moves that origin's requests to TCP.

    Profiles without tls.clientAuth (Safari, the iPhone profiles, chrome-155-macos, Firefox 158) fail with ErrNotMeasured. Without the field, a server that asks gets an empty certificate list. (#108, #116)

  • https:// proxies in Config.Proxy, as Chrome, Edge, Brave and Firefox 159 use them (decision 0065):

    • TLS to the proxy uses the profile's own hello;
    • CONNECT goes over HTTP/2 (one connection, one stream per tunnel) or HTTP/1.1, whichever ALPN picks;
    • a 407 is answered with the URL's credentials;
    • sessions to the proxy resume where the browser resumes them;
    • RootCAs, Pins, VerifyConnection and KeyLogWriter apply to the proxy's TLS too. GetClientCertificate does not.

    This is for https:// requests only. Profiles without the new proxy.https section refuse it, Safari's and the iPhone's among them. (#105, #119)

  • socks4:// and socks4a:// proxies, as each browser sends them (decision 0063, profile section proxy.socks4):

    • Chrome 156/157, Edge and Brave send SOCKS4 only. The host is looked up here, as the browser does, so socks4a is refused for them;
    • Firefox 159 sends both;
    • Safari 26/27 on macOS send the host name only, so socks4 is refused for them.

    The iPhone profiles, chrome-155-macos and Firefox 158 fail with ErrNotMeasured. With Config.DialContext set, a socks4 target's host name is refused unless Config.Resolver has its own Dial. Otherwise the lookup would bypass your dialer. Nothing goes through SOCKS4 over HTTP/3. (#106, #115)

  • Config.ConnectUDPProxy (func(proxy *url.URL) (*url.URL, error), nil by default) lets requests through an http:// or https:// proxy use HTTP/3, carried by CONNECT-UDP (RFC 9298, MASQUE). It maps each proxy to its CONNECT-UDP endpoint, often a separate host and port at the provider. Return nil to keep that proxy's requests on TCP.

    • Inside the tunnel the profile's QUIC is unchanged, with one proxy connection per site QUIC connection.
    • A proxy that refuses is remembered, and its requests stay on TCP. Safari profiles stay on TCP too.
    • No browser does this, so it is opt-in (decision 0066). It was tested against a CONNECT-UDP proxy in the harness, not against a real provider.

    (#104, #120)

Behaviour changes

These don't change the API, but a request can now go out differently than in v0.4.0:

  • Real ECH where a site publishes a config (decision 0068). The Chrome 157, Edge 157, Brave 157 and Firefox 159 profiles now carry tls.realEch. That includes the defaults behind:

    • profiles.ChromeMacOS() and profiles.ChromeLinux();
    • profiles.EdgeMacOS() and profiles.EdgeWindows();
    • profiles.FirefoxMacOS(), profiles.FirefoxWindows() and profiles.FirefoxLinux().

    These profiles look up the DNS HTTPS record of each host they connect to directly. To a host whose record carries an ECH config, they send real Encrypted Client Hello as the browser does: its choice of config and HPKE suite, its own inner hello, and its reconnection when the server rejects ECH. Before, every server got the GREASE extension.

    • The lookup: one HTTPS query per new host and port, cached by TTL. It goes through Config.Resolver's Dial when the Resolver has one. Otherwise it is plain DNS to the system's nameservers. The handshake waits for it, for up to 5 s.
    • When nothing is looked up:
      • with Config.DialContext set and no Resolver.Dial, nothing is looked up and every server gets GREASE;
      • through any proxy, and on QUIC, mimicry sends GREASE as before;
      • a WebSocket's own HTTP/1.1 connection also gets GREASE.
    • A config list that doesn't parse: Chrome, Edge and Brave fail the request with no connection. Firefox sends its usual hello.
    • HTTP/3: on Chrome and Firefox for macOS, a response over an ECH-accepted connection teaches no Alt-Svc, so that host stays on TCP with ECH.
    • To opt out, use a profile without the section: p.With(func(s *profile.Spec) { s.TLS.RealECH = nil }). There is no Config field to turn it off, as a browser has no such setting.
    • Unchanged profiles: Safari 27 on macOS ignores the configs and looks nothing up. chrome-156-* (including profiles.ChromeWindows()), chrome-155-macos, Firefox 158, Safari 26 and the iPhone profiles keep GREASE.

    (#102, #124; uTLS fork v1.8.3)

  • profiles.ChromeMacOS() now returns chrome-157-macos instead of chrome-156-macos. Use profiles.Chrome156MacOS() to keep the old one. (#124)

Language bindings

Python and Node reach mimicry through mimicry-core (cmd/mimicry-core). It is a static Go binary (CGO_ENABLED=0) that each host process starts as its own child, and the SDK talks to it over a framed, multiplexed protocol whose messages are protobuf (decision 0069). The schema is in proto/mimicry/v1/mimicry.proto. Both SDKs use Go's names in each language's casing. They cover:

  • streamed bodies with backpressure, and cancellation;
  • WebSockets;
  • VerifyConnection;
  • typed errors that follow Go's errors.Is/errors.As;
  • saving and loading cookies, tickets and Alt-Svc.

Harness tests check that requests through the core, the Python SDK and the Node SDK are byte-identical to the Go client's.

  • Python (bindings/python): import mimicry for the sync API or mimicry.aio for asyncio. Needs Python 3.11 or later. The SDK i...
Read more

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 08 Nov 16:29
be6adbc

mimicry v0.4.0

Chrome and Firefox on Linux, Edge on macOS and Windows, Firefox 159 on desktop, Chrome's client hints, and binding to a local address over HTTP/3 too. URLs are now sent as each browser parses them, a trailing-dot host's SNI as each browser sends it, and QPACK on resumed 0-RTT connections starts as the browsers' does.

New profiles

  • chrome-157-linux (profiles.ChromeLinux()) and firefox-159-linux (profiles.FirefoxLinux()). They are captured on Ubuntu 24.04; Chrome and Firefox on Fedora 45 sent the same first requests. Distribution builds and arm64 aren't covered (decision 0058). (#64, #92)

  • edge-157-macos (profiles.EdgeMacOS()) and edge-157-windows (profiles.EdgeWindows()), captured on their own rather than derived from Chrome. Edge differs from Chrome 157 in four ways (decision 0059):

    • no Trust Anchor IDs extension;
    • no image/jxl in accept;
    • the Edg/ user agent and "Microsoft Edge" brand;
    • 2-byte packet numbers on its second QUIC Initial.

    (#65, #94, #96)

  • firefox-159-macos and firefox-159-windows: profiles.FirefoxMacOS() and profiles.FirefoxWindows() now return them. The 158 profiles stay. (#76, #82)

New API

  • Config.LocalAddrs (at most one IPv4 and one IPv6 address) binds every socket mimicry opens itself: TCP, QUIC's UDP sockets and SOCKS5 UDP relays. Before, HTTP/3 ignored DialContext and left from the host's default address while HTTP/2 left from the bound one. (#81, #87)

  • Client hints (Chrome and Edge profiles; decision 0055). A navigation's Accept-CH is kept per origin and the hints are sent where Chrome sends them:

    • Critical-CH restarts a GET navigation once, on the same connection;
    • Clear-Site-Data empties the origin's set;
    • Config.ClientHintStore holds the hints: nil keeps one per Transport, and NewClientHintStore() returns a MemoryClientHintStore that saves and loads as JSON;
    • Config.ClientHints sets the machine the hints describe, and profiles.Machines and profiles.RandomMachine list the captured ones;
    • Request.ClientHints (HintsDelegated, HintsWithheld) says whether the page delegates its hints to another origin.

    (#62, #83, #84, #85)

  • req.URL.Opaque sends the request target exactly as written, path and query, as net/http does. Use it for a target a browser would rewrite, or one Go's URL parser refuses, like a lone %. (#71, #89)

Behaviour changes

These don't change the API, but a request can now go out differently than in v0.3.0:

  • URLs are sent as the browsers parse them, as measured in a new urls capture of 43 awkward URLs (decision 0057):

    • ' in a query becomes %27;
    • in a path, \ becomes / and dot segments are resolved;
    • an IPv4 host in any form becomes dotted decimal;
    • Chrome and Edge encode | in a path;
    • Firefox and Safari 26 refuse an invalid xn-- host.

    (#71, #89)

  • A trailing-dot host's SNI (https://example.com./) is sent as each browser sends it:

    • Chrome, Edge and Firefox keep the dot;
    • Safari and the iPhone profiles send no SNI, and still verify the certificate against the host.

    Before, the dot was dropped for every profile. (#88, #97, #99; uTLS fork roachadam/utls#18)

  • QPACK on a resumed 0-RTT connection: the encoder starts from the server's SETTINGS remembered with the ticket, as Chrome, Edge and Firefox do. Chrome and Edge set the table capacity again once the server's SETTINGS arrive. Before, a 0-RTT connection used no dynamic table until the handshake finished. A server that shrinks its SETTINGS on such a connection gets H3_SETTINGS_ERROR, as RFC 9114 says. (#90, #98, #99)

  • Firefox's QUIC packet numbers: before anything in a packet number space is acknowledged, a packet number goes in the fewest bytes that hold it, as Firefox does (RFC 9000 appendix A.2 asks for twice that range). This only affects Firefox's random first Initial, in about 1.6% of connections. (#91, #93)

Profiles and tooling

  • Older profiles measured:

    • firefox-158-macos and firefox-158-windows are measured for trailing-dot SNI, URLs and QPACK, from Firefox 158 itself.
    • chrome-155-macos is measured for the two network-stack rules (trailing-dot SNI and QPACK on resumption), from Chrome for Testing 155. Its URL rules stay unmeasured: | in a path and invalid xn-- hosts fail with ErrNotMeasured.

    (#99)

  • Capture tooling:

    • cmd/refresh captures Linux through WSL (-linux, -wsl) and Edge;
    • cmd/capture -firefox-app and -chrome-app take a specific browser build;
    • the release watch follows Edge Stable.

    (#92, #94, #99)

  • CI: main's harness tests take about a third of the time they did. The race detector no longer runs on single-goroutine code, and tests that wait on page timers run more subtests at once. (#100, #101)

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 03 Nov 23:23
90eb610

mimicry v0.3.0

Chrome and Firefox on iPhone, a fix for a credential leak on redirects, URLs normalised the way browsers do, and closer browser behaviour for compressed bodies, refused streams, bodiless uploads, 0-RTT and HelloRetryRequest.

Behaviour changes

These don't change the API, but a request can now go out differently than in v0.2.0:

  • Authorization is dropped once a redirect changes origin (a non-navigation request: a fetch, an XHR and the like). Before, a redirect to another origin, a subdomain included, kept the header: the token reached the new origin, and a CORS preflight went out that no browser sends. The Fetch standard deletes it, and Chrome 156 does. Navigations still refuse page-set headers after a cross-origin redirect, as before. (#51, #68)

  • Request URLs are normalised as a browser's URL parser leaves them (the WHATWG URL Standard), on the first request, every redirect hop and WebSocket URLs:

    • the host is lowercased, and a non-ASCII host becomes its punycode form (bücher.de → xn--bcher-kva.de);
    • the scheme's default port is dropped;
    • the query is percent-encoded with the standard's query set.
    • SNI, the connection pool, cookies, Origin and Referer all use that form, and resp.Request.URL is the URL sent.
    • Before, https://Example.COM:443/ sent an uppercase SNI and opened its own connection, an IDN host failed with invalid host, and a raw space in a query broke the HTTP/2 connection.
    • A host UTS #46 rejects is now an error rather than being sent.
    • ' in a query is left as written until browsers are measured (#71).

    (#48, #49, #50, #69)

  • A compressed body's Close returns at once and finishes the transport in the background (up to 4 KB, for up to 1 s). (#53, #70)

New profiles

  • chrome-157-ios (profiles.ChromeIOS()): Chrome 157 on an iPhone. (#57, #59)
  • firefox-159-ios (profiles.FirefoxIOS()): Firefox 159 on an iPhone. (#58, #66)

Both run on WebKit, like Safari, but send their own user agent and headers. Both are captured on a real iPhone; their gaps are in profiles/EVIDENCE.md and decision 0053. A profile's name carries the browser's version, not the OS's.

Wire behaviour

  • Compressed bodies:

    • after a br or deflate body, HTTP/2 no longer sends RST_STREAM CANCEL, and HTTP/1.1 no longer drops the connection;
    • the stream now ends as it does in the browser, and the HTTP/1.1 connection is reused;
    • Content-Encoding: deflate bodies without a zlib header now decode, as in Chrome.

    (#53, #54, #70)

  • 0-RTT: a resumed QUIC hello offers early_data only when the session ticket allows 0-RTT, as BoringSSL and NSS do. Before, it was offered to every server, giving Chrome and Safari a wrong extension count and JA4 on servers without 0-RTT. (#52, #67)

  • REFUSED_STREAM:

    • an HTTP/2 refused stream is resent on the same connection, which stays pooled;
    • the number of sends is the browser's: Chrome sends 3, Firefox 10;
    • a request whose body had started sending is never resent.
    • Safari, the iPhone profiles and Chrome 155 are unmeasured and keep moving to a new connection.

    (#55, #72)

  • Bodiless POST and PUT send content-length: 0 over HTTP/2 and HTTP/3, placed and framed as each browser does:

    • Chrome: after the pseudo-headers;
    • Firefox: last, with an empty DATA frame ending the HTTP/2 stream;
    • Safari: on PATCH too.

    (#56, #75)

  • HelloRetryRequest cookie: after a HelloRetryRequest, the cookie extension goes where the browser puts it:

    • Firefox: after signature_algorithms;
    • Safari: after supported_versions;
    • Chrome: shuffled with its other extensions.

    Before, it went at a random position, which a fixed-order browser never uses. (#61, #77; uTLS fork roachadam/utls#16)

The last three need a capture scenario that's new in this release. Profiles without it (Windows, the iPhone profiles, Chrome 155, Safari 26) keep their v0.2.0 behaviour for these; this is listed in profiles/EVIDENCE.md.

Profiles and tooling

  • QUIC fallback: one rule now explains, across every profile's captures, when a browser abandons a QUIC attempt that got no answer:

    • Safari, Chrome on iOS and Firefox on iOS: once the request is on TCP;
    • desktop Chrome and Firefox: never.
    • The profile generator uses that rule, chrome-157-ios's hand-set value is now derived, and no profile's value changed.

    (#60, #74)

  • Release watch: a weekly workflow keeps one issue open while Chrome, Firefox or Safari ships a version newer than the newest profile, or while Chrome's root store trust anchors differ from its profiles'. (#63, #73)

Fixes

  • A race in a refused-stream test that failed on slow CI runners. (#78)
  • CI's test shards are re-balanced, so the full run on main finishes within its time limit again. (#79)

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 23:04
5592e40

mimicry v0.2.0

Mobile and Windows profiles, a cheaper client constructor, faster HTTP/1.1 uploads, and closer browser behaviour across HTTP/2 and QUIC.

Breaking changes

Accessors name their platform

profiles.Chrome(), Firefox() and Safari() are now profiles.ChromeMacOS(), FirefoxMacOS() and SafariMacOS(), matching ChromeWindows(), FirefoxWindows() and SafariIOS() and the versioned accessors. The old names are removed. (#44)

Profiles are read-only values

Every accessor now return a read-only profile.Profile, checked and compiled once per process. Config.Profile takes that type. Building a client copies nothing: NewClient went from about 250 µs and 126 KB to about 1–2 µs and 2–3 KB.

To customise a profile, edit a copy once and reuse it:

// before
p := profiles.Chrome()
p.X = y

// after
p := profiles.ChromeMacOS().With(func(s *profile.Spec) { s.X = y })
  • profile.Spec is the editable data (the old profile.Profile struct, renamed).
  • With never fails: an invalid edit is reported by NewClient, with every problem listed.
  • Profile.Spec() returns a deep copy, for reading what a profile sends or saving it with profile.Encode.
  • profile.Parse returns a profile.Profile.
  • Per-identity headers (Accept-Language, a user agent) belong in Config.Header, not in a profile edited per client.

See ExampleProfile_With, ExampleProfile_Spec and decision 0044's amendment. (#41)

New profiles

  • safari-27-ios (profiles.SafariIOS()): Safari 27.2 on an iPhone. (#34)
  • safari-26-ios (profiles.Safari26IOS()): Safari 26.6 on an iPhone. (#36)
  • firefox-158-windows (profiles.FirefoxWindows()): Firefox 158 on Windows 10. (#39)

All three are captured on the real devices, with gaps listed in profiles/EVIDENCE.md and decisions 0047 and 0051.

Wire behaviour

  • HTTP/1.1 uploads are cut into TLS records as each browser cuts them (headers apart or joined, then 16 KB records), and uTLS's slow record-size ramp-up is off, as in every browser. Uploads go from the slowest of the impersonating clients to the fastest at 64 KB. (#33, #37)
  • Firefox's QUIC ACKs: an ACK goes at once when a packet arrives a round-trip or more after the last one, as Firefox does, instead of after the 20 ms ACK delay. (#40, #43)
  • Safari: resumes HTTP/3 with 0-RTT and closes on the server's GOAWAY; dial delays come from the captures and are off by default (Config.BrowserDialDelay). (#10, #30)
  • HTTP/2: a server's GOAWAY is answered with the profile's own (#9, #14); a connection goes idle once a complete body is closed, so CloseIdleConnections closes it (#28, #29).
  • QUIC: STREAMS_BLOCKED is sent as each browser sends it; disable_active_migration is respected; a local close's cause is reported on its streams. (#4, #13, #18, #21, #23, #26)
  • Headers: Content-Length, Transfer-Encoding and Connection are built from the request, never copied from the header map; Connection: close is honoured over HTTP/1.1. (#3, #16)

Performance and memory

  • NewClient: about 150× faster, as above. (#41)
  • HTTP/3: less CPU in the QUIC connection loop: 10 MB uploads 214 → 238 MB/s, 12% less CPU per download. (#38)
  • Rotating proxies: state is kept for the 1,024 most recently used proxy identities, and an origin's last closed HTTP/3 connection is no longer kept. (#6, #15, #19)
  • docs/performance.md has the new upload benchmarks and explains the remaining differences from the other clients, all of them browser behaviour mimicry copies on purpose. (#8, #32, #42)

Fixes

  • Flaky and load-sensitive tests: TestUDPECN on macOS, TestPins, the pool hand-off, and an HTTP/3 discovery replay. (#17, #20, #22, #24, #25, #27)

Docs

  • Rare HTTP/3 failures against nginx are an nginx bug that real Chrome triggers too: nginx reads Chrome's GREASE transport parameter by the low 16 bits of its ID. About 1 in 12,000 handshakes is refused. mimicry keeps Chrome's behaviour; docs/concepts/http3.md has a new Limits section. (#5, #31)

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 30 Oct 22:00
22881a7

First public release of mimicry, a Go HTTP client that sends requests the way real browsers do: the same TLS handshake, HTTP/2 and HTTP/3 settings, and headers in the same order.

Pre-release. Tested against real browser captures and benchmarked, but the API may still change before 1.0. Pin the version.

Highlights

  • Browser profiles captured from the real browsers: Chrome 156 and 155 on macOS, Chrome 156 on Windows, Firefox 158, Safari 27 and 26.
  • Whole-browser behaviour, not just the TLS hello: request kinds (page loads, fetch, images…), cookies, CORS preflights, redirects, HTTP/3 discovery and fallback, WebSockets.
  • Proxies: HTTP and SOCKS5, with optional HTTP/3 through SOCKS5.
  • Plain net/http: NewClient returns a standard *http.Client.
  • Fast: faster and lighter than the other impersonating Go clients we benchmarked, on HTTP/1.1, HTTP/2 and HTTP/3 (performance).

Install

go get github.com/roachadam/mimicry@v0.1.0

Docs