mirror of
https://github.com/qdm12/gluetun.git
synced 2025-12-11 04:38:54 -06:00
- `UPDATER_PROTONVPN_USERNAME` -> `UPDATER_PROTONVPN_EMAIL` - `-proton-username` -> `-proton-email` - fix authentication flow to use email or username when appropriate - fix #2985
33 lines
699 B
Go
33 lines
699 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,
|
|
email, password string,
|
|
) *Provider {
|
|
return &Provider{
|
|
storage: storage,
|
|
randSource: randSource,
|
|
Fetcher: updater.New(client, updaterWarner, email, password),
|
|
}
|
|
}
|
|
|
|
func (p *Provider) Name() string {
|
|
return providers.Protonvpn
|
|
}
|