moby / vpnkit

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

Use unix sockets in vpnkit-tap-vsockd #484

Closed simonferquel closed 5 years ago

simonferquel commented 5 years ago

This changes the vpnkit-tap-vsockd to avoid using HV-Sockets directly but using a unix socket

simonferquel commented 5 years ago

@djs55 Not sure about the CI errors here. Is it only transient errors or did I break something ?

djs55 commented 5 years ago

I think the CI errors are problems with the OCaml code -- since this touches only the vpnkit-tap-vsockd process I think we can ignore them. (I know the appveyor CI is broken because of a Cygwin problem. I'm not sure why CircleCI is currently broken)

Unfortunately there are no tests for vpnkit-tap-vsockd. Perhaps the next step is to build this into an image, push it to hub and then try to test it end-to-end?

simonferquel commented 5 years ago

Do you want me to do this as part of this PR?

simonferquel commented 5 years ago

Btw, is there a linux build of vpnkit.exe somewhere ? IIUC the Makefile, it does only build for Mac and Windows.

What I wanted to do, is to run vpnkit.exe on the host, run a container with none network, bind mount the vpnkit socket and run vpnkit-tap-vsockd to bring connectivity, and validate this with docker exec wget http://www.google.com within this container.

simonferquel commented 5 years ago

Added the e2e test, and ran it in travis :)