@@ -8,6 +8,7 @@ import (
|
||||
"github.com/qdm12/gluetun/internal/updater/providers/cyberghost"
|
||||
"github.com/qdm12/gluetun/internal/updater/providers/fastestvpn"
|
||||
"github.com/qdm12/gluetun/internal/updater/providers/hidemyass"
|
||||
"github.com/qdm12/gluetun/internal/updater/providers/ipvanish"
|
||||
"github.com/qdm12/gluetun/internal/updater/providers/ivpn"
|
||||
"github.com/qdm12/gluetun/internal/updater/providers/mullvad"
|
||||
"github.com/qdm12/gluetun/internal/updater/providers/nordvpn"
|
||||
@@ -77,6 +78,26 @@ func (u *updater) updateHideMyAss(ctx context.Context) (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (u *updater) updateIpvanish(ctx context.Context) (err error) {
|
||||
minServers := getMinServers(len(u.servers.Ipvanish.Servers))
|
||||
servers, warnings, err := ipvanish.GetServers(
|
||||
ctx, u.unzipper, u.presolver, minServers)
|
||||
if u.options.CLI {
|
||||
for _, warning := range warnings {
|
||||
u.logger.Warn("Ipvanish: %s", warning)
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if u.options.Stdout {
|
||||
u.println(ipvanish.Stringify(servers))
|
||||
}
|
||||
u.servers.Ipvanish.Timestamp = u.timeNow().Unix()
|
||||
u.servers.Ipvanish.Servers = servers
|
||||
return nil
|
||||
}
|
||||
|
||||
func (u *updater) updateIvpn(ctx context.Context) (err error) {
|
||||
minServers := getMinServers(len(u.servers.Ivpn.Servers))
|
||||
servers, warnings, err := ivpn.GetServers(
|
||||
|
||||
Reference in New Issue
Block a user