Mahoney / homebrew-tap

A Tap for my own homebrew recipes
0 stars 0 forks source link

docker-tuntap-osx requires deprecated tuntap #8

Open Mahoney opened 3 years ago

Mahoney commented 3 years ago

When I brew install mahoney/tap/docker-tuntap-osx I get the following warning:

Warning: Calling depends_on :tuntap is deprecated! There is no replacement.
Please report this issue to the mahoney/tap tap (not Homebrew/brew or Homebrew/core):
  /usr/local/Homebrew/Library/Taps/mahoney/homebrew-tap/Formula/docker-tuntap-osx.rb:10
Mahoney commented 3 years ago

docker-tuntap-osx, from which Mahoney-forks/docker-tuntap-osx was forked in order to ease packaging up as a brew formula, is a few clever shell scripts to use tuntap to bridge to Docker's networking, so tuntap is a required dependency. While Homebrew complains, it will still install tuntap.

The warning was introduced in https://github.com/Homebrew/brew/commit/87dd13aea6691e9d5e0f3ba8d1d1f862a809212a#diff-320575af4dde7cef9a4c84b17ad631c492272540dac17301308ea3c4ada141c2R13

The commit message does not explain much of the reasoning, or link to any related discussion / issues / ongoing work that would explain it (that I have found, anwyay). However it seems reasonable to assume it is because the tuntap developer has sunsetted tuntap, and installing Tuntap now requires bypassing Apple's kernel extension security.

The developer of tuntap suggested a few possible avenues of exploration:

  1. If you really need the kernel extensions on more recent operating systems, you might try the notarized kernel extensions provided by the Tunneblick project: https://github.com/Tunnelblick/Tunnelblick/tree/master/third_party
  2. utun will probably cover most cases
  3. implement a virtual ethernet device on top of the new-ish userspace driver APIs Apple has introduced

Unfortunately I do not currently have the necessary knowledge to flesh out any of these three suggestions into a working solution.

Related issues: https://github.com/AlmirKadric-Published/docker-tuntap-osx/issues/32

lorenzleutgeb commented 3 years ago

Adding to the list of references, this is a more elaborate explanation of the problems with TUN/TAP on macOS: https://tunnelblick.net/cTunTapConnections.html

Looks like using Apple's utun devices would be the easiest way out, but I don't know how to instruct HyperKit to use/create one. Maybe @AlmirKadric does?

Edit: Oh, just saw https://github.com/AlmirKadric-Published/docker-tuntap-osx/issues/32#issuecomment-746450779 which probably completely disqualifies me. Sorry.