34 lines
851 B
Go
34 lines
851 B
Go
|
|
package vpnsecure
|
||
|
|
|
||
|
|
import (
|
||
|
|
"math/rand"
|
||
|
|
"net/http"
|
||
|
|
|
||
|
|
"github.com/qdm12/gluetun/internal/constants/providers"
|
||
|
|
"github.com/qdm12/gluetun/internal/provider/common"
|
||
|
|
"github.com/qdm12/gluetun/internal/provider/utils"
|
||
|
|
"github.com/qdm12/gluetun/internal/provider/vpnsecure/updater"
|
||
|
|
)
|
||
|
|
|
||
|
|
type Provider struct {
|
||
|
|
storage common.Storage
|
||
|
|
randSource rand.Source
|
||
|
|
utils.NoPortForwarder
|
||
|
|
common.Fetcher
|
||
|
|
}
|
||
|
|
|
||
|
|
func New(storage common.Storage, randSource rand.Source,
|
||
|
|
client *http.Client, updaterWarner common.Warner,
|
||
|
|
parallelResolver common.ParallelResolver) *Provider {
|
||
|
|
return &Provider{
|
||
|
|
storage: storage,
|
||
|
|
randSource: randSource,
|
||
|
|
NoPortForwarder: utils.NewNoPortForwarding(providers.VPNSecure),
|
||
|
|
Fetcher: updater.New(client, updaterWarner, parallelResolver),
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (p *Provider) Name() string {
|
||
|
|
return providers.VPNSecure
|
||
|
|
}
|