adding necessary changes for client and server key to work

This commit is contained in:
afeiszli
2021-04-13 01:10:57 -04:00
parent 2ea497c6ff
commit 587442dfe3
3 changed files with 9 additions and 5 deletions

View File

@@ -93,7 +93,7 @@ func Install(accesskey string, password string, server string, network string, n
log.Fatalf("Something went wrong decoding your token: %v", err)
}
token := string(btoken)
tokenvals := strings.Split(token, ".")
tokenvals := strings.Split(token, "|")
tserver = tokenvals[0]
tnetwork = tokenvals[1]
tkey = tokenvals[2]
@@ -108,11 +108,15 @@ func Install(accesskey string, password string, server string, network string, n
if accesskey == "badkey" {
accesskey = tkey
}
fmt.Println(trange)
if trange != "" {
islocal = true
_, localrange, err = net.ParseCIDR(trange)
printrange = localrange.String()
if err == nil {
printrange = localrange.String()
} else {
//localrange = ""
}
} else {
printrange = "Not a local network. Will use public address for endpoint."
}