wg-cmd icon indicating copy to clipboard operation
wg-cmd copied to clipboard

Can it be used headless?

Open cornzzy opened this issue 1 year ago • 1 comments

I'm trying to automate peer add/delete. Can I use this without the interface in a non blocking way? Just run one command and output the new peer config instead of it waiting for the next input.

wg-cmd wg0 delete <peerpublickey> wg-cmd wg0 add

cornzzy avatar Aug 19 '24 04:08 cornzzy

Not at the moment. It should not be difficult to add this however. Package https://github.com/AndrianBdn/wg-cmd/tree/main/backend has most of the functions implemented.

Are you sure you need wg-cmd at all? You can add peers with command line using wg/wg-quick that bundled with WireGuard. See https://gist.github.com/chrisswanda/88ade75fc463dcf964c6411d1e9b20f4

AndrianBdn avatar Aug 19 '24 13:08 AndrianBdn