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

@@ -31,11 +31,7 @@ func (w *Windscribe) GetConnection(selection configuration.ServerSelection) (
}
}
if selection.TargetIP != nil {
return utils.GetTargetIPConnection(connections, selection.TargetIP)
}
return utils.PickRandomConnection(connections, w.randSource), nil
return utils.PickConnection(connections, selection, w.randSource)
}
func getPort(selection configuration.ServerSelection) (port uint16) {