Files
playwright/docs/guides-network-proxy-webrtc.md
Federico Elia d78d017ae2 docs: WebRTC behind a proxy, as the engine does it today (#515)
* docs: WebRTC behind a proxy, as the engine does it today

The guides described a synthetic server-reflexive candidate and an address
rewritten after the STUN reply, and said that SOCKS5 carries only TCP. None of
that is what the published packages do.

What they do, and what the pages now say: before launch the library measures
the SOCKS5 UDP relay of the proxy (UDP ASSOCIATE, a STUN Binding through the
relay, compared with the TCP exit). When the relay answers from the exit
address, WebRTC's UDP goes through it and the srflx is a real one carrying the
exit. With any other proxy no datagram leaves at all: host candidates as mDNS
names, no srflx, one icecandidateerror 701. Never a direct datagram, no option
that forces UDP or declares an address, no IPv6 candidate in any session.

SOCKS5 does define UDP (RFC 1928): the pages say so, and say why a stock
browser leaks anyway (it never asks the proxy to relay WebRTC's UDP).

The examples assert only what is guaranteed in each case, wait for the end of
gathering instead of a fixed time, and no longer require a srflx behind a proxy
that cannot carry UDP. The project's own history is out of these pages.

* docs: the WebRTC examples name a STUN server and wait for the 701, the 701 comes at about eleven seconds, the exit is discovered with an explicit timezone too
2026-11-20 08:14:28 +01:00

8.5 KiB

title, description, parent, has_children, nav_order
title description parent has_children nav_order
Network, Proxy and WebRTC Everything that happens outside the JavaScript engine: proxy authentication and DNS, WebRTC candidates, timezone derivation, TLS fingerprinting, and what a container gives away over the network. Guides true 3

Network, Proxy and WebRTC

The layer below the page: the IP a site sees, the DNS queries behind it, the candidates WebRTC exposes regardless of what the page's JavaScript does, the timezone that has to agree with the exit node, and the TLS handshake that happens before a single byte of HTML arrives. None of this is fixable from inside the page, which is exactly why it is worth understanding on its own.

Proxies, IP class and reputation

Proxy protocols, DNS and IP leaks

WebRTC candidates and leaks

TLS and HTTP fingerprint

Geo and timezone consistency