mirror of
https://github.com/qdm12/gluetun.git
synced 2025-12-10 10:45:38 -06:00
31 lines
582 B
Go
31 lines
582 B
Go
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"
|
|
)
|
|
|
|
type Provider struct {
|
|
storage common.Storage
|
|
randSource rand.Source
|
|
common.Fetcher
|
|
}
|
|
|
|
func New(storage common.Storage, randSource rand.Source,
|
|
client *http.Client,
|
|
) *Provider {
|
|
return &Provider{
|
|
storage: storage,
|
|
randSource: randSource,
|
|
Fetcher: updater.New(client),
|
|
}
|
|
}
|
|
|
|
func (p *Provider) Name() string {
|
|
return providers.Airvpn
|
|
}
|