browsebox is a Go standard-library CLI for launching isolated, proxy-routed Google Chrome sessions through a temporary mihomo controller. It can read node information from an existing Clash Verge Rev/mihomo controller and supports both one-shot and persistent browser sessions.
- macOS
- Clash Verge Rev / mihomo with a local controller
- Google Chrome
- Go 1.22+
From the repository root:
./build.shThe script runs tests and creates two local binaries: ./browsebox and ./skill-sync. On success it prints output like:
Building...
Done. Binaries: ./browsebox ./skill-sync
Install to PREFIX/bin (/usr/local/bin by default):
./build.sh installThe installed command names are browsebox and browsebox-skill-sync. Verify them with:
browsebox --help
browsebox-skill-sync --helpYou can also build manually:
go build -o browsebox ./cmd/browsebox
go build -o skill-sync ./cmd/skill-syncYou can also run it without creating a binary:
go run ./cmd/browsebox --helpMinimal golden path: list proxy groups, list nodes, then launch an isolated browser session with one selected node. When --group is omitted, browsebox tries to auto-match the proxy group currently selected in Clash/mihomo.
./browsebox groups
./browsebox nodes
./browsebox run --node "<node>"Show help:
./browsebox --helpList proxy groups:
./browsebox groupsCheck node delays concurrently. nodes.health.urls drives average delay, and optional nodes.capability.checks run real HTTP checks; default output shows only ok nodes sorted by ascending delay. With --show-unhealthy=true, failed capability rows and unhealthy delay rows are shown after ok rows:
./browsebox nodesIf browsebox cannot uniquely match the current proxy group, specify it explicitly:
./browsebox nodes --group "<group>"Explicitly switch the main Clash/mihomo selector to the lowest-delay ok node from the current check:
./browsebox nodes --url "https://chatgpt.com" --select-fastestLaunch a one-shot isolated browser session in the foreground. It exits on interrupt and cleans runtime files by default:
./browsebox run --node "<node>" --url "https://example.com"Launch a one-shot isolated proxy without Chrome:
./browsebox proxy --select-fastest --health-url "https://example.com"Start a persistent isolated session:
./browsebox start --node "<node>"Check persistent session status:
./browsebox statusStop the persistent session and clean state:
./browsebox stopKeep the repository-provided browsebox skill synchronized for Claude and Codex-compatible agents:
./skill-sync --check
./skill-sync --applyThe canonical source is .claude/skills/browsebox. The generated repository mirror .agents/skills/browsebox is tracked for Codex-compatible project discovery; do not edit it directly. --check validates that mirror plus the user installs at ~/.claude/skills/browsebox and ~/.agents/skills/browsebox. --apply stages and updates all three targets.
If installed through ./build.sh install, use:
browsebox-skill-sync --check
browsebox-skill-sync --applyThe skill files are not embedded in the binary. Run the installed command inside a browsebox source checkout, or pass --repo-root <checkout>.
Local structured configuration is loaded automatically from configs/config.yaml. Copy the non-sensitive template and adjust it as needed; command-line flags override local configuration:
cp configs/config.example.yaml configs/config.yamlCommon flags can be passed after any command:
./browsebox run \
--config ~/.config/mihomo/config.yaml \
--state-dir ~/.browsebox \
--node "<node>"Common configuration options:
--controller-socket <path>: Unix socket for the main Clash Verge Rev/mihomo controller. By default, browsebox checks the current user's Clash Verge service socket,verge/verge-mihomo.sockunder the system temporary directory, then the legacy/tmp/verge/verge-mihomo.sockpath. An explicit setting overrides discovery.--config <path>: source mihomo config. The default prefers~/.config/mihomo/config.yaml; if missing, browsebox probes the common macOS Clash Verge Rev config location.--runtime-dir <path>: parent directory for temporary runtime directories; if omitted, the system temp directory is used.--runtime-cache-dir <path>: mihomo geodata cache directory for reusing files such asgeositeandgeoip.--state-dir <path>: persistent session state directory, defaulting to~/.browsebox.--mihomo <path>: mihomo executable path.--interface-name <name>/mihomo.interface_name: force temporary mihomo outbound dials through a network interface such asen0; useautoto resolve the current macOS default physical interface at each startup, or leave it empty to avoid forcing an interface.--chrome <path>: Google Chrome executable path.--chrome-profile-dir <path>: Chrome profile directory; if empty, each session gets an isolated temporary profile.browser.chrome_args: extra Chrome launch arguments in config; use block-list syntax or[]. Entries may include or omit the leading--, and duplicate names are ignored after the first occurrence.user-data-dir,proxy-server, andremote-debugging-portare managed by browsebox and ignored if configured.--headless: launch Chrome in headless mode for browser-mcp / CDP automation; visible Chrome remains the default.--proxy-port <port>,--controller-port <port>,--devtools-port <port>: localhost session ports.--nodes-concurrency <n>/nodes.health.concurrency: concurrent delay-check workers fornodes, defaulting to 16. Each worker takes another node when its current node finishes.nodes.health.urls: URLs used by./browsebox nodesto calculate average delay. A node that fails health is markedunhealthyand does not run capability checks.nodes.health.probe_rounds: delay-check rounds per node and health URL.nodes.health.probe_interval_ms: delay between delay-check rounds in milliseconds.--delay-timeout-ms <ms>/nodes.delay_timeout_ms: common timeout for node delay checks and capability HTTP checks, defaulting to 5000ms; also used byrun/startstartup health checks.--capability-concurrency <n>/nodes.capability.concurrency: concurrent capability HTTP check workers. Capability workers start as soon as individual nodes pass health, and each worker uses an independent temporary mihomo instance to avoid selector races.nodes.capability.checks: optional array of real HTTP checks for./browsebox nodes.STATUS=okmeans health passed and every capability rule passed;STATUS=failedmeans health passed but at least one capability rule failed.CHECKSis-for ok rows and compact failure reasons such asopenai:unsupported_country_region_territoryfor failed rows.--show-unhealthy=true|false/nodes.show_unhealthy: whethernodesshows non-ok nodes, defaulting tofalseso only available nodes are shown.--highlight-current=true|false/nodes.highlight_current: whethernodescolor-highlights the current node, defaulting totrue; hidden current nodes are not shown separately.--group <group>/session.group: proxy group name. Leave it empty to auto-match the proxy group currently selected in Clash/mihomo; specify it explicitly if the match is ambiguous.--select-fastest: explicit opt-in fornodes; after delay and capability checks, switch the selected or auto-matched group in the main controller to the lowest-delayoknode.--health-url <url>: URL checked through the selected node beforerun/startlaunches Chrome; repeat the flag to set multiple URLs. Any failed check stops startup and cleans temporary resources.
Run the full local verification flow:
scripts/ci-local.sh cleanInstall the pre-push hook to run clean CI before each push:
scripts/install-hooks.shReleases are created from v* tags by the GitHub Release workflow:
scripts/tag-release.sh v0.1.0
git push origin v0.1.0The release workflow runs history secret scanning, multi-platform builds, checksum generation, and GitHub Release creation or update. Release archives should contain only binaries, READMEs, LICENSE, and non-sensitive configuration templates.
- By default,
nodesonly reads proxy groups and node delay from the main controller; it switches the selected or auto-matched group only when--select-fastestis passed. run/startcopy and rewrite the source config, then select<node>only inside the temporary mihomo controller.- Proxy, temporary controller, and DevTools endpoints are bound to
127.0.0.1only. - Do not commit runtime configs, state, logs, local config, or files containing credentials.
- Do not paste real node names, tokens, private service URLs, or full local absolute paths into public docs, issues, or logs.