Add managed Tor start path

This commit is contained in:
jwinterm
2026-07-07 19:44:24 -04:00
parent 637b2e6e7c
commit 7bf833125d
10 changed files with 385 additions and 3 deletions
+2
View File
@@ -35,6 +35,8 @@ runtime_path = ""
[transports.tor]
enabled = true
mode = "adopt-or-prompt-manage"
# Optional. Used when AMPB should manage a local Tor binary.
binary_path = ""
socks_endpoint = "127.0.0.1:9050"
[transports.i2p]
+3 -1
View File
@@ -19,7 +19,8 @@ application starts. Setup is lazy:
By default, `open` output is a dry-run launch spec. Use `--launch` to create the isolated
profile and launch the configured browser runtime when the selected route is already
ready. Transport install/start remains gated by first-use approval and readiness checks.
ready. With `--launch --yes`, AMPB may start an approved managed transport before
launching. Transport setup remains gated by first-use approval and readiness checks.
## Examples
@@ -30,4 +31,5 @@ python3 -m ampbrowser open http://example.b32.i2p/ --yes
python3 -m ampbrowser open http://example.b32.i2p/ --config examples/config.toml
python3 -m ampbrowser open http://example.b32.i2p/ --platform android
python3 -m ampbrowser open https://wownero.org/ --launch
python3 -m ampbrowser open http://example.onion/ --yes --launch
```
+5 -2
View File
@@ -9,7 +9,9 @@ transports only after the user opens a URL that needs them and approves setup.
profile, proxy endpoint, browser runtime path, generated profile prefs path, required
setup steps, and whether user consent is still needed. With `--launch`, AMPB creates the
profile and starts the bundled browser only when the selected route is already ready.
Transport policy comes from `.ampb/config.toml` or an explicit `--config` path.
With `--launch --yes`, AMPB can start a configured Tor provider with AMPB-owned state
before launching. Transport policy comes from `.ampb/config.toml` or an explicit
`--config` path.
## Lifecycle
@@ -32,7 +34,8 @@ leases, tunnels, and daemon logs in that tree are local state and must not be co
## Current Adapters
- Tor: detect SOCKS on `127.0.0.1:9050`; managed setup prefers Arti/Tor runtime ownership.
- Tor: detect SOCKS on `127.0.0.1:9050`; managed start supports a configured `tor` binary
with AMPB-owned state; packaged Arti/Tor bundling remains a packaging target.
- I2P: detect HTTP proxy on `127.0.0.1:4444`; managed start planned.
- IPFS: detect HTTP gateway on `127.0.0.1:8080`; managed gateway start planned.
- Gemini: built-in route and render path; no daemon required for static browsing.