Surfshark (#167)
This commit is contained in:
@@ -65,6 +65,9 @@ type Reader interface {
|
||||
GetWindscribeRegion() (country models.WindscribeRegion, err error)
|
||||
GetWindscribePort(protocol models.NetworkProtocol) (port uint16, err error)
|
||||
|
||||
// Surfshark getters
|
||||
GetSurfsharkRegion() (country models.SurfsharkRegion, err error)
|
||||
|
||||
// Shadowsocks getters
|
||||
GetShadowSocks() (activated bool, err error)
|
||||
GetShadowSocksLog() (activated bool, err error)
|
||||
@@ -105,7 +108,7 @@ func NewReader(logger logging.Logger) Reader {
|
||||
|
||||
// GetVPNSP obtains the VPN service provider to use from the environment variable VPNSP
|
||||
func (p *reader) GetVPNSP() (vpnServiceProvider models.VPNProvider, err error) {
|
||||
s, err := p.envParams.GetValueIfInside("VPNSP", []string{"pia", "private internet access", "mullvad", "windscribe"})
|
||||
s, err := p.envParams.GetValueIfInside("VPNSP", []string{"pia", "private internet access", "mullvad", "windscribe", "surfshark"})
|
||||
if s == "pia" {
|
||||
s = "private internet access"
|
||||
}
|
||||
|
||||
15
internal/params/surfshark.go
Normal file
15
internal/params/surfshark.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package params
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/qdm12/private-internet-access-docker/internal/constants"
|
||||
"github.com/qdm12/private-internet-access-docker/internal/models"
|
||||
)
|
||||
|
||||
// GetSurfsharkRegion obtains the region for the Surfshark server from the
|
||||
// environment variable REGION
|
||||
func (p *reader) GetSurfsharkRegion() (region models.SurfsharkRegion, err error) {
|
||||
s, err := p.envParams.GetValueIfInside("REGION", constants.SurfsharkRegionChoices())
|
||||
return models.SurfsharkRegion(strings.ToLower(s)), err
|
||||
}
|
||||
Reference in New Issue
Block a user