wireguard-apple icon indicating copy to clipboard operation
wireguard-apple copied to clipboard

UAPI socket for the sandboxed Wireguard app

Open nohajc opened this issue 2 years ago • 3 comments

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

nohajc avatar Sep 09 '23 13:09 nohajc

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.

skurfuerst avatar Jan 10 '24 08:01 skurfuerst

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.

nohajc avatar Jan 10 '24 09:01 nohajc

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).

seidnerj avatar Jan 10 '24 09:01 seidnerj