Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f04a05b45 |
@@ -99,12 +99,13 @@ func (o OpenVPN) validate(vpnProvider string) (err error) {
|
||||
}
|
||||
|
||||
isCustom := vpnProvider == providers.Custom
|
||||
isUserRequired := !isCustom && vpnProvider != providers.VPNSecure
|
||||
|
||||
if !isCustom && *o.User == "" {
|
||||
if isUserRequired && *o.User == "" {
|
||||
return ErrOpenVPNUserIsEmpty
|
||||
}
|
||||
|
||||
passwordRequired := !isCustom &&
|
||||
passwordRequired := isUserRequired &&
|
||||
(vpnProvider != providers.Ivpn || !ivpnAccountID.MatchString(*o.User))
|
||||
|
||||
if passwordRequired && *o.Password == "" {
|
||||
|
||||
@@ -61,10 +61,13 @@ func OpenVPNConfig(provider OpenVPNProviderSettings,
|
||||
lines.add("suppress-timestamps") // do not log timestamps, the Gluetun logger takes care of it
|
||||
lines.add("dev", settings.Interface)
|
||||
lines.add("verb", fmt.Sprint(*settings.Verbosity))
|
||||
lines.add("auth-user-pass", openvpn.AuthConf)
|
||||
lines.add("proto", connection.Protocol)
|
||||
lines.add("remote", connection.IP.String(), fmt.Sprint(connection.Port))
|
||||
|
||||
if *settings.User != "" {
|
||||
lines.add("auth-user-pass", openvpn.AuthConf)
|
||||
}
|
||||
|
||||
if !provider.AuthToken {
|
||||
lines.add("pull-filter", "ignore", `"auth-token"`) // prevent auth failed loops
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user