Documentation
¶
Overview ¶
Package stealth resolves and launches a source-patched stealth Chromium so the browser tool can reach sites guarded by bot-detection challenges (Cloudflare Turnstile and the like).
A normal headless Chrome announces itself: navigator.webdriver is true, the canvas/WebGL/audio fingerprints are the stock ones, and challenge pages spot it in milliseconds. The stealth build is a Chromium compiled to lie convincingly — webdriver reads false, the fingerprint surfaces are seeded to look like an ordinary machine, and the platform can be spoofed. Antares does not ship that binary; it downloads a signed, checksum-verified copy on first use (Ed25519 over SHA256SUMS, refusing anything unverified) and caches it.
The downloaded Chromium is covered by its own upstream license, separate from Antares. Set ANTARES_STEALTH_BINARY (or CLOAKBROWSER_BINARY_PATH) to point at a binary you already have and the download is skipped entirely.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrUnsupportedPlatform = errors.New("stealth: unsupported platform") ErrInvalidVersion = errors.New("stealth: invalid version pin") ErrBinaryNotFound = errors.New("stealth: binary not found") ErrDownload = errors.New("stealth: download failed") ErrVerification = errors.New("stealth: integrity verification failed") ErrExtraction = errors.New("stealth: archive extraction failed") ErrPathTraversal = errors.New("stealth: path traversal detected in archive") )
Sentinel errors, wrappable with %w for context.
Functions ¶
func EnsureBinary ¶
EnsureBinary returns the path to the stealth Chromium, downloading and verifying it on first use. Set ANTARES_STEALTH_BINARY (or the upstream CLOAKBROWSER_BINARY_PATH) to skip the download and use a local file.
Types ¶
type Options ¶
type Options struct {
// Version pins a specific binary version ("" = platform default).
Version string
// Proxy routes traffic through a proxy, e.g. "http://host:3128" or
// "socks5://host:1080". Credentials embedded in the URL are honoured.
Proxy string
// Timezone / Locale override the fingerprint timezone/locale, e.g.
// "America/New_York" / "en-US". Empty leaves the binary's default.
Timezone string
Locale string
// Extra appends raw flags after the stealth defaults.
Extra []string
}
Options configure a stealth launch.
func (Options) Args ¶
Args builds the command-line flags for a stealth launch: the fingerprint seed and platform spoof, plus optional proxy/timezone/locale. It does NOT include --remote-debugging-port, --user-data-dir, --headless, or the window size — the caller owns those, exactly as for a normal Chrome launch.