chore: wallet child lifecycle + chain source + SOCKS proxy (t_1bcecf90)

This commit is contained in:
agent 2026-09-15 01:40:12 -04:00
commit 8eed7b1e7e
No known key found for this signature in database
3 changed files with 652 additions and 28 deletions

View file

@ -115,7 +115,17 @@ the app does not pick a public remote node for them.
- **Loopback** — same privacy as (1); the user owns `monerod`.
- **`.onion`** — chain traffic over Tor through a localhost SOCKS5 listener
the app provides for the wallet child (not the messenger’s Arti
`connect()`, and not a C-tor fallback for chat). Tor hides the transport.
`connect()`, and not a C-tor fallback for chat). That listener is the
bundled `arti` **binary** run as a child (`arti proxy -p <port>`) — a
second, separate Tor client with its own state and cache dirs, because
`arti-client` 0.46 exposes no SOCKS listener API. It is TCP loopback only
(`arti proxy -p` binds `127.0.0.1`/`::1`; arti 2.6.0 / `tor-config` 0.46
have no Unix-socket listen target — arti#1965), and the port is usable by
any local process at the user's privilege level: it is an app-private port,
not an access-controlled one. The app gates the spawn on the unlocked store
and waits ≤20s for the listener to accept before starting the wallet child,
so a dead proxy fails visibly instead of hanging. The SOCKS child stops
with the wallet child. Tor hides the transport.
The daemon operator still sees the wallet’s addresses during sync. The
host is the trust boundary.
- **Clearnet** — only if the user typed it. Not a default, not implied.
@ -145,7 +155,11 @@ That socket is the app talking to the wallet process, not to the chain.
**Chain** traffic is the wallet child’s connection to a Monero daemon. It is
off unless the user opted into a wallet and chose a chain source: spawned local
`monerod` (loopback), or a daemon address they entered. A `.onion` daemon is
reached through a localhost SOCKS5 proxy used only by that wallet child. A
reached through a localhost SOCKS5 proxy used only by that wallet child: the
bundled `arti` binary run as `arti proxy -p <port>`, whose `--proxy` target is
`127.0.0.1` and whose `.onion` name travels inside the SOCKS request (Monero's
SOCKS5 client sends the domain-name form, so no local DNS runs on it). The
messenger's in-process Arti client is never handed to the wallet child. A
clearnet daemon address is an explicit user choice — a clearnet socket they
asked for — not the messenger path and not a hidden default.