obfs4 makes Tor traffic look like nothing at all. Not like HTTPS, not like a video call, just a stream of bytes with no visible structure. That turned out to be a good bet for about a decade, and it's still the most widely deployed pluggable transport for Tor bridges.
It was written by Yawning Angel and released in 2014, building on earlier work: obfs2, obfs3 and ScrambleSuit. Each of those fixed a weakness in the one before. Knowing what they got wrong is the easiest way to understand what obfs4 does.
The problem it had to solve
A plain Tor connection is a TLS connection, and for years Tor's TLS had quirks that set it apart: particular cipher suite lists, odd certificate fields, distinctive record sizes. Censors in China and Iran learned to spot those features with deep packet inspection. Hiding the Tor handshake became the first job.
obfs2 (2012) wrapped traffic in a layer of encryption so the TLS handshake wasn't visible. But obfs2 sent its key material in the clear at the start of the connection, so a censor that knew the protocol could just decrypt the header and confirm it was obfs2. obfs3 fixed that with a Diffie-Hellman exchange, using a trick (UniformDH) to make the public keys look like random numbers.
Then censors changed tactics. China's Great Firewall started doing active probing: when it saw a connection that looked suspicious, it would connect to the same server itself and try to speak Tor or obfs3 to it. If the server answered like a bridge, the IP was blocked within minutes. obfs3 had no defence against this. Anyone who knew the bridge's address could complete a handshake.
What obfs4 actually does
obfs4's main contribution is that you can't talk to an obfs4 bridge unless you already have a secret that came with the bridge line. That's the cert= field you see in obfs4 bridge lines. It encodes the bridge's node ID and a long-term Curve25519 public key.
When a client connects, the first thing it sends is its ephemeral public key, some random padding, and a MAC computed using the bridge's public key and node ID. The bridge checks the MAC. If it's wrong, the bridge simply doesn't respond, or more precisely, it waits and then closes the connection after reading a random amount of data, so it looks like whatever a broken server on a random port might look like. A censor's probe without the cert gets nothing useful back.
If the MAC checks out, the two sides complete a key exchange modelled on Tor's own ntor handshake, derive session keys, and from then on everything is encrypted with NaCl secretbox (XSalsa20 and Poly1305).
Making keys look random
A subtle problem: a Curve25519 public key isn't a uniformly random string. Only about half of all 32-byte values are valid curve points, and a censor could test whether the first 32 bytes of a connection decode as a point. Do that over many connections and you can tell obfs4 from noise.
obfs4 uses Elligator 2, an encoding that maps curve points to strings indistinguishable from random bytes. Only some points have such a representation, so the client generates keypairs until it gets one that does. It's the kind of detail that's easy to miss and fatal to get wrong.
Lengths and timing
Encryption hides content but not packet sizes or timing, and Tor has distinctive patterns there: fixed 514-byte cells, a particular rhythm during circuit setup. obfs4 adds random padding to frames, with a length distribution derived from a seed that's unique to each bridge, so not every obfs4 bridge has the same size profile.
The iat-mode parameter controls inter-arrival-time obfuscation. At iat-mode=0 (the default) there's no timing obfuscation. Mode 1 splits writes into MTU-sized chunks with random delays, and mode 2 goes further and randomizes packet sizes too. Higher modes cost throughput, sometimes a lot, and you'll rarely see them in distributed bridge lines.
Where obfs4 fits today
The bridge line looks like this:
obfs4 192.0.2.10:443 FINGERPRINT cert=BASE64STRING iat-mode=0
On the client, Tor Browser bundles the transport binary. The maintained implementation is lyrebird, which the Tor Project forked from Yawning Angel's obfs4proxy in 2023 and renamed. Distributions may still package it as obfs4proxy. Bridge operators install the same binary on the server side, set ServerTransportPlugin obfs4 exec /usr/bin/lyrebird in their torrc, and Tor generates the keys and cert on first run.
obfs4 still carries a big share of bridge traffic, and in a lot of countries it just works. It's what you get by default from bridges.torproject.org and the email channel, which the bridges article walks through.
Its weak spots
The design has two well-understood limits.
The first is distribution. obfs4 stops a censor from discovering a bridge by probing, but not from discovering it by asking for it. If a censor requests bridges through the same channels you do and blocks every IP it receives, probe resistance doesn't help. This is why the Tor Project spreads bridges across different channels and rate-limits them, and why private bridges shared between friends hold up so well.
The second is the "look like nothing" strategy itself. Most real traffic on the internet looks like something: TLS, QUIC, HTTP. A connection where every byte appears random from the first packet is a bit unusual. In 2023, researchers published a paper (Wu and colleagues, at USENIX Security) documenting that China's Great Firewall had started, from November 2021, blocking some connections that appeared to be fully encrypted from the first byte, using simple heuristics like the proportion of set bits and whether the first bytes are printable ASCII. That approach catches obfs4 along with Shadowsocks and VMess. The blocking is probabilistic and seems tuned to avoid too much collateral damage, but it shows the limits of looking random.
That's part of why WebTunnel exists. It goes the other way: instead of looking like nothing, look exactly like an ordinary HTTPS website. Neither approach wins everywhere, which is why Tor keeps several transports around.
One more thing people sometimes misunderstand. obfs4 is a disguise for the link between you and your bridge. It doesn't change anything about how Tor protects you once you're in the network, and it doesn't defend against traffic analysis by someone watching both ends. It answers one question, "can the censor tell this is Tor?", and nothing else.