Expand description
Opt-in user-space L2/L3/L4 NAT network stack (wasm_driver_net_*) for unkernel.
Provides a classic SLiRP IPv4 subnet (10.0.2.0/24, guest 10.0.2.15, gateway 10.0.2.2,
DNS 10.0.2.3) with:
- ARP, DHCP, ICMP echo, UDP DNS A-record forwarding, and TCP NAT over host sockets.
- Zero
/etc/resolv.confreads after boot (nameservers pre-loaded before Landlock). - Built-in SSRF / homelab protection: blocks loopback, RFC1918 private, link-local, CGNAT,
and multicast IPv4 targets by default unless
allow_lan = true. - Optional
allow_hostsdomain allowlist enforced on BOTH DNS lookup and TCP connect.
Structs§
- NetConfig
- Egress network configuration for the guest VM (air-gapped by default).
- NetStack
- Host user-space NAT network stack bridged to
wasm_driver_net_*. - NetStack
Device - Adapter exposing an
Arc<NetStack>through theNetDevicetrait. - Port
Forward - Inbound host-to-guest TCP port forward (
[host_ip:]host_port:guest_port).
Constants§
Traits§
- NetDevice
- Abstract L2 Ethernet device wired to
wasm_driver_net_*inside a guest VM.
Functions§
- is_
non_ public_ ipv4 - Returns true if
ipis loopback, RFC1918 private, link-local, CGNAT, broadcast, or reserved. - load_
host_ resolvers