We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8fb4401 commit 1666534Copy full SHA for 1666534
intra/backend/ipn_proxies.go
@@ -115,7 +115,11 @@ func (o *RpnOps) SetPermaCreds(v bool) { o.permaCreds = v; o.rotateCreds = false
115
func (o *RpnOps) SetForceFetchServers(v bool) { o.forceFetchServers = v }
116
117
// SetPort pins a specific WireGuard port; 0 means random (default).
118
-func (o *RpnOps) SetPort(port uint16) { o.newPort = port }
+func (o *RpnOps) SetPort(port int32) {
119
+ if port >= 0 && port <= 65535 {
120
+ o.newPort = uint16(port)
121
+ }
122
+}
123
124
// Rotate reports whether a new WG keypair should be generated.
125
func (o RpnOps) Rotate() bool { return o.rotateCreds }
0 commit comments