chore(models): streamline all server models IPs (#942)
- Use `IPs []net.IP` for all server models - Use `ips` JSON field for all server models - Merge IPv4 and IPv6 addresses together for Mullvad
This commit is contained in:
@@ -16,9 +16,13 @@ func (m *Mullvad) GetConnection(selection settings.ServerSelection) (
|
||||
return connection, err
|
||||
}
|
||||
|
||||
var connections []models.Connection
|
||||
connections := make([]models.Connection, 0, len(servers))
|
||||
for _, server := range servers {
|
||||
for _, IP := range server.IPs {
|
||||
if IP.To4() == nil {
|
||||
// do not use IPv6 connections for now
|
||||
continue
|
||||
}
|
||||
connection := models.Connection{
|
||||
Type: selection.VPN,
|
||||
IP: IP,
|
||||
|
||||
Reference in New Issue
Block a user