Skip to main content
Complete reference for mb-local. For a walkthrough, start with Test against internal environments.

Commands

Flags

Tunnel

Host rules

Rule syntax:
--force-local sends every request the device makes through your network, including traffic to public services. It is useful when you need the app’s outbound IP to be yours, but it makes the whole device depend on your tunnel. Your administrator must enable it for your organisation before it can be used.

Corporate networks

mb-local finds your proxy automatically from HTTPS_PROXY and NO_PROXY, and from system settings on macOS. The flags are for when that guess is wrong.
Proxy auto-config (PAC) files are detected but not yet evaluated. If your machine uses one, mb-local tells you so and asks you to pass the proxy it selects with --proxy-host and --proxy-port.

Output

Environment variables

Every common flag has an environment variable. Flags win when both are set.

Exit codes

Codes 10, 13, 14, 15, 20, and 22 will not succeed on retry. The others may.

Reading status

Add --json for machine-readable output:

Running as a daemon

--daemon start returns only once the tunnel is connected, so the next command in a script can rely on it. Logs go to ~/.mb-local/<tunnel-name>.log. If a machine is killed before a tunnel is stopped, its state file is left behind. mb-local reap clears the ones whose process is gone.

Configuring a tunnel for a test run

Name the tunnel in the execution payload:
Every device in the run is pointed at that tunnel. If the tunnel is not connected when the run starts, the run fails immediately with a message naming the tunnel, rather than starting and timing out on every request.