Documentation
¶
Overview ¶
Package browserhttp builds a portable, pure-Go (CGO=0) http.Client that presents a real Chrome TLS fingerprint via uTLS. Many platforms (Reddit, Twitter, Instagram, TikTok) 403 non-browser clients based largely on the TLS ClientHello — Go's default handshake is trivially distinguishable from a browser's. Mimicking Chrome's ciphers/extensions/curves, plus a browser User-Agent and a warmed cookie jar, lets a plain Go client reach the public endpoints without any host web view. It works identically on macOS, Linux and Windows, and is shared by every provider that needs to look like a browser.
Index ¶
Constants ¶
const DefaultUserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) " +
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
DefaultUserAgent is a current desktop-Chrome User-Agent string. Providers set it (or their own) on outgoing requests; it is not applied automatically.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
NewClient returns an http.Client whose TLS handshakes impersonate Chrome and which keeps cookies across requests.
func NewTransport ¶
NewTransport returns an http.Transport that dials TLS with a Chrome fingerprint (forced to HTTP/1.1 so net/http drives the connection).
Types ¶
This section is empty.