UAPI socket for the sandboxed Wireguard app
This change makes it possible to configure tunnels created by the App Store Wireguard UI using wg and wgctrl-go.
It's an implementation of this suggestion: https://github.com/WireGuard/wgctrl-go/issues/96#issuecomment-1216933842
Because the app is sandboxed, you cannot create the socket in its usual location (/var/run/wireguard).
It should be possible to configure an exception for the path but in practice it only works with regular files and not Unix domain sockets. That's why I create the socket inside the app's sandbox folder instead (~/Library/Containers/com.wireguard.macos.network-extension/Data). There's no problem connecting to that socket from outside as the command-line tooling is typically not sandboxed itself.
I'm also submitting pull requests to modify wireguard-go, wgctrl-go and wireguard-tools to work with this alternative path.
https://github.com/WireGuard/wireguard-go/pull/89 https://github.com/WireGuard/wgctrl-go/pull/143 https://github.com/WireGuard/wireguard-tools/pull/21
Looks awesome :) What is needed to get this merged? :) This repo is only a mirror of https://git.zx2c4.com/wireguard-apple - I do not know how to get changes merged upstream.
I'm aware. I also wrote to the official mailing list without any response so far.
I think what's needed is @zx2c4's blessing.
There hasn't been any commits (not to mention releases) neither here on in the original repo since February 2023, going on 11 months. It seems like his project is dead. The WireGuard macOS app is completely broken, it doesn't really work - I've resorted to using the command line (sudo wg-quick up wg0 and sudo wg-quick down wg0) to activate/deactivate the vpn. it sucks. Maybe need to consider moving to an alternative like tailscale (which is actually built on wireguard but does have a functioning and supported client).