mirror of
https://github.com/gravitl/netmaker.git
synced 2025-02-27 17:42:57 +08:00
18 lines
450 B
Go
18 lines
450 B
Go
|
package wireguard
|
||
|
|
||
|
import "github.com/gravitl/netmaker/netclient/ncutils"
|
||
|
|
||
|
func ApplyWindowsConf(confPath string) error {
|
||
|
if _, err := ncutils.RunCmd("wireguard.exe /installtunnelservice "+confPath, true); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func RemoveWindowsConf(ifacename string, printlog bool) error {
|
||
|
if _, err := ncutils.RunCmd("wireguard.exe /uninstalltunnelservice "+ifacename, printlog); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
return nil
|
||
|
}
|