moby / vpnkit

A toolkit for embedding VPN capabilities in your application
Apache License 2.0
1.1k stars 187 forks source link

vpnkit-forwarder: new host implementation, new protocol #477

Closed djs55 closed 5 years ago

djs55 commented 5 years ago

Previously the 9P host side was inside the main vpnkit binary and used a synthetic 9P filesystem. This was sub-optimal because

This patch implements the host side of the port-forwarding system in Go and replaces the 9P protocol with a simple HTTP based one.

The control plane over HTTP can be exposed over both AF_VSOCK and as a Unix domain socket/ named pipe for maximum convenience.

The data plane can be connected either host -> VM or VM -> host, depending on your preferences (and the stability of your AF_VSOCK implementation)