chore(sources/env): bump gosettings to v0.3.0-rc9

This commit is contained in:
Quentin McGaw
2023-05-30 15:21:09 +00:00
parent 2d2f657851
commit 7399c00508
27 changed files with 142 additions and 317 deletions

View File

@@ -31,15 +31,16 @@ func (s *Source) readProvider(vpnType string) (provider settings.Provider, err e
}
func (s *Source) readVPNServiceProvider(vpnType string) (vpnProviderPtr *string) {
_, value := s.getEnvWithRetro("VPN_SERVICE_PROVIDER", []string{"VPNSP"})
if value == "" {
if vpnType != vpn.Wireguard && env.Get("OPENVPN_CUSTOM_CONFIG") != "" {
_, valuePtr := s.getEnvWithRetro("VPN_SERVICE_PROVIDER", []string{"VPNSP"})
if valuePtr == nil {
if vpnType != vpn.Wireguard && env.Get("OPENVPN_CUSTOM_CONFIG") != nil {
// retro compatibility
return ptrTo(providers.Custom)
}
return nil
}
value := *valuePtr
value = strings.ToLower(value)
if value == "pia" { // retro compatibility
return ptrTo(providers.PrivateInternetAccess)