Files
gluetun/internal/provider/protonvpn/provider.go
Quentin McGaw 8a0921748b fix(protonvpn): authenticated servers data updating (#2878)
- `-proton-username` flag for cli update
- `-proton-password` flag for cli update
- `UPDATER_PROTONVPN_USERNAME` option for periodic updates
- `UPDATER_PROTONVPN_PASSWORD` option for periodic updates
2025-11-13 20:05:26 +01:00

33 lines
705 B
Go

package protonvpn
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/protonvpn/updater"
)
type Provider struct {
storage common.Storage
randSource rand.Source
common.Fetcher
portForwarded uint16
}
func New(storage common.Storage, randSource rand.Source,
client *http.Client, updaterWarner common.Warner,
username, password string,
) *Provider {
return &Provider{
storage: storage,
randSource: randSource,
Fetcher: updater.New(client, updaterWarner, username, password),
}
}
func (p *Provider) Name() string {
return providers.Protonvpn
}