moby / vpnkit

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

Add binaries to the releases? #550

Open protosam opened 2 years ago

protosam commented 2 years ago

Would like to use hyperkit & vpnkit for a microvm project, but I've found getting this built is harder on Windows than it is on Mac and Linux.

The entire build process seems a bit messy right now, making it really hard for an outsider to make use of this tool. Also cygwin only has opam 2.0.0 available, so it makes build consistency non-existent between platforms.

I'm currently at the point I've been trying to build opam 2.1.1 from source with windows/cygwin and I don't think it's going to work. My github action has been running for a couple hours now.

Could we just get the hyperkit binaries added to the releases for windows/mac/linux? It seems likely that the build will continue to break as opam/ocaml fail to produce consistent results as those projects evolve. In my case, I would like to spend more time testing cool ideas than living in build/dependency hell (which is where I am right now 😢 ).


Edit: As of now I've given up on making builds of vpnkit. I'm just ripping it from the Docker Desktop installers for now.

curl -sLo Docker.dmg https://desktop.docker.com/mac/main/amd64/Docker.dmg
hdiutil attach Docker.dmg
cp /Volumes/Docker/Docker.app/Contents/Resources/bin/com.docker.vpnkit ./vpnkit
umount /Volumes/Docker
xattr -c ./vpnkit
codesign --remove-signature ./vpnkit

brew install p7zip
curl -sLo DockerDesktopInstaller.exe https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe
7z -oextracted-docker-files x DockerDesktopInstaller.exe
mv extracted-docker-files/resources/vpnkit.exe ./vpnkit.exe
rm -rf extracted-docker-files

Regarding the Linux binary, I'll probably just pull that from djs55/vpnkit and relinking it.

jamesdboone commented 2 years ago

It looks like sakai135 has forked and compiled vpnkit.exe binaries and made available, but I agree, it would be much better to be able to get the binary directly from the official moby/vpnkit github location.

https://github.com/sakai135/wsl-vpnkit

protosam commented 2 years ago

For just the networking bit, I believe gvproxy from containers/gvisor-tap-vsock would do the trick. However it looks to me like vpnkit provides underpinnings for 9p support.

After getting it compiled, there's something I'm not understanding about how to use vpnkit. I've not gotten hyperkit to work with it at all. My microvm project is starting to lean away from vpnkit and I've entered the realm of compiling custom kernels and writing a fuse fs to do what I need.

The docker announcement for vpnkit made it sound like this tool was going to be viable for more than just docker desktop containers; but my experience has slowly been leading me away from wanting to use or contribute to the tool.

sakai135 commented 2 years ago

It looks like sakai135 has forked and compiled vpnkit.exe binaries and made available, but I agree, it would be much better to be able to get the binary directly from the official moby/vpnkit github location.

https://github.com/sakai135/wsl-vpnkit

I'll add a link to the release on my fork which includes the changes and the GitHub Actions run that compiled it. I too would prefer to have a binary release from moby/vpnkit.

https://github.com/sakai135/vpnkit/releases/tag/v0.5.0-20211026

cotej commented 2 years ago

+1 Would also love to see these binaries made available from an official source, as I'm finding it extremely difficult to build or find a copy for MacOS.