From fbf04677f184ae4763b06271a7ad31954471a54f Mon Sep 17 00:00:00 2001 From: "Quentin McGaw (desktop)" Date: Sun, 16 Feb 2020 22:27:49 +0000 Subject: [PATCH] Minor fixes --- internal/pia/conf.go | 11 ++++++----- internal/settings/settings.go | 4 ---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/internal/pia/conf.go b/internal/pia/conf.go index a1533322..5b602428 100644 --- a/internal/pia/conf.go +++ b/internal/pia/conf.go @@ -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) } 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 } @@ -62,17 +62,18 @@ func (c *configurator) BuildConf(connections []models.OpenVPNConnection, encrypt "nobind", "persist-key", "persist-tun", - "tls-client", "remote-cert-tls server", - "compress", - "verb 1", // TODO env variable + "ping 300", // Ping every 5 minutes to prevent a timeout error + "verb 1", // TODO env variable + + // PIA specific "reneg-sec 0", + // Added constant values "mute-replay-warnings", "user nonrootuser", "pull-filter ignore \"auth-token\"", // prevent auth failed loops "auth-retry nointeract", - "disable-occ", "remote-random", // Modified variables diff --git a/internal/settings/settings.go b/internal/settings/settings.go index e49a187e..c51bdab0 100644 --- a/internal/settings/settings.go +++ b/internal/settings/settings.go @@ -64,10 +64,6 @@ func GetAllSettings(params params.ParamsReader) (settings Settings, err error) { default: 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) if err != nil { return settings, err