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

how to modfiy the etc/wireguard/wg0.conf[question] #94

Closed hujianglong closed 3 years ago

hujianglong commented 3 years ago

I want to add / delete peers through wgctrl, and then reflect the relevant changes in conf. next time you start WG again, it will take effect. I don't know how to operate?

mdlayher commented 3 years ago

wg-quick and config file operations are outside the scope of this library. You'd have to pull the configuration from the kernel and update the wg-quick configuration file on your own.