Audit changes

This commit is contained in:
jdl
2026-06-14 06:17:35 +02:00
parent cc21bee798
commit 52ea1a8d42
5 changed files with 42 additions and 9 deletions

View File

@@ -9,6 +9,7 @@ import (
"net/http"
"net/netip"
"os"
"time"
"golang.org/x/crypto/nacl/sign"
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
@@ -93,7 +94,7 @@ func initFromHub(hubURL, apiKey string, privKey wgtypes.Key) (LocalState, error)
req.SetBasicAuth("", apiKey)
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
resp, err := (&http.Client{Timeout: time.Minute}).Do(req)
if err != nil {
return LocalState{}, fmt.Errorf("hub init: %w", err)
}