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
| Setting | No-config CLI | Repo sample / macOS operator bundle | Windows operator bundle |
|---|---|---|---|
| Proxy bind | 127.0.0.1:8443 | 127.0.0.1:4040 | 0.0.0.0:4040 inside WSL |
| Control bind | 127.0.0.1:8445 | 127.0.0.1:4042 | 0.0.0.0:4042 inside WSL |
| HTTP/3 config | Disabled, 127.0.0.1:8444 | Disabled, 127.0.0.1:4041 | Disabled, 0.0.0.0:4041 |
| Profile source | profiles/ beside executable unless overridden | ../profiles relative to sample config | ./profiles relative to runtime config |
| Default profile | None; explicit selection required in proxy mode | Repo sample: none. macOS bundle: firefox-windows. | firefox-windows |
| Keystore | Linux file; other platforms keychain | Explicit keychain; implicitly loaded Linux repo sample is changed to file by CLI | file in Linux |
| Control token | None | None in current sample/bundle | ../../../Local/404/wsl/control-token, a fixed example token in published ZIP |
| Telemetry | stdout | stdout | stdout |
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 / flag | Default or behavior |
|---|---|
listener.bind_address, .bind_port | 127.0.0.1, 8443 at the type/no-config level. |
listener.proxy_protocol | tls; accepts tls or plain. Connection classification still handles the supported entry paths. |
control.bind_address | Independently defaults to 127.0.0.1; it does not inherit a proxy bind override. |
| Control port | listener.bind_port.saturating_add(2); choose ordinary ports that leave room for adjacent listeners. |
control.token_path | Optional; unreadable configured file fails startup. Trimmed empty content disables token checking. Restart to reload a changed token. |
pipeline.profiles_path | Required in TOML; directory or JSON path. No-config CLI derives it beside the executable. |
pipeline.default_profile / --profile | None by default; --profile overrides config selection. |
pipeline.js_debug | false. |
pipeline.alt_svc_strategy | normalize; also accepts remove and redirect. |
pipeline.body_limits.max_request_body_bytes | 16777216 bytes (16 MiB). |
pipeline.body_limits.max_response_body_bytes | 33554432 bytes (32 MiB). |
pipeline.body_limits.max_decompressed_html_bytes | 16777216 bytes (16 MiB). |
http3.enabled | false; current docs do not claim a complete HTTP/3 data plane. |
http3.bind_address, .bind_port | Type defaults: 127.0.0.1, 8444. Config values are separate from TCP listener fields. |
telemetry.mode | stdout; also accepts json. Local telemetry is not an assertion of zero local logging. |
tls.keystore.mode | Backend enum: file or keychain; parsed keystore defaults to keychain, no-config Linux explicitly selects file. |
tls.keystore.service, .account | 404.static_proxy, ca_key. |
Legacy tls.ca_cert_path, .ca_key_path, .cache_dir | If supplied, only compatibility values certs/static-ca.crt, certs/static-ca.key, certs/cache are accepted; actual paths stay managed. |
--config precedence | Explicit path, otherwise existing config/static.example.toml relative to CWD, otherwise built-in defaults. |
--bind-address, --bind-port | Override proxy fields after config loading. --bind-port also sets disabled HTTP/3 config port to proxy + 1; control derives proxy + 2. |
--mode | proxy (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
| Path | Responsibility |
|---|---|
src/STATIC_proxy/src/main.rs, app.rs | CLI 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.rs | Local routes and bounded process telemetry. |
src/STATIC_proxy/profiles/ | Browser identities and inherited primitives. |
src/STATIC_proxy/assets/js/src/, build/, build.rs | Browser 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.