fix(wireguard): WIREGUARD_ENDPOINT_IP overrides the IP address of a picked connection

- Regression introduced in v3.39.0
- Fix #2759
This commit is contained in:
Quentin McGaw
2025-11-19 13:11:00 +00:00
parent 5ff5fc4a5e
commit 31284542a2
5 changed files with 44 additions and 29 deletions

View File

@@ -14,11 +14,11 @@ import (
type WireguardSelection struct {
// EndpointIP is the server endpoint IP address.
// It is only used with VPN providers generating Wireguard
// configurations specific to each server and user.
// To indicate it should not be used, it should be set
// to netip.IPv4Unspecified(). It can never be the zero value
// in the internal state.
// It is notably required with the custom provider.
// Otherwise it overrides any IP address from the picked
// built-in server connection. To indicate it should
// not be used, it should be set to [netip.IPv4Unspecified].
// It can never be the zero value in the internal state.
EndpointIP netip.Addr `json:"endpoint_ip"`
// EndpointPort is a the server port to use for the VPN server.
// It is optional for VPN providers IVPN, Mullvad, Surfshark