feat(fastestvpn): update servers data using API instead of zip file

- Add city filter
- More dynamic to servers updates on fastestvpn's end
- Update servers data
This commit is contained in:
Quentin McGaw
2024-07-30 14:50:32 +00:00
parent 8c730a6e4a
commit ab08a5e666
9 changed files with 640 additions and 364 deletions

View File

@@ -2,6 +2,7 @@ package fastestvpn
import (
"math/rand"
"net/http"
"github.com/qdm12/gluetun/internal/constants/providers"
"github.com/qdm12/gluetun/internal/provider/common"
@@ -15,12 +16,12 @@ type Provider struct {
}
func New(storage common.Storage, randSource rand.Source,
unzipper common.Unzipper, updaterWarner common.Warner,
client *http.Client, updaterWarner common.Warner,
parallelResolver common.ParallelResolver) *Provider {
return &Provider{
storage: storage,
randSource: randSource,
Fetcher: updater.New(unzipper, updaterWarner, parallelResolver),
Fetcher: updater.New(client, updaterWarner, parallelResolver),
}
}