Take 21820 from config

Former-commit-id: 1cbf41e094
This commit is contained in:
Owen
2025-12-16 18:33:05 -05:00
parent 7c112def58
commit aff9c1ee49
4 changed files with 19 additions and 6 deletions
+7 -1
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