لم تُترجم هذه الصفحة إلى العربية بعد؛ تُعرض أدناه بلغة أخرى.
App availability presets
By default, no direct rules are relaxed for any app. When you hit availability problems with Steam downloads, Apple services or common mainland China CDNs, you can explicitly inspect and enable the corresponding preset:
bx preset ls
bx preset show gaming
bx preset apply gaming
The built-in presets are currently apple, china-cdn, douban, gaming and tencent. A preset only adds vetted direct domain rules to the client config and removes proxy rules with the same names; a running bx hot-reloads them and does not touch the TUN, routes or DNS directly. To undo an entry, use bx direct rm <domain>.
A group = one job of "making a certain kind of app work properly", not a batch of domains. The difference shows only when you are deciding "should I turn this on":
apple is about whether iCloud sync and Game Center can connect; tencent is about WeChat/Tencent Meeting sign-in, messages and media
(that group captures a real troubleshooting session — when the allowlist had only *.qq.com, Tencent Meeting ran entirely on *.tencent.com,
so signaling and media streams all detoured abroad and came back, and finding that took half an hour). gaming deliberately contains only raw bytes: game files and
updates, not store pages — if a store page's HTML went through the tunnel while its images went direct, the same page would be half US and half local.
Every entry in a preset passes the same risk gate. bx direct add refuses open-platform domains (anyone can register subdomains on
*.myqcloud.com or *.amazonaws.com, and bx's matcher is a suffix set — one direct rule covers
every one of its subdomains, so a stranger could make your real IP go outside the tunnel); presets are not allowed to bypass that gate, which is pinned by
TestNoPresetShipsARuleItsOwnCommandWouldRefuse — installing, with one click, a rule that its own command would refuse
would be the same gate giving two answers. So tencent includes only the fixed service domain *.im.qcloud.com, not object storage.
The Routing Rules window in the macOS menu bar draws these groups as checkable rows (a partially installed group shows a third state); click Show
to expand and see exactly which domains a group covers; below that is a separate section for the rules you added yourself.
If you only want to build the .app bundle without installing:
scripts/package-macos-menu.sh
open dist.noindex/macos/Bx.app
Build a distributable macOS release package:
scripts/package-macos-release.sh
Output:
dist.noindex/release/bx-macos-arm64/
Bx.app
install.sh
uninstall.sh
README.txt
dist.noindex/release/bx-macos-arm64.tar.gz
dist.noindex/release/SHA256SUMS
Bx.app/Contents/Resources embeds bx-cli, bx-bridge and release.json (sha256 digests for verification); there is no longer a bare top-level bx binary.
Before shipping, you can verify the output:
scripts/verify-macos-release.sh
macOS DNS state can be checked on its own:
bx dns status
System DNS is managed only by bx's Guardian. bx up takes over macOS DNS and bx down restores it; safe recovery, reconnect and update also re-verify DNS before reporting green, and if protection is off but DNS is still held, the reconcile loop gives it back by itself. When the menu bar shows a yellow DNS not managed or bx doctor's guardian_dns fails, follow its hint and run bx up / bx down. sudo bx dns off is only for cleaning up leftovers: bx is no longer running (for example, DNS was not restored during a forced stop) while system DNS still points at 127.0.0.1; while bx is running it refuses to act. The old bx dns on has been retired.
For real-machine macOS launchd verification, you can dry-run first:
scripts/darwin-launchd-smoke.sh
sudo BX_LINK='<client-link>' scripts/darwin-launchd-smoke.sh --execute
A safe reconnect of an already running bx can also be dry-run separately. It does not start or stop the service, and does not change DNS, routes or config; only with an explicit --execute does it trigger one bx reconnect and verify that split-default routes, DNS takeover and tunnel health are all preserved:
scripts/darwin-testkit.sh --reconnect-check
sudo scripts/darwin-testkit.sh --reconnect-check --execute
Unified install and unified update each have a real-machine acceptance script too, dry-run by default (they only package in a temporary directory and print the plan, with zero system changes); only an explicit --execute --yes actually runs them:
bash scripts/darwin-unified-install-check.sh # unified install rehearsal (dry-run)
sudo bash scripts/darwin-unified-install-check.sh --execute --yes
bash scripts/darwin-unified-update-check.sh # unified update + automatic rollback rehearsal (dry-run)
sudo bash scripts/darwin-unified-update-check.sh --execute --yes
Everyday use:
bx status
bx doctor
bx logs
bx dns status
bx down
bx up
When diagnosing for scripts or AI agents, use JSON output:
bx capabilities
bx doctor --json
sudo bx server doctor --json
sudo bx user list --json
With MCP connected, an agent can first call read-only tools such as bx_inspect, bx_leak_check and bx_logs to get structured diagnostics, and then decide whether any modifying action is needed; bx_reconnect is the only routine safe-recovery action.
bx capabilities outputs a stable, machine-readable list of capabilities, stating for each entry point whether it needs root, whether it modifies the system or network, and whether it reads sensitive config. The JSON diagnostic commands above only read state and output machine-parseable results; they do not modify system or network configuration.