Add transport policy config

This commit is contained in:
jwinterm
2026-07-05 20:30:33 -04:00
parent 237d1e4fcb
commit ba620e32ca
14 changed files with 406 additions and 20 deletions
+15 -3
View File
@@ -17,7 +17,12 @@ user opens a URL that needs it and approves the first-use prompt.
- `gemini://` URLs use the Gemini profile.
- Reticulum-family URLs are routed to the Reticulum adapter once configured.
## Future Config Shape
## Config File
By default AMPB reads `.ampb/config.toml` from the current working directory. Commands
that make launch decisions also accept `--config <path>`.
Example configs live under `examples/`.
```toml
[browser]
@@ -26,12 +31,12 @@ state_dir = ".ampb"
[transports.tor]
enabled = true
mode = "adopt-or-manage"
mode = "adopt-or-prompt-manage"
socks_endpoint = "127.0.0.1:9050"
[transports.i2p]
enabled = true
mode = "adopt-or-manage"
mode = "adopt-or-prompt-manage"
http_proxy = "127.0.0.1:4444"
[transports.reticulum]
@@ -42,6 +47,13 @@ mode = "adopt"
isolate_by_transport = true
```
Supported transport modes:
- `disabled`: do not open URLs that require this transport.
- `adopt`: use the transport only if it is already running.
- `adopt-or-prompt-manage`: adopt a running transport, otherwise show a first-use prompt
before managed setup.
## Public And Private Files
Public docs describe behavior, configuration, and supported fixtures. Private strategy,
+1
View File
@@ -26,4 +26,5 @@ the transport adapters and browser launcher are being stabilized.
python3 -m ampbrowser open https://wownero.org/
python3 -m ampbrowser open http://example.b32.i2p/
python3 -m ampbrowser open http://example.b32.i2p/ --yes
python3 -m ampbrowser open http://example.b32.i2p/ --config examples/config.toml
```
+1
View File
@@ -7,6 +7,7 @@ transports only after the user opens a URL that needs them and approves setup.
`ampbrowser open` currently emits a dry-run launch spec. The spec includes the selected
profile, proxy endpoint, required setup steps, and whether user consent is still needed.
Transport policy comes from `.ampb/config.toml` or an explicit `--config` path.
## Lifecycle