stealth

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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

func EnsureBinary(ctx context.Context, version string) (string, error)

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

func (o Options) Args() []string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL