mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-03 10:24:24 +08:00
fixed window bug? removed binaries
This commit is contained in:
parent
30edc85b14
commit
6418378b07
9 changed files with 10 additions and 11 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -9,6 +9,8 @@ netclient/netclient-amd64
|
||||||
netclient/netclient-arm
|
netclient/netclient-arm
|
||||||
netclient/netclient-arm64
|
netclient/netclient-arm64
|
||||||
netclient/netclient-32
|
netclient/netclient-32
|
||||||
|
netclient/netclient32
|
||||||
|
netclient/netclient.exe
|
||||||
config/dnsconfig/
|
config/dnsconfig/
|
||||||
winsw.exe
|
winsw.exe
|
||||||
data/
|
data/
|
||||||
|
|
|
@ -108,9 +108,9 @@ func CreateServerToken(netID string) (string, error) {
|
||||||
GRPCSSL: "off",
|
GRPCSSL: "off",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Println("APIConnString:",servervals.APIConnString)
|
log.Println("APIConnString:", servervals.APIConnString)
|
||||||
log.Println("GRPCConnString:",servervals.GRPCConnString)
|
log.Println("GRPCConnString:", servervals.GRPCConnString)
|
||||||
log.Println("GRPCSSL:",servervals.GRPCSSL)
|
log.Println("GRPCSSL:", servervals.GRPCSSL)
|
||||||
accessToken.ServerConfig = servervals
|
accessToken.ServerConfig = servervals
|
||||||
accessToken.ClientConfig.Network = netID
|
accessToken.ClientConfig.Network = netID
|
||||||
accessToken.ClientConfig.Key = GenKey()
|
accessToken.ClientConfig.Key = GenKey()
|
||||||
|
@ -123,7 +123,7 @@ func CreateServerToken(netID string) (string, error) {
|
||||||
return accesskey.AccessString, err
|
return accesskey.AccessString, err
|
||||||
}
|
}
|
||||||
accesskey.AccessString = base64.StdEncoding.EncodeToString([]byte(tokenjson))
|
accesskey.AccessString = base64.StdEncoding.EncodeToString([]byte(tokenjson))
|
||||||
log.Println("accessstring:",accesskey.AccessString)
|
log.Println("accessstring:", accesskey.AccessString)
|
||||||
network.AccessKeys = append(network.AccessKeys, accesskey)
|
network.AccessKeys = append(network.AccessKeys, accesskey)
|
||||||
if data, err := json.Marshal(network); err != nil {
|
if data, err := json.Marshal(network); err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
|
@ -235,6 +235,7 @@ func UpdateNetworkNodeAddresses(networkName string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
node.Address = ipaddr
|
node.Address = ipaddr
|
||||||
|
node.PullChanges = "yes"
|
||||||
data, err := json.Marshal(&node)
|
data, err := json.Marshal(&node)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -35,9 +35,9 @@ func SetupWindowsDaemon() error {
|
||||||
ncutils.Log("finished daemon setup")
|
ncutils.Log("finished daemon setup")
|
||||||
}
|
}
|
||||||
// install daemon, will not overwrite
|
// install daemon, will not overwrite
|
||||||
ncutils.RunCmd(strings.Replace(ncutils.GetNetclientPathSpecific(), `\\`, `\`, -1)+`winsw.exe install`, true)
|
ncutils.RunCmd(strings.Replace(ncutils.GetNetclientPathSpecific(), `\\`, `\`, -1)+`winsw.exe install`, false)
|
||||||
// start daemon, will not restart or start another
|
// start daemon, will not restart or start another
|
||||||
ncutils.RunCmd(strings.Replace(ncutils.GetNetclientPathSpecific(), `\\`, `\`, -1)+`winsw.exe start`, true)
|
ncutils.RunCmd(strings.Replace(ncutils.GetNetclientPathSpecific(), `\\`, `\`, -1)+`winsw.exe start`, false)
|
||||||
ncutils.Log(strings.Replace(ncutils.GetNetclientPathSpecific(), `\\`, `\`, -1) + `winsw.exe start`)
|
ncutils.Log(strings.Replace(ncutils.GetNetclientPathSpecific(), `\\`, `\`, -1) + `winsw.exe start`)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -274,10 +274,6 @@ func SetWGConfig(network string, peerupdate bool) error {
|
||||||
} else {
|
} else {
|
||||||
err = InitWireguard(&nodecfg, privkey, peers, hasGateway, gateways)
|
err = InitWireguard(&nodecfg, privkey, peers, hasGateway, gateways)
|
||||||
}
|
}
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,7 +295,7 @@ func ApplyConf(confPath string) error {
|
||||||
var err error
|
var err error
|
||||||
switch os {
|
switch os {
|
||||||
case "windows":
|
case "windows":
|
||||||
err = ApplyWindowsConf(confPath)
|
_ = ApplyWindowsConf(confPath)
|
||||||
default:
|
default:
|
||||||
err = ApplyWGQuickConf(confPath)
|
err = ApplyWGQuickConf(confPath)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue