Fix: Empty connections for NordVPN and Windscribe
This commit is contained in:
@@ -71,8 +71,7 @@ func (n *nordvpn) GetOpenVPNConnection(selection models.ServerSelection) (
|
|||||||
|
|
||||||
connections := make([]models.OpenVPNConnection, len(servers))
|
connections := make([]models.OpenVPNConnection, len(servers))
|
||||||
for i := range servers {
|
for i := range servers {
|
||||||
connection := models.OpenVPNConnection{IP: servers[i].IP, Port: port, Protocol: selection.Protocol}
|
connections[i] = models.OpenVPNConnection{IP: servers[i].IP, Port: port, Protocol: selection.Protocol}
|
||||||
connections = append(connections, connection)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return pickRandomConnection(connections, n.randSource), nil
|
return pickRandomConnection(connections, n.randSource), nil
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ func (w *windscribe) GetOpenVPNConnection(selection models.ServerSelection) (con
|
|||||||
}
|
}
|
||||||
|
|
||||||
connections := make([]models.OpenVPNConnection, len(servers))
|
connections := make([]models.OpenVPNConnection, len(servers))
|
||||||
for _, server := range servers {
|
for i := range servers {
|
||||||
connections = append(connections, models.OpenVPNConnection{IP: server.IP, Port: port, Protocol: selection.Protocol})
|
connections[i] = models.OpenVPNConnection{IP: servers[i].IP, Port: port, Protocol: selection.Protocol}
|
||||||
}
|
}
|
||||||
|
|
||||||
return pickRandomConnection(connections, w.randSource), nil
|
return pickRandomConnection(connections, w.randSource), nil
|
||||||
|
|||||||
Reference in New Issue
Block a user