mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-10 04:30:20 +02:00
chore(updater): move updater packages to pkg/updaters/<name>
This commit is contained in:
@@ -5,8 +5,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/airvpn/updater"
|
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
|
"github.com/qdm12/gluetun/pkg/updaters/airvpn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -21,7 +21,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(client),
|
Fetcher: airvpn.New(client),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ var (
|
|||||||
|
|
||||||
type Fetcher interface {
|
type Fetcher interface {
|
||||||
FetchServers(ctx context.Context, minServers int) (servers []models.Server, err error)
|
FetchServers(ctx context.Context, minServers int) (servers []models.Server, err error)
|
||||||
|
Version() uint16
|
||||||
}
|
}
|
||||||
|
|
||||||
type ParallelResolver interface {
|
type ParallelResolver interface {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/cyberghost/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/cyberghost"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -20,7 +20,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(parallelResolver, updaterWarner),
|
Fetcher: cyberghost.New(parallelResolver, updaterWarner),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/example/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/example"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -23,7 +23,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(updaterWarner, unzipper, client, parallelResolver),
|
Fetcher: example.New(updaterWarner, unzipper, client, parallelResolver),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/expressvpn/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/expressvpn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -21,7 +21,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(unzipper, updaterWarner, parallelResolver),
|
Fetcher: expressvpn.New(unzipper, updaterWarner, parallelResolver),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/fastestvpn/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/fastestvpn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -22,7 +22,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(client, updaterWarner, parallelResolver),
|
Fetcher: fastestvpn.New(client, updaterWarner, parallelResolver),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/giganews/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/giganews"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -21,7 +21,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(unzipper, updaterWarner, parallelResolver),
|
Fetcher: giganews.New(unzipper, updaterWarner, parallelResolver),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/hidemyass/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/hidemyass"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -22,7 +22,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(client, updaterWarner, parallelResolver),
|
Fetcher: hidemyass.New(client, updaterWarner, parallelResolver),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/ipvanish/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/ipvanish"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -21,7 +21,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(unzipper, updaterWarner, parallelResolver),
|
Fetcher: ipvanish.New(unzipper, updaterWarner, parallelResolver),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/ivpn/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/ivpn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -22,7 +22,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(client, updaterWarner, parallelResolver),
|
Fetcher: ivpn.New(client, updaterWarner, parallelResolver),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/mullvad/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/mullvad"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -21,7 +21,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(client),
|
Fetcher: mullvad.New(client),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/nordvpn/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/nordvpn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -21,7 +21,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(client, updaterWarner),
|
Fetcher: nordvpn.New(client, updaterWarner),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/perfectprivacy/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/perfectprivacy"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -20,7 +20,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(unzipper, updaterWarner),
|
Fetcher: perfectprivacy.New(unzipper, updaterWarner),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/privado/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/privado"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -21,7 +21,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(client, updaterWarner),
|
Fetcher: privado.New(client, updaterWarner),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/privateinternetaccess/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/privateinternetaccess"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -30,7 +30,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
timeNow: timeNow,
|
timeNow: timeNow,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
portForwardPath: jsonPortForwardPath,
|
portForwardPath: jsonPortForwardPath,
|
||||||
Fetcher: updater.New(client),
|
Fetcher: privateinternetaccess.New(client),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/privatevpn/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/privatevpn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -21,7 +21,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(unzipper, updaterWarner, parallelResolver),
|
Fetcher: privatevpn.New(unzipper, updaterWarner, parallelResolver),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/protonvpn/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/protonvpn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -23,7 +23,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(client, updaterWarner, email, password),
|
Fetcher: protonvpn.New(client, updaterWarner, email, password),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/purevpn/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/purevpn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -21,7 +21,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(ipFetcher, unzipper, updaterWarner, parallelResolver),
|
Fetcher: purevpn.New(ipFetcher, unzipper, updaterWarner, parallelResolver),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/slickvpn/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/slickvpn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -22,7 +22,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(client, updaterWarner, parallelResolver),
|
Fetcher: slickvpn.New(client, updaterWarner, parallelResolver),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/surfshark/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/surfshark"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -22,7 +22,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(client, unzipper, updaterWarner, parallelResolver),
|
Fetcher: surfshark.New(client, unzipper, updaterWarner, parallelResolver),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
package updater
|
|
||||||
|
|
||||||
import (
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/updater/resolver"
|
|
||||||
)
|
|
||||||
|
|
||||||
func parallelResolverSettings(hosts []string) (settings resolver.ParallelSettings) {
|
|
||||||
const (
|
|
||||||
maxFailRatio = 0.1
|
|
||||||
maxDuration = 20 * time.Second
|
|
||||||
betweenDuration = time.Second
|
|
||||||
maxNoNew = 2
|
|
||||||
maxFails = 2
|
|
||||||
)
|
|
||||||
return resolver.ParallelSettings{
|
|
||||||
Hosts: hosts,
|
|
||||||
MaxFailRatio: maxFailRatio,
|
|
||||||
Repeat: resolver.RepeatSettings{
|
|
||||||
MaxDuration: maxDuration,
|
|
||||||
BetweenDuration: betweenDuration,
|
|
||||||
MaxNoNew: maxNoNew,
|
|
||||||
MaxFails: maxFails,
|
|
||||||
SortIPs: true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/torguard/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/torguard"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -21,7 +21,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(unzipper, updaterWarner, parallelResolver),
|
Fetcher: torguard.New(unzipper, updaterWarner, parallelResolver),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
package updater
|
|
||||||
|
|
||||||
import (
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/updater/resolver"
|
|
||||||
)
|
|
||||||
|
|
||||||
func parallelResolverSettings(hosts []string) (settings resolver.ParallelSettings) {
|
|
||||||
const (
|
|
||||||
maxFailRatio = 0.1
|
|
||||||
maxDuration = 20 * time.Second
|
|
||||||
betweenDuration = time.Second
|
|
||||||
maxNoNew = 2
|
|
||||||
maxFails = 2
|
|
||||||
)
|
|
||||||
return resolver.ParallelSettings{
|
|
||||||
Hosts: hosts,
|
|
||||||
MaxFailRatio: maxFailRatio,
|
|
||||||
Repeat: resolver.RepeatSettings{
|
|
||||||
MaxDuration: maxDuration,
|
|
||||||
BetweenDuration: betweenDuration,
|
|
||||||
MaxNoNew: maxNoNew,
|
|
||||||
MaxFails: maxFails,
|
|
||||||
SortIPs: true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
package updater
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Updater struct {
|
|
||||||
unzipper common.Unzipper
|
|
||||||
parallelResolver common.ParallelResolver
|
|
||||||
warner common.Warner
|
|
||||||
}
|
|
||||||
|
|
||||||
func New(unzipper common.Unzipper, warner common.Warner,
|
|
||||||
parallelResolver common.ParallelResolver,
|
|
||||||
) *Updater {
|
|
||||||
return &Updater{
|
|
||||||
unzipper: unzipper,
|
|
||||||
parallelResolver: parallelResolver,
|
|
||||||
warner: warner,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -25,3 +25,7 @@ func (n *NoFetcher) FetchServers(context.Context, int) (
|
|||||||
) {
|
) {
|
||||||
return nil, fmt.Errorf("%w: for %s", ErrFetcherNotSupported, n.providerName)
|
return nil, fmt.Errorf("%w: for %s", ErrFetcherNotSupported, n.providerName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (n *NoFetcher) Version() uint16 {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/vpnsecure/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/vpnsecure"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -22,7 +22,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(client, updaterWarner, parallelResolver),
|
Fetcher: vpnsecure.New(client, updaterWarner, parallelResolver),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
package updater
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Updater struct {
|
|
||||||
client *http.Client
|
|
||||||
parallelResolver common.ParallelResolver
|
|
||||||
warner common.Warner
|
|
||||||
}
|
|
||||||
|
|
||||||
func New(client *http.Client, warner common.Warner,
|
|
||||||
parallelResolver common.ParallelResolver,
|
|
||||||
) *Updater {
|
|
||||||
return &Updater{
|
|
||||||
client: client,
|
|
||||||
parallelResolver: parallelResolver,
|
|
||||||
warner: warner,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/vpnunlimited/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/vpnunlimited"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -21,7 +21,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(unzipper, updaterWarner, parallelResolver),
|
Fetcher: vpnunlimited.New(unzipper, updaterWarner, parallelResolver),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
package updater
|
|
||||||
|
|
||||||
import (
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/updater/resolver"
|
|
||||||
)
|
|
||||||
|
|
||||||
func parallelResolverSettings(hosts []string) (settings resolver.ParallelSettings) {
|
|
||||||
const (
|
|
||||||
maxFailRatio = 0.1
|
|
||||||
maxDuration = 20 * time.Second
|
|
||||||
betweenDuration = time.Second
|
|
||||||
maxNoNew = 2
|
|
||||||
maxFails = 2
|
|
||||||
)
|
|
||||||
return resolver.ParallelSettings{
|
|
||||||
Hosts: hosts,
|
|
||||||
MaxFailRatio: maxFailRatio,
|
|
||||||
Repeat: resolver.RepeatSettings{
|
|
||||||
MaxDuration: maxDuration,
|
|
||||||
BetweenDuration: betweenDuration,
|
|
||||||
MaxNoNew: maxNoNew,
|
|
||||||
MaxFails: maxFails,
|
|
||||||
SortIPs: true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
package updater
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Updater struct {
|
|
||||||
unzipper common.Unzipper
|
|
||||||
parallelResolver common.ParallelResolver
|
|
||||||
warner common.Warner
|
|
||||||
}
|
|
||||||
|
|
||||||
func New(unzipper common.Unzipper, warner common.Warner,
|
|
||||||
parallelResolver common.ParallelResolver,
|
|
||||||
) *Updater {
|
|
||||||
return &Updater{
|
|
||||||
unzipper: unzipper,
|
|
||||||
parallelResolver: parallelResolver,
|
|
||||||
warner: warner,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/vyprvpn/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/vyprvpn"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -21,7 +21,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(unzipper, updaterWarner, parallelResolver),
|
Fetcher: vyprvpn.New(unzipper, updaterWarner, parallelResolver),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
package updater
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Updater struct {
|
|
||||||
unzipper common.Unzipper
|
|
||||||
parallelResolver common.ParallelResolver
|
|
||||||
warner common.Warner
|
|
||||||
}
|
|
||||||
|
|
||||||
func New(unzipper common.Unzipper, warner common.Warner,
|
|
||||||
parallelResolver common.ParallelResolver,
|
|
||||||
) *Updater {
|
|
||||||
return &Updater{
|
|
||||||
unzipper: unzipper,
|
|
||||||
parallelResolver: parallelResolver,
|
|
||||||
warner: warner,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
"github.com/qdm12/gluetun/internal/provider/windscribe/updater"
|
"github.com/qdm12/gluetun/pkg/updaters/windscribe"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
@@ -21,7 +21,7 @@ func New(storage common.Storage, randSource rand.Source,
|
|||||||
return &Provider{
|
return &Provider{
|
||||||
storage: storage,
|
storage: storage,
|
||||||
randSource: randSource,
|
randSource: randSource,
|
||||||
Fetcher: updater.New(client, updaterWarner),
|
Fetcher: windscribe.New(client, updaterWarner),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package airvpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package airvpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package airvpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -13,3 +13,7 @@ func New(client *http.Client) *Updater {
|
|||||||
client: client,
|
client: client,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (u *Updater) Version() uint16 {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package cyberghost
|
||||||
|
|
||||||
import "github.com/qdm12/gluetun/internal/constants"
|
import "github.com/qdm12/gluetun/internal/constants"
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package cyberghost
|
||||||
|
|
||||||
func mergeCountryCodes(base, extend map[string]string) (merged map[string]string) {
|
func mergeCountryCodes(base, extend map[string]string) (merged map[string]string) {
|
||||||
merged = make(map[string]string, len(base))
|
merged = make(map[string]string, len(base))
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package cyberghost
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/netip"
|
"net/netip"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package cyberghost
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package cyberghost
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
+5
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package cyberghost
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
@@ -15,3 +15,7 @@ func New(parallelResolver common.ParallelResolver, warner common.Warner) *Update
|
|||||||
warner: warner,
|
warner: warner,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (u *Updater) Version() uint16 {
|
||||||
|
return 5 //nolint:mnd
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package example
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package example
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package example
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package example
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -25,3 +25,7 @@ func New(warner common.Warner, unzipper common.Unzipper,
|
|||||||
warner: warner,
|
warner: warner,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (u *Updater) Version() uint16 {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package expressvpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/qdm12/gluetun/internal/models"
|
"github.com/qdm12/gluetun/internal/models"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package expressvpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package expressvpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package expressvpn
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Updater struct {
|
||||||
|
unzipper common.Unzipper
|
||||||
|
parallelResolver common.ParallelResolver
|
||||||
|
warner common.Warner
|
||||||
|
}
|
||||||
|
|
||||||
|
func New(unzipper common.Unzipper, warner common.Warner,
|
||||||
|
parallelResolver common.ParallelResolver,
|
||||||
|
) *Updater {
|
||||||
|
return &Updater{
|
||||||
|
unzipper: unzipper,
|
||||||
|
parallelResolver: parallelResolver,
|
||||||
|
warner: warner,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (u *Updater) Version() uint16 {
|
||||||
|
return 2 //nolint:mnd
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package fastestvpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package fastestvpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package fastestvpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/netip"
|
"net/netip"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package fastestvpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package fastestvpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package fastestvpn
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Updater struct {
|
||||||
|
client *http.Client
|
||||||
|
parallelResolver common.ParallelResolver
|
||||||
|
warner common.Warner
|
||||||
|
}
|
||||||
|
|
||||||
|
func New(client *http.Client, warner common.Warner,
|
||||||
|
parallelResolver common.ParallelResolver,
|
||||||
|
) *Updater {
|
||||||
|
return &Updater{
|
||||||
|
client: client,
|
||||||
|
parallelResolver: parallelResolver,
|
||||||
|
warner: warner,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (u *Updater) Version() uint16 {
|
||||||
|
return 2 //nolint:mnd
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package giganews
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package giganews
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/netip"
|
"net/netip"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package giganews
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package giganews
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package giganews
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
|
|
||||||
type Updater struct {
|
type Updater struct {
|
||||||
unzipper common.Unzipper
|
unzipper common.Unzipper
|
||||||
warner common.Warner
|
|
||||||
parallelResolver common.ParallelResolver
|
parallelResolver common.ParallelResolver
|
||||||
|
warner common.Warner
|
||||||
}
|
}
|
||||||
|
|
||||||
func New(unzipper common.Unzipper, warner common.Warner,
|
func New(unzipper common.Unzipper, warner common.Warner,
|
||||||
@@ -15,7 +15,11 @@ func New(unzipper common.Unzipper, warner common.Warner,
|
|||||||
) *Updater {
|
) *Updater {
|
||||||
return &Updater{
|
return &Updater{
|
||||||
unzipper: unzipper,
|
unzipper: unzipper,
|
||||||
warner: warner,
|
|
||||||
parallelResolver: parallelResolver,
|
parallelResolver: parallelResolver,
|
||||||
|
warner: warner,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (u *Updater) Version() uint16 {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package hidemyass
|
||||||
|
|
||||||
func getUniqueHosts(tcpHostToURL, udpHostToURL map[string]string) (
|
func getUniqueHosts(tcpHostToURL, udpHostToURL map[string]string) (
|
||||||
hosts []string,
|
hosts []string,
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package hidemyass
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package hidemyass
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package hidemyass
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package hidemyass
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package hidemyass
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -21,3 +21,7 @@ func New(client *http.Client, warner common.Warner,
|
|||||||
warner: warner,
|
warner: warner,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (u *Updater) Version() uint16 {
|
||||||
|
return 2 //nolint:mnd
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package hidemyass
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package ipvanish
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package ipvanish
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package ipvanish
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/netip"
|
"net/netip"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package ipvanish
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/netip"
|
"net/netip"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package ipvanish
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package ipvanish
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package ipvanish
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package ipvanish
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
|
|
||||||
type Updater struct {
|
type Updater struct {
|
||||||
unzipper common.Unzipper
|
unzipper common.Unzipper
|
||||||
parallelResolver common.ParallelResolver
|
|
||||||
warner common.Warner
|
warner common.Warner
|
||||||
|
parallelResolver common.ParallelResolver
|
||||||
}
|
}
|
||||||
|
|
||||||
func New(unzipper common.Unzipper, warner common.Warner,
|
func New(unzipper common.Unzipper, warner common.Warner,
|
||||||
@@ -15,7 +15,11 @@ func New(unzipper common.Unzipper, warner common.Warner,
|
|||||||
) *Updater {
|
) *Updater {
|
||||||
return &Updater{
|
return &Updater{
|
||||||
unzipper: unzipper,
|
unzipper: unzipper,
|
||||||
parallelResolver: parallelResolver,
|
|
||||||
warner: warner,
|
warner: warner,
|
||||||
|
parallelResolver: parallelResolver,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (u *Updater) Version() uint16 {
|
||||||
|
return 2 //nolint:mnd
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package ivpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package ivpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package ivpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package ivpn
|
||||||
|
|
||||||
import "net/http"
|
import "net/http"
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package ivpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package ivpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package ivpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -21,3 +21,7 @@ func New(client *http.Client, warner common.Warner,
|
|||||||
warner: warner,
|
warner: warner,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (u *Updater) Version() uint16 {
|
||||||
|
return 3 //nolint:mnd
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package mullvad
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package mullvad
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package mullvad
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/netip"
|
"net/netip"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package mullvad
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/netip"
|
"net/netip"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package mullvad
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
+5
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package mullvad
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -13,3 +13,7 @@ func New(client *http.Client) *Updater {
|
|||||||
client: client,
|
client: client,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (u *Updater) Version() uint16 {
|
||||||
|
return 4 //nolint:mnd
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package nordvpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package nordvpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package nordvpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package nordvpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package nordvpn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -17,3 +17,7 @@ func New(client *http.Client, warner common.Warner) *Updater {
|
|||||||
warner: warner,
|
warner: warner,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (u *Updater) Version() uint16 {
|
||||||
|
return 5 //nolint:mnd
|
||||||
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package perfectprivacy
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/netip"
|
"net/netip"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package perfectprivacy
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package perfectprivacy
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
+5
-1
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package perfectprivacy
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/qdm12/gluetun/internal/provider/common"
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||||||
@@ -15,3 +15,7 @@ func New(unzipper common.Unzipper, warner common.Warner) *Updater {
|
|||||||
warner: warner,
|
warner: warner,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (u *Updater) Version() uint16 {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package privado
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package updater
|
package privado
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -17,3 +17,7 @@ func New(client *http.Client, warner common.Warner) *Updater {
|
|||||||
warner: warner,
|
warner: warner,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (u *Updater) Version() uint16 {
|
||||||
|
return 6 //nolint:mnd
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user