feat(providers): add AirVPN support (#1145)

This commit is contained in:
Quentin McGaw
2022-10-17 02:54:56 -04:00
committed by GitHub
parent f70609c464
commit f15dde6502
22 changed files with 18722 additions and 10 deletions

View File

@@ -0,0 +1,32 @@
package airvpn
import (
"math/rand"
"net/http"
"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/utils"
)
type Provider struct {
storage common.Storage
randSource rand.Source
utils.NoPortForwarder
common.Fetcher
}
func New(storage common.Storage, randSource rand.Source,
client *http.Client) *Provider {
return &Provider{
storage: storage,
randSource: randSource,
NoPortForwarder: utils.NewNoPortForwarding(providers.Example),
Fetcher: updater.New(client),
}
}
func (p *Provider) Name() string {
return providers.Airvpn
}