brdgrd—TCP Window Size modifier

Brdgrd is short for “bridge guard”: A small tool that is meant to protect Tor bridges from being scanned (and as a result blocked) by the Great Firewall of China.

Brdgrd runs in user space and makes use of the libnetfilter_queue mechanism (and hence only runs on Linux) to move packets from kernel into user space. Only TCP SYN/ACK segments are passed into user space because brdgrd is only interested in TCP handshakes and not in established connections. Hence, there are virtually no performance implications.

Brdgrd intercepts the SYN/ACK segment that a Tor bridge sends to its client. It then rewrites the TCP window size announced in this segment. The window size is rewritten to a smaller, randomly chosen value. That way, the client “fragments” its cipher list inside the TLS client hello. The GFW will not recognize the cipher list and as a result will not scan the bridge.


Update 2013-11-17 : brdgrd no longer seems to be effective as the GFC appears to be doing TCP stream reassembly now.