- `-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
24 lines
398 B
Go
24 lines
398 B
Go
package updater
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/qdm12/gluetun/internal/provider/common"
|
|
)
|
|
|
|
type Updater struct {
|
|
client *http.Client
|
|
username string
|
|
password string
|
|
warner common.Warner
|
|
}
|
|
|
|
func New(client *http.Client, warner common.Warner, username, password string) *Updater {
|
|
return &Updater{
|
|
client: client,
|
|
username: username,
|
|
password: password,
|
|
warner: warner,
|
|
}
|
|
}
|