WireGuard / wgctrl-go

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

Add the ability to configure wireguard interface from config file #76

Closed QuantumGhost closed 4 years ago

QuantumGhost commented 4 years ago

The current wgctrl-go implementation could only read and print WireGuard interface informations, which is a bit inconvenient for users. This patch add the set subcommand to configure a network interface from configuration files.

The configuration file format comes from https://git.zx2c4.com/WireGuard/about/src/tools/man/wg.8

mdlayher commented 4 years ago

I appreciate your time and effort, but ultimately, these changes are outside the scope of this package.

The wgctrl tool is a small utility that demonstrates example use of the package. The rest of the package focuses exclusively on configuring WireGuard devices via their native interfaces. Attempting to emulate what wg-quick is doing is outside the scope of this package. That said, it could make sense for you to create your own package with this functionality that wraps wgctrl-go.

Thanks for your time, and I hope this all makes sense.