mirror of
https://github.com/Such-Software/adaptive-multi-protocol-browser.git
synced 2026-10-17 14:31:46 +02:00
Add transport policy config
This commit is contained in:
+15
-3
@@ -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,
|
||||
|
||||
@@ -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
|
||||
```
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user