Repository navigation
v0.5.0
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-windowsandbrave-157-linux(profiles.BraveMacOS(),profiles.BraveWindows(),profiles.BraveLinux(); pinned asprofiles.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
Bravebrand,sec-gpc: 1, and fewer client hints (all157.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;
- the Accept-Language q value is farbled per site (
- 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.
-
chrome-157-macos(profiles.Chrome157MacOS()).profiles.ChromeMacOS()now returns it.chrome-156-macosstays. (#124)
New API
-
Config.Tickets(*TicketCache, fromNewTicketCache()) keeps TLS and QUIC session tickets. Every Transport given the same cache shares them, as a browser's tabs do.WriteJSONandReadJSONcarry an identity's sessions to another process, so its first connections resume;Clearforgets them all.- A cache belongs to one browser:
NewTransportrefuses a profile of another browser, andReadJSONrefuses 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.
- A cache belongs to one browser:
-
Config.KeyLogWriterreceives every connection's TLS secrets in NSS key log format: TCP, QUIC and WebSockets, and anhttps://proxy's TLS too. Captures can then be decrypted in Wireshark. Nothing changes on the wire, and mimicry never readsSSLKEYLOGFILE(decision 0061). (#107, #112) -
Config.GetClientCertificateanswers 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 newtls.clientAuthsection (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 withErrNotMeasured. Without the field, a server that asks gets an empty certificate list. (#108, #116) -
https://proxies inConfig.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,VerifyConnectionandKeyLogWriterapply to the proxy's TLS too.GetClientCertificatedoes not.
This is for
https://requests only. Profiles without the newproxy.httpssection refuse it, Safari's and the iPhone's among them. (#105, #119) -
socks4://andsocks4a://proxies, as each browser sends them (decision 0063, profile sectionproxy.socks4):- Chrome 156/157, Edge and Brave send SOCKS4 only. The host is looked up here, as the browser does, so
socks4ais refused for them; - Firefox 159 sends both;
- Safari 26/27 on macOS send the host name only, so
socks4is refused for them.
The iPhone profiles,
chrome-155-macosand Firefox 158 fail withErrNotMeasured. WithConfig.DialContextset, asocks4target's host name is refused unlessConfig.Resolverhas its ownDial. Otherwise the lookup would bypass your dialer. Nothing goes through SOCKS4 over HTTP/3. (#106, #115) - Chrome 156/157, Edge and Brave send SOCKS4 only. The host is looked up here, as the browser does, so
-
Config.ConnectUDPProxy(func(proxy *url.URL) (*url.URL, error), nil by default) lets requests through anhttp://orhttps://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.
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()andprofiles.ChromeLinux();profiles.EdgeMacOS()andprofiles.EdgeWindows();profiles.FirefoxMacOS(),profiles.FirefoxWindows()andprofiles.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'sDialwhen 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.DialContextset and noResolver.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.
- with
- 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 noConfigfield 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-*(includingprofiles.ChromeWindows()),chrome-155-macos, Firefox 158, Safari 26 and the iPhone profiles keep GREASE.
-
profiles.ChromeMacOS()now returnschrome-157-macosinstead ofchrome-156-macos. Useprofiles.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): importmimicryfor the sync API ormimicry.aiofor asyncio. Needs Python 3.11 or later. The SDK is fork-safe: a child starts its own core. - Node (
bindings/node): a Promise API withReadableStreambodies andAbortSignalcancellation. Needs Node 22.12+ or 24+.
Not published in this release. Both SDKs are in the repository under bindings/, and you build them from source: see the Development section of each SDK's README. Neither is on PyPI or npm yet. The package name mimicry-http is provisional. Publishing is tracked in #130. (#111, #125, #131, #132, #134, #135, #138)
Profiles and tooling
-
New profile sections, all derived by hellogen from new captures and never hand-edited:
tls.clientAuth;tls.realEch;proxy.https;proxy.socks4.
-
Capture tooling:
- Brave launcher and
cmd/refreshtargets; - the release watch follows Brave;
- Linux browsers run in their own process group.
(#121)
- Brave launcher and
-
h3gen now places a path move after the last probe the browser sent before it. Brave on macOS and Windows go from
afterPtos3 to 4. (#140) -
Module:
go 1.27.4(was 1.27.3);- the uTLS fork is now the tagged
github.com/roachadam/utls v1.8.3; - new requirements
google.golang.org/protobuf(the bindings' core) andgithub.com/bufbuild/protocompile(its schema tests).
-
Tests and CI:
- the HTTP/3 replays wait for the state they compare;
- loss-driven ACKs are left out of the ACK cadence check;
- CodeQL action bump.