Skip to content

tls-virt-wasmtime: run the sandbox address check on tunneled connects - #55

Merged
lannbot merged 1 commit into
mainfrom
tunnel-addr-policy
Sep 6, 2026
Merged

tls-virt-wasmtime: run the sandbox address check on tunneled connects#55
lannbot merged 1 commit into
mainfrom
tunnel-addr-policy

Conversation

@lannbot

@lannbot lannbot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

The sandbox address check is a closure the embedder installs (WasiCtxBuilder::socket_addr_check; inherit_network() is that with |_, _| true), so the host already has it. VirtCtx now holds the same Arc that is installed on the WasiCtx, and both tunnel paths run it against the resolved real destination before dialing: inline in the 0.3 connect, inside the spawned dial task on the 0.2 start-connect (a deny surfaces through finish-connect as access-denied). Delegated sockets and tunnels share one policy.

The policy in this host is still allow-all (no CLI knob) — the change is the structure, which is what #16 item 13 asks for. README finding reworded accordingly; the "tunnels bypass the address check" limit is gone.

Gates: fmt, clippy -D warnings, just smoke-tls-virt-wasmtime (all four legs).

Automerge armed.

The address check is the embedder's closure (WasiCtxBuilder::
socket_addr_check), so the host keeps its own handle to it and runs it
against a tunnel's real destination before dialing, on both sockets
generations. Delegated sockets and tunnels share one policy; the
policy itself stays allow-all here.
@lannbot
lannbot enabled auto-merge September 6, 2026 22:29
@lannbot
lannbot merged commit 3669014 into main Sep 6, 2026
4 checks passed
@lannbot
lannbot deleted the tunnel-addr-policy branch September 6, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants