Expand description
Inbound port forwarding via L2 frame injection.
Instead of using utun + kernel routing, we inject crafted L2 Ethernet frames directly into the guest FD (socketpair) so that host-side TCP/UDP listeners can reach services inside the guest VM.
§Architecture
External client (host:8080)
│
▼
InboundListenerManager (TcpListener / UdpSocket per rule)
│ accept / recv
▼
InboundCommand channel ──► NetworkDatapath select! arm
│
▼
InboundRelay
└─ UDP: inject datagram → guest reply → forward to client
│
▼
reply_tx ──► datapath ──► guest_fd (socketpair) ──► Guest VMStructs§
- Inbound
Listener Manager - Manages host-side listeners that accept incoming connections / datagrams
and send
InboundCommandmessages to the datapath.
Enums§
- Inbound
Command - Command sent from
InboundListenerManagerlistener tasks to the datapath. - Inbound
Protocol - Protocol for port forwarding rules.