Feat: OPENVPN_TARGET_IP overrides IP

- Check target IP matches a server for Wireguard since we need the public key
- Streamline connection picking for all providers
This commit is contained in:
Quentin McGaw (desktop)
2021-08-28 19:07:44 +00:00
parent c6fedd9214
commit 119cac5a67
20 changed files with 61 additions and 118 deletions

View File

@@ -34,9 +34,5 @@ func (p *Protonvpn) GetConnection(selection configuration.ServerSelection) (
}
}
if selection.TargetIP != nil {
return utils.GetTargetIPConnection(connections, selection.TargetIP)
}
return utils.PickRandomConnection(connections, p.randSource), nil
return utils.PickConnection(connections, selection, p.randSource)
}