Take 21820 from config

This commit is contained in:
Owen
2025-12-16 18:32:31 -05:00
parent 9bc35433ef
commit 1cbf41e094
4 changed files with 19 additions and 6 deletions

View File

@@ -37,6 +37,7 @@ import (
type WgData struct {
Endpoint string `json:"endpoint"`
RelayPort uint16 `json:"relayPort"`
PublicKey string `json:"publicKey"`
ServerIP string `json:"serverIP"`
TunnelIP string `json:"tunnelIP"`
@@ -691,7 +692,12 @@ func runNewtMain(ctx context.Context) {
return
}
clientsHandleNewtConnection(wgData.PublicKey, endpoint)
relayPort := wgData.RelayPort
if relayPort == 0 {
relayPort = 21820
}
clientsHandleNewtConnection(wgData.PublicKey, endpoint, relayPort)
// Configure WireGuard
config := fmt.Sprintf(`private_key=%s