fixing build dependency issues

This commit is contained in:
afeiszli
2021-11-18 00:01:05 -05:00
parent 881a7ad7ae
commit 2395435d3f
3 changed files with 59 additions and 0 deletions

View File

@@ -1,9 +1,13 @@
package ncutils
import (
"fmt"
"log"
"os/exec"
"strconv"
"strings"
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
)
// RunCmd - runs a local command
@@ -19,6 +23,10 @@ func RunCmd(command string, printerr bool) (string, error) {
return string(out), err
}
func RunCmdFormatted(command string, printerr bool) (string, error) {
return "", nil
}
// CreateUserSpaceConf - creates a user space WireGuard conf
func CreateUserSpaceConf(address string, privatekey string, listenPort string, mtu int32, fwmark int32, perskeepalive int32, peers []wgtypes.PeerConfig) (string, error) {
peersString, err := parsePeers(perskeepalive, peers)