chore(updater): set vpn field for all providers
- Bump servers model versions for all providers except mullvad, ivpn, windscribe - Do not leave `vpn` JSON field empty for any server
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/qdm12/gluetun/internal/constants/vpn"
|
||||
"github.com/qdm12/gluetun/internal/models"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
@@ -40,6 +41,7 @@ func Test_addServersFromAPI(t *testing.T) {
|
||||
expected: map[string]models.Server{
|
||||
"existinghost": {Hostname: "existinghost"},
|
||||
"host1": {
|
||||
VPN: vpn.OpenVPN,
|
||||
Region: "region1",
|
||||
Country: "country1",
|
||||
City: "location1",
|
||||
@@ -48,6 +50,7 @@ func Test_addServersFromAPI(t *testing.T) {
|
||||
UDP: true,
|
||||
},
|
||||
"host2": {
|
||||
VPN: vpn.OpenVPN,
|
||||
Region: "region2",
|
||||
Country: "country1",
|
||||
City: "location2",
|
||||
|
||||
@@ -3,6 +3,7 @@ package surfshark
|
||||
import (
|
||||
"net"
|
||||
|
||||
"github.com/qdm12/gluetun/internal/constants/vpn"
|
||||
"github.com/qdm12/gluetun/internal/models"
|
||||
)
|
||||
|
||||
@@ -11,6 +12,7 @@ type hostToServer map[string]models.Server
|
||||
func (hts hostToServer) add(host, region, country, city, retroLoc string, tcp, udp bool) {
|
||||
server, ok := hts[host]
|
||||
if !ok {
|
||||
server.VPN = vpn.OpenVPN
|
||||
server.Hostname = host
|
||||
server.Region = region
|
||||
server.Country = country
|
||||
|
||||
Reference in New Issue
Block a user