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

Initial wg-quick support #27

Closed nmiculinic closed 5 years ago

nmiculinic commented 5 years ago

This adds wg-quick types in the main config and adds initial marshaled for its serialization. My use case is in https://github.com/KrakenSystems/wg-operator I'm writing and Address and serialization is of great use to me.

This PR only implements marshaling and adds wg-quick fields into Config.

Related to #26

mdlayher commented 5 years ago

Aha, I see what you mean now.

I think this is a good idea for a Go package, but unfortunately, I don't think it falls within the scope of wireguardctrl, since all of these fields would not be used at all when configuring the actual WireGuard devices. I think it'd end up creating confusion for those who might expect this package to apply these configurations to the actual device.

Actually doing so would mean pulling in rtnetlink or other things, and it'd add a lot of complexity and OS-specific code.

That said, I would love to see a small package in another repository that provides this functionality. Perhaps you could embed my Config structure, or just copy/import the types you actually need.

Thanks for your time, but I'm going to close this as out of scope.