Configuration and launch

STATIC can run as a standalone binary or inside Rose. Proxy mode requires a selected profile from --profile <name> or pipeline.default_profile in TOML. --list-profiles prints the catalog without starting a listener. Profile anatomy explains the selected JSON; Build from source covers toolchain setup.

Standalone and config-driven runs

From the source checkout, after building:

./src/STATIC_proxy/target/release/static_proxy \
  --profiles-path ./src/STATIC_proxy/profiles --list-profiles
./src/STATIC_proxy/target/release/static_proxy \
  --profiles-path ./src/STATIC_proxy/profiles --profile firefox-windows

Without a config file, the CLI defaults to loopback port 8443, reserves 8444 for the disabled HTTP/3 path, and serves control on 8445. When run from src/STATIC_proxy/, an existing config/static.example.toml is loaded implicitly; that sample uses loopback proxy port 4040, a disabled HTTP/3 placeholder on 4041, and control on 4042.

cd src/STATIC_proxy
cargo run -- --config config/static.example.toml --profile edge-windows

The leading -- in cargo run -- ... separates Cargo arguments from the application’s arguments. Do not add it when invoking the binary directly. Use a browser from the same engine family as the profile; STATIC logs coherence warnings but does not enforce every match.

Config surfaces and modes

The sample TOML sets the listener, TLS keystore, pipeline.profiles_path, js_debug, alt_svc_strategy, explicit request/response/HTML body limits, disabled HTTP/3 placeholder, and telemetry. The control listener has its own bind setting and uses listener.bind_port + 2; see API authentication. A body over its configured buffer limit may fail instead of passing through unchanged. The release ZIP has a separate Windows-mounted static.runtime.toml, profiles, and token; see Distribution anatomy.

--mode proxy starts the data plane and control listener. --mode control runs the control-only sidecar. The local sample config uses a keychain keystore, while the WSL runtime TOML uses file-backed key custody inside Linux; legacy TLS path fields are compatibility inputs and the managed CA paths resolve under the app-data directory. Use GET /ca/status to locate the public certificate instead of guessing an OS-specific path. CA and trust covers private-key storage and host installation.

For local Linux or WSL eBPF development, scripts/run-static-with-ebpf-caps.sh --profile firefox-windows builds and launches STATIC with capabilities for the pinned map, using a sudo fallback on WSL. A normal cargo run can work as a proxy while map sync fails for lack of BPF permissions. See eBPF verification.

Reference provenance

The defaults below are traced to settings.rs, main.rs, and the release workflows. A config file can replace CLI defaults; relative profile/token paths resolve against the config file’s directory, while --profiles-path resolves against the current working directory.

Defaults by launch contract

SettingNo-config CLIRepo sample / macOS operator bundleWindows operator bundle
Proxy bind127.0.0.1:8443127.0.0.1:40400.0.0.0:4040 inside WSL
Control bind127.0.0.1:8445127.0.0.1:40420.0.0.0:4042 inside WSL
HTTP/3 configDisabled, 127.0.0.1:8444Disabled, 127.0.0.1:4041Disabled, 0.0.0.0:4041
Profile sourceprofiles/ beside executable unless overridden../profiles relative to sample config./profiles relative to runtime config
Default profileNone; explicit selection required in proxy modeRepo sample: none. macOS bundle: firefox-windows.firefox-windows
KeystoreLinux file; other platforms keychainExplicit keychain; implicitly loaded Linux repo sample is changed to file by CLIfile in Linux
Control tokenNoneNone in current sample/bundle../../../Local/404/wsl/control-token, a fixed example token in published ZIP
Telemetrystdoutstdoutstdout

0.0.0.0 is an all-interface bind in the runtime environment. Windows forwarding/firewall settings determine host exposure. The bundled example token is not installation-specific entropy. An explicitly requested Linux sample config retains its explicit keystore setting; the CLI’s Linux file-mode adjustment applies to the implicitly discovered repo sample.

Field reference

Field / flagDefault or behavior
listener.bind_address, .bind_port127.0.0.1, 8443 at the type/no-config level.
listener.proxy_protocoltls; accepts tls or plain. Connection classification still handles the supported entry paths.
control.bind_addressIndependently defaults to 127.0.0.1; it does not inherit a proxy bind override.
Control portlistener.bind_port.saturating_add(2); choose ordinary ports that leave room for adjacent listeners.
control.token_pathOptional; unreadable configured file fails startup. Trimmed empty content disables token checking. Restart to reload a changed token.
pipeline.profiles_pathRequired in TOML; directory or JSON path. No-config CLI derives it beside the executable.
pipeline.default_profile / --profileNone by default; --profile overrides config selection.
pipeline.js_debugfalse.
pipeline.alt_svc_strategynormalize; also accepts remove and redirect.
pipeline.body_limits.max_request_body_bytes16777216 bytes (16 MiB).
pipeline.body_limits.max_response_body_bytes33554432 bytes (32 MiB).
pipeline.body_limits.max_decompressed_html_bytes16777216 bytes (16 MiB).
http3.enabledfalse; current docs do not claim a complete HTTP/3 data plane.
http3.bind_address, .bind_portType defaults: 127.0.0.1, 8444. Config values are separate from TCP listener fields.
telemetry.modestdout; also accepts json. Local telemetry is not an assertion of zero local logging.
tls.keystore.modeBackend enum: file or keychain; parsed keystore defaults to keychain, no-config Linux explicitly selects file.
tls.keystore.service, .account404.static_proxy, ca_key.
Legacy tls.ca_cert_path, .ca_key_path, .cache_dirIf supplied, only compatibility values certs/static-ca.crt, certs/static-ca.key, certs/cache are accepted; actual paths stay managed.
--config precedenceExplicit path, otherwise existing config/static.example.toml relative to CWD, otherwise built-in defaults.
--bind-address, --bind-portOverride proxy fields after config loading. --bind-port also sets disabled HTTP/3 config port to proxy + 1; control derives proxy + 2.
--modeproxy (default) or control.

Missing optional nested fields use their serde defaults; this does not mean a TOML file can omit every top-level section. See CA and trust for managed paths and API contract for token behavior.

Implementation map

PathResponsibility
src/STATIC_proxy/src/main.rs, app.rsCLI overrides, mode selection, shared state, and listeners.
src/STATIC_proxy/src/proxy/Connections, Flows, stages, and upstream fetches.
src/STATIC_proxy/src/tls/, keystore/Certificates, transport planning, key custody.
src/STATIC_proxy/src/control.rs, telemetry.rsLocal routes and bounded process telemetry.
src/STATIC_proxy/profiles/Browser identities and inherited primitives.
src/STATIC_proxy/assets/js/src/, build/, build.rsBrowser runtime modules, bundling, and Rust embedding.

Follow Request path for the pipeline order and JavaScript runtime for the embedded bundle. The generated target/ and JS dist/ directories are build outputs, not hand-edited source.