Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UAPI socket for the sandboxed Wireguard app #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nohajc
Copy link

@nohajc nohajc commented Sep 9, 2023

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: WireGuard/wgctrl-go#96 (comment)

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.

WireGuard/wireguard-go#89
WireGuard/wgctrl-go#143
WireGuard/wireguard-tools#21

Signed-off-by: Jan Noha <[email protected]>
Copy link

@stv0g stv0g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@skurfuerst
Copy link

skurfuerst commented Jan 10, 2024

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.

@nohajc
Copy link
Author

nohajc commented Jan 10, 2024

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.

@seidnerj
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants