mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 07:16:38 +00:00
fix: windows build
This commit is contained in:
@@ -17,7 +17,6 @@ import (
|
||||
"google.golang.org/grpc/status"
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -230,17 +229,16 @@ func loginPeer(serverPublicKey wgtypes.Key, client *mgm.Client) (*mgmProto.Login
|
||||
// promptPeerSetupKey prompts user to input a Setup Key
|
||||
func promptPeerSetupKey() (*string, error) {
|
||||
fmt.Print("Enter setup key: ")
|
||||
reader := bufio.NewReader(os.Stdin)
|
||||
input, err := reader.ReadString('\n')
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
input = strings.TrimSuffix(input, "\n")
|
||||
|
||||
if input == "" {
|
||||
fmt.Print("Specified key is empty, try again.")
|
||||
return promptPeerSetupKey()
|
||||
s := bufio.NewScanner(os.Stdin)
|
||||
for s.Scan() {
|
||||
input := s.Text()
|
||||
if input != "" {
|
||||
return &input, nil
|
||||
}
|
||||
fmt.Println("Specified key is empty, try again:")
|
||||
|
||||
}
|
||||
|
||||
return &input, err
|
||||
return nil, s.Err()
|
||||
}
|
||||
|
||||
9
client/resources.rc
Normal file
9
client/resources.rc
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <windows.h>
|
||||
|
||||
#pragma code_page(65001) // UTF-8
|
||||
|
||||
#define STRINGIZE(x) #x
|
||||
#define EXPAND(x) STRINGIZE(x)
|
||||
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST manifest.xml
|
||||
wintun.dll RCDATA wintun.dll
|
||||
|
||||
BIN
client/resources_windows_amd64.syso
Normal file
BIN
client/resources_windows_amd64.syso
Normal file
Binary file not shown.
Reference in New Issue
Block a user