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

internal/wguser: support for MacOS #96

Open
aep opened this issue Dec 29, 2020 · 9 comments
Open

internal/wguser: support for MacOS #96

aep opened this issue Dec 29, 2020 · 9 comments

Comments

@aep
Copy link

aep commented Dec 29, 2020

is macox supported? i'm just getting "file does not exist" for ConfigureDevice

@mdlayher
Copy link
Member

I don't have a Mac. It's possible the userspace implementation's UNIX socket lives in an unexpected path on Mac, so PRs are welcome.

@mdlayher mdlayher changed the title macos support internal/wguser: support for MacOS Dec 29, 2020
@aep
Copy link
Author

aep commented Dec 30, 2020

yeah looks like it doesnt expose the same control sockets. no idea if it can even be controlled

@d1ss0nanz
Copy link

Works fine on my device.

It's important that you bring up the interface with "wireguard-go " before you configure it.

@duyleekun
Copy link

Works fine on my device.

It's important that you bring up the interface with "wireguard-go " before you configure it.

wireguard-go works but I want to leverage the version in the Mac App Store. Could have better implementation than the wireguard-go

@mdlayher
Copy link
Member

Pretty sure they are the same underlying implementation and the GUI just connects to wireguard-go.

@qzi
Copy link

qzi commented Feb 13, 2022

Works fine on my device.

It's important that you bring up the interface with "wireguard-go " before you configure it.

it there a sample about the programming WireGuard?

@stv0g
Copy link
Contributor

stv0g commented Aug 16, 2022

@duyleekun

wireguard-go works but I want to leverage the version in the Mac App Store.
Could have better implementation than the wireguard-go

The version from the AppStore is based on WireGuardKit (wireguard-apple repo) which bundles wireguard-go as an macOS/iOS Network Extension.

WireGuardKit does not expose the UAPI via a standard socket. which wireguard-go uses.
Instead it uses device.IpcSet() to directly configure the tunnel device:
https://git.zx2c4.com/wireguard-apple/tree/Sources/WireGuardKitGo/api-apple.go

We maybe can extend WireGuardKit to also open a UAPI socket for macOS (iOS doesnt really make sense imho).
However, we would need to check if macOS Network Extensions are sandboxed and such a socket would be accessible by the user.

@nohajc
Copy link

nohajc commented Sep 9, 2023

We maybe can extend WireGuardKit to also open a UAPI socket for macOS (iOS doesnt really make sense imho). However, we would need to check if macOS Network Extensions are sandboxed and such a socket would be accessible by the user.

Hi, I have a working implementation of your suggestion. Since all software distributed via App Store has to be sandboxed, there's a limitation as to where you can place the unix socket. However, there's no problem accessing that socket from outside if you assume all the command-line tooling is not sandboxed (which is the case for Homebrew installations at least).

WireGuard/wireguard-apple#27
WireGuard/wireguard-go#89
#143
WireGuard/wireguard-tools#21

@stv0g
Copy link
Contributor

stv0g commented Sep 11, 2023

Great work 👍🏻 I would love to see this merged.

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

No branches or pull requests

7 participants