Minor fixes
This commit is contained in:
@@ -38,7 +38,7 @@ func (c *configurator) GetOpenVPNConnections(region models.PIARegion, protocol m
|
|||||||
return nil, fmt.Errorf("combination of protocol %q and encryption %q does not yield any port number", protocol, encryption)
|
return nil, fmt.Errorf("combination of protocol %q and encryption %q does not yield any port number", protocol, encryption)
|
||||||
}
|
}
|
||||||
for _, IP := range IPs {
|
for _, IP := range IPs {
|
||||||
connections = append(connections, models.OpenVPNConnection{IP: IP, Port: port})
|
connections = append(connections, models.OpenVPNConnection{IP: IP, Port: port, Protocol: protocol})
|
||||||
}
|
}
|
||||||
return connections, nil
|
return connections, nil
|
||||||
}
|
}
|
||||||
@@ -62,17 +62,18 @@ func (c *configurator) BuildConf(connections []models.OpenVPNConnection, encrypt
|
|||||||
"nobind",
|
"nobind",
|
||||||
"persist-key",
|
"persist-key",
|
||||||
"persist-tun",
|
"persist-tun",
|
||||||
"tls-client",
|
|
||||||
"remote-cert-tls server",
|
"remote-cert-tls server",
|
||||||
"compress",
|
"ping 300", // Ping every 5 minutes to prevent a timeout error
|
||||||
"verb 1", // TODO env variable
|
"verb 1", // TODO env variable
|
||||||
|
|
||||||
|
// PIA specific
|
||||||
"reneg-sec 0",
|
"reneg-sec 0",
|
||||||
|
|
||||||
// Added constant values
|
// Added constant values
|
||||||
"mute-replay-warnings",
|
"mute-replay-warnings",
|
||||||
"user nonrootuser",
|
"user nonrootuser",
|
||||||
"pull-filter ignore \"auth-token\"", // prevent auth failed loops
|
"pull-filter ignore \"auth-token\"", // prevent auth failed loops
|
||||||
"auth-retry nointeract",
|
"auth-retry nointeract",
|
||||||
"disable-occ",
|
|
||||||
"remote-random",
|
"remote-random",
|
||||||
|
|
||||||
// Modified variables
|
// Modified variables
|
||||||
|
|||||||
@@ -64,10 +64,6 @@ func GetAllSettings(params params.ParamsReader) (settings Settings, err error) {
|
|||||||
default:
|
default:
|
||||||
return settings, fmt.Errorf("VPN service provider %q is not valid", settings.VPNSP)
|
return settings, fmt.Errorf("VPN service provider %q is not valid", settings.VPNSP)
|
||||||
}
|
}
|
||||||
settings.PIA, err = GetPIASettings(params)
|
|
||||||
if err != nil {
|
|
||||||
return settings, err
|
|
||||||
}
|
|
||||||
settings.DNS, err = GetDNSSettings(params)
|
settings.DNS, err = GetDNSSettings(params)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return settings, err
|
return settings, err
|
||||||
|
|||||||
Reference in New Issue
Block a user