Go library¶
The native package supplies Client, Request, Response, client options and measurement APIs. Subpackages provide profiles, captures, cookie files, fingerprint parsing, the echo server, daemon protocol and local proxy. The generated Go API reference lists exported declarations from each package.
Client is safe for concurrent use. With shipped profiles, each Do has an isolated browser network instance. Fresh creates an independent client from explicit inputs. A custom profile can choose client scope when a workflow needs state across calls.
| Task | API |
|---|---|
| Choose a profile or a validated profile value | WithProfile, WithProfileValue, profile.Load |
| Route or time requests | WithProxy, WithTimeout, WithDNSServer |
| Supply headers or cookies | WithHeaders, WithCookies, Request.Header, Request.Cookies |
| Choose a browser request kind | Request.Browser with BrowserContext |
| Inspect network events or TLS secrets | Request.Trace, WithKeyLogWriter |
| Measure a browser | MeasureBrowser, CompareToBrowser |
| Start a local proxy | proxy.Start |
Other exported options, response fields and helpers are in the generated reference. A raw WithTransportOption(WithClientProfile(...)) override is rejected before transport construction; select transport behaviour through validated profile JSON. More detailed implementation and API notes remain in the repository's Go source guide.