hotfix(config): split common VPN options per VPN type

- Split `VPN_ENDPOINT_IP` in `OPENVPN_ENDPOINT_IP` and `WIREGUARD_ENDPOINT_IP`
- Split `VPN_ENDPOINT_PORT` in `OPENVPN_ENDPOINT_PORT` and `WIREGUARD_ENDPOINT_PORT`
- Fixes bad usage of Wireguard config file endpoint for OpenVPN #2347
This commit is contained in:
Quentin McGaw
2024-07-27 10:42:01 +00:00
parent 73832d8b49
commit 36c8da7ea7
6 changed files with 14 additions and 12 deletions

View File

@@ -385,8 +385,8 @@ func (ss *ServerSelection) read(r *reader.Reader,
vpnProvider, vpnType string) (err error) {
ss.VPN = vpnType
ss.TargetIP, err = r.NetipAddr("VPN_ENDPOINT_IP",
reader.RetroKeys("OPENVPN_TARGET_IP"))
ss.TargetIP, err = r.NetipAddr("OPENVPN_ENDPOINT_IP",
reader.RetroKeys("OPENVPN_TARGET_IP", "VPN_ENDPOINT_IP"))
if err != nil {
return err
}