WireGuard / wgctrl-go

Package wgctrl enables control of WireGuard interfaces on multiple platforms.
https://godoc.org/golang.zx2c4.com/wireguard/wgctrl
MIT License
730 stars 85 forks source link

internal/wgopenbsd: add configuration for OpenBSD kernel devices #34

Open mdlayher opened 5 years ago

mdlayher commented 5 years ago

An OpenBSD kernel implementation is being built, and the source can be found at https://git.noconroy.net/wireguard-bsd.git.

The userspace interface types can be found here: https://git.noconroy.net/wireguard-bsd.git/tree/src/if_wg.h.

We should support this interface in wireguardctrl.

mdlayher commented 5 years ago

A branch of wg which supports this interface: https://git.noconroy.net/WireGuard.git/tree/src/tools/ipc.c?h=ncon/openbsd.

mdlayher commented 5 years ago

The read-only portion of this code is done. Configuring OpenBSD devices will take more work.

mdlayher commented 4 years ago

I've implemented the updated read-only interface and plan to do the configuration API soon!

mdlayher commented 4 years ago

Current state:

-bash-5.0# WGCTRL_INTEGRATION=yesreallydoit go test -v -run=TestIntegrationClient/get .
=== RUN   TestIntegrationClient
=== RUN   TestIntegrationClient/get
=== RUN   TestIntegrationClient/get/wg0
--- PASS: TestIntegrationClient (0.00s)
    --- PASS: TestIntegrationClient/get (0.00s)
        --- SKIP: TestIntegrationClient/get/wg0 (0.00s)
            client_integration_test.go:129: device: wg0: DlluwkFvqfsG3MZ0Gh3m+KILoRp6cvVHeQ8/BEE2pH8=
            client_integration_test.go:83: skipping, device "wg0" implementation is read-only
=== RUN   TestIntegrationClientIsNotExist
--- PASS: TestIntegrationClientIsNotExist (0.00s)
PASS
ok      golang.zx2c4.com/wireguard/wgctrl       (cached)
stv0g commented 1 year ago

@mdlayher I am planning to pick up this work. Are there any major obstacles? Or do you still have a branch with some WIP code?

mdlayher commented 1 year ago

@stv0g please do, thanks! I implemented this as an experiment and chance to learn, but never got to the configuration.