Today's anti-fraud no longer believes the user agent — the check consists of a whole stack of layers
WebRTC leak
When the browser works through an HTTP(S) or SOCKS proxy, TCP traffic goes through a separate node, but WebRTC is a clever technology: it establishes a direct, unencrypted (P2P) connection over UDP packets, bypassing the proxy, and as a result your real IP leaks — and no proxy saves you
Solution
Launch with the flag:
Code:
--force-webrtc-ip-handling-policy=disable_non_proxied_udp
and disable multiple routes through prefs:
Code:
webrtc.multiple_routes_enabled = False
System font check
Many people think sites look at fonts with the ordinary document.fonts.check() method, but in reality that is not how it works at all.
What actually happens: an invisible canvas or a <span> block is created, test characters are written into it, and the element's width is measured. If the size matches the default, the font is not there; if it differs, it is.
Solution
Intercept CanvasRenderingContext2D.prototype.font and CSSStyleDeclaration.prototype.fontFamily. If the site requests a font that is not in our config, we substitute another font so that the site believes it is there.
Quote:- Do you see the gopher?
- No...
- Neither do I... But he is there!
Iframe leaks
When a script only overrides methods, a checker tests:
- Whether Function.prototype.toString.call(method) returns the string function () { [native code] }
- Whether the getter has a .prototype property
- What an empty iframe shows. The checker runs document.createElement('iframe'), takes iframe.contentWindow.Function.prototype.toString from it and points it at functions of the main window
Solution
Intercept contentWindow and contentDocument on the HTMLIFrameElement prototype