Maint: re-order OpenVPN options

This commit is contained in:
Quentin McGaw (desktop)
2021-09-14 15:46:40 +00:00
parent c3078f84e8
commit 1340511b64
17 changed files with 105 additions and 108 deletions

View File

@@ -22,13 +22,16 @@ func (c *Cyberghost) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev " + settings.Interface,
"nobind", "nobind",
"remote-cert-tls server",
"tls-exit", "tls-exit",
"dev " + settings.Interface,
"verb " + strconv.Itoa(settings.Verbosity),
// Cyberghost specific // Cyberghost specific
"ping 10", "ping 10",
"remote-cert-tls server",
"auth-user-pass " + constants.OpenVPNAuthConf,
"auth " + settings.Auth,
// Added constant values // Added constant values
"auth-nocache", "auth-nocache",
@@ -37,12 +40,9 @@ func (c *Cyberghost) BuildConf(connection models.Connection,
"auth-retry nointeract", "auth-retry nointeract",
"suppress-timestamps", "suppress-timestamps",
// Modified variables // Connection variables
"verb " + strconv.Itoa(settings.Verbosity),
"auth-user-pass " + constants.OpenVPNAuthConf,
connection.OpenVPNProtoLine(), connection.OpenVPNProtoLine(),
connection.OpenVPNRemoteLine(), connection.OpenVPNRemoteLine(),
"auth " + settings.Auth,
} }
lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...) lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...)

View File

@@ -23,16 +23,19 @@ func (f *Fastestvpn) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev " + settings.Interface,
"nobind", "nobind",
"tls-exit", "tls-exit",
"dev " + settings.Interface,
"verb " + strconv.Itoa(settings.Verbosity),
// Fastestvpn specific // Fastestvpn specific
"ping 15",
"tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA:TLS-DHE-RSA-WITH-AES-256-CBC-SHA:TLS-RSA-WITH-CAMELLIA-256-CBC-SHA:TLS-RSA-WITH-AES-256-CBC-SHA", //nolint:lll
"key-direction 1",
"tun-mtu-extra 32", "tun-mtu-extra 32",
"mssfix " + strconv.Itoa(int(settings.MSSFix)), // defaults to 1450 "mssfix " + strconv.Itoa(int(settings.MSSFix)), // defaults to 1450
"ping 15",
"tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA:TLS-DHE-RSA-WITH-AES-256-CBC-SHA:TLS-RSA-WITH-CAMELLIA-256-CBC-SHA:TLS-RSA-WITH-AES-256-CBC-SHA", //nolint:lll
"key-direction 1",
"auth-user-pass " + constants.OpenVPNAuthConf,
"auth " + settings.Auth,
// Added constant values // Added constant values
"auth-nocache", "auth-nocache",
@@ -41,12 +44,9 @@ func (f *Fastestvpn) BuildConf(connection models.Connection,
"auth-retry nointeract", "auth-retry nointeract",
"suppress-timestamps", "suppress-timestamps",
// Modified variables // Connection variables
"verb " + strconv.Itoa(settings.Verbosity),
"auth-user-pass " + constants.OpenVPNAuthConf,
connection.OpenVPNProtoLine(), connection.OpenVPNProtoLine(),
connection.OpenVPNRemoteLine(), connection.OpenVPNRemoteLine(),
"auth " + settings.Auth,
} }
lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...) lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...)

View File

@@ -17,14 +17,15 @@ func (h *HideMyAss) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev " + settings.Interface,
"nobind", "nobind",
"tls-exit", "tls-exit",
"dev " + settings.Interface,
"verb " + strconv.Itoa(settings.Verbosity),
// HideMyAss specific // HideMyAss specific
"ping 5", "ping 5",
"remote-cert-tls server", // updated name of ns-cert-type "remote-cert-tls server", // updated name of ns-cert-type
// "route-metric 1", "auth-user-pass " + constants.OpenVPNAuthConf,
// Added constant values // Added constant values
"mute-replay-warnings", "mute-replay-warnings",
@@ -33,10 +34,8 @@ func (h *HideMyAss) BuildConf(connection models.Connection,
"auth-retry nointeract", "auth-retry nointeract",
"suppress-timestamps", "suppress-timestamps",
// Modified variables // Connection variables
"verb " + strconv.Itoa(settings.Verbosity), connection.OpenVPNProtoLine(),
"auth-user-pass " + constants.OpenVPNAuthConf,
"proto " + connection.Protocol,
connection.OpenVPNRemoteLine(), connection.OpenVPNRemoteLine(),
} }

View File

@@ -20,12 +20,16 @@ func (i *Ipvanish) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev " + settings.Interface,
"nobind", "nobind",
"tls-exit", "tls-exit",
"dev " + settings.Interface,
"verb " + strconv.Itoa(settings.Verbosity),
// Ipvanish specific // Ipvanish specific
"verify-x509-name " + connection.Hostname + " name",
"tls-cipher TLS-DHE-RSA-WITH-AES-256-CBC-SHA:TLS-DHE-DSS-WITH-AES-256-CBC-SHA:TLS-RSA-WITH-AES-256-CBC-SHA", "tls-cipher TLS-DHE-RSA-WITH-AES-256-CBC-SHA:TLS-DHE-DSS-WITH-AES-256-CBC-SHA:TLS-RSA-WITH-AES-256-CBC-SHA",
"auth-user-pass " + constants.OpenVPNAuthConf,
"auth " + settings.Auth,
// Added constant values // Added constant values
"mute-replay-warnings", "mute-replay-warnings",
@@ -34,13 +38,9 @@ func (i *Ipvanish) BuildConf(connection models.Connection,
"auth-retry nointeract", "auth-retry nointeract",
"suppress-timestamps", "suppress-timestamps",
// Modified variables // Connection variables
"verb " + strconv.Itoa(settings.Verbosity), connection.OpenVPNProtoLine(),
"auth-user-pass " + constants.OpenVPNAuthConf,
"proto " + connection.Protocol,
connection.OpenVPNRemoteLine(), connection.OpenVPNRemoteLine(),
"verify-x509-name " + connection.Hostname + " name",
"auth " + settings.Auth,
} }
lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...) lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...)

View File

@@ -20,15 +20,18 @@ func (i *Ivpn) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev " + settings.Interface,
"nobind", "nobind",
"tls-exit", "tls-exit",
"dev " + settings.Interface,
"verb " + strconv.Itoa(settings.Verbosity),
// IVPN specific // IVPN specific
"ping 5", "ping 5",
"remote-cert-tls server", // updated name of ns-cert-type "remote-cert-tls server", // updated name of ns-cert-type
"key-direction 1", "key-direction 1",
"verify-x509-name " + namePrefix + " name-prefix",
"tls-cipher TLS-DHE-RSA-WITH-AES-256-CBC-SHA:TLS-DHE-DSS-WITH-AES-256-CBC-SHA:TLS-RSA-WITH-AES-256-CBC-SHA", "tls-cipher TLS-DHE-RSA-WITH-AES-256-CBC-SHA:TLS-DHE-DSS-WITH-AES-256-CBC-SHA:TLS-RSA-WITH-AES-256-CBC-SHA",
"auth-user-pass " + constants.OpenVPNAuthConf,
// Added constant values // Added constant values
"mute-replay-warnings", "mute-replay-warnings",
@@ -37,12 +40,9 @@ func (i *Ivpn) BuildConf(connection models.Connection,
"auth-retry nointeract", "auth-retry nointeract",
"suppress-timestamps", "suppress-timestamps",
// Modified variables // Connection variables
"verb " + strconv.Itoa(settings.Verbosity), connection.OpenVPNProtoLine(),
"auth-user-pass " + constants.OpenVPNAuthConf,
"proto " + connection.Protocol,
connection.OpenVPNRemoteLine(), connection.OpenVPNRemoteLine(),
"verify-x509-name " + namePrefix + " name-prefix",
} }
lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...) lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...)

View File

@@ -17,13 +17,15 @@ func (m *Mullvad) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev " + settings.Interface,
"nobind", "nobind",
"remote-cert-tls server",
"tls-exit", "tls-exit",
"dev " + settings.Interface,
"verb " + strconv.Itoa(settings.Verbosity),
"auth-user-pass " + constants.OpenVPNAuthConf,
// Mullvad specific // Mullvad specific
"ping 10", "ping 10",
"remote-cert-tls server",
"sndbuf 524288", "sndbuf 524288",
"rcvbuf 524288", "rcvbuf 524288",
"tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA", "tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA",
@@ -35,9 +37,7 @@ func (m *Mullvad) BuildConf(connection models.Connection,
"auth-retry nointeract", "auth-retry nointeract",
"suppress-timestamps", "suppress-timestamps",
// Modified variables // Connection variables
"verb " + strconv.Itoa(settings.Verbosity),
"auth-user-pass " + constants.OpenVPNAuthConf,
connection.OpenVPNProtoLine(), connection.OpenVPNProtoLine(),
connection.OpenVPNRemoteLine(), connection.OpenVPNRemoteLine(),
} }

View File

@@ -25,17 +25,20 @@ func (n *Nordvpn) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev " + settings.Interface,
"nobind", "nobind",
"remote-cert-tls server",
"tls-exit", "tls-exit",
"dev " + settings.Interface,
"verb " + strconv.Itoa(settings.Verbosity),
// Nordvpn specific // Nordvpn specific
"tun-mtu-extra 32", "tun-mtu-extra 32",
"mssfix " + strconv.Itoa(int(settings.MSSFix)), "mssfix " + strconv.Itoa(int(settings.MSSFix)),
"ping 15",
"remote-cert-tls server",
"reneg-sec 0", "reneg-sec 0",
"key-direction 1", "key-direction 1",
"ping 15", "auth-user-pass " + constants.OpenVPNAuthConf,
"auth " + settings.Auth,
// Added constant values // Added constant values
"auth-nocache", "auth-nocache",
@@ -44,12 +47,9 @@ func (n *Nordvpn) BuildConf(connection models.Connection,
"auth-retry nointeract", "auth-retry nointeract",
"suppress-timestamps", "suppress-timestamps",
// Modified variables // Connection variables
"verb " + strconv.Itoa(settings.Verbosity),
"auth-user-pass " + constants.OpenVPNAuthConf,
connection.OpenVPNProtoLine(), connection.OpenVPNProtoLine(),
connection.OpenVPNRemoteLine(), connection.OpenVPNRemoteLine(),
"auth " + settings.Auth,
} }
lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...) lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...)

View File

@@ -21,14 +21,17 @@ func (p *Privado) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev " + settings.Interface,
"nobind", "nobind",
"tls-exit", "tls-exit",
"dev " + settings.Interface,
"verb " + strconv.Itoa(settings.Verbosity),
// Privado specific // Privado specific
"ping 10", "ping 10",
"tls-cipher TLS-DHE-RSA-WITH-AES-256-CBC-SHA:TLS-DHE-DSS-WITH-AES-256-CBC-SHA:TLS-RSA-WITH-AES-256-CBC-SHA", "tls-cipher TLS-DHE-RSA-WITH-AES-256-CBC-SHA:TLS-DHE-DSS-WITH-AES-256-CBC-SHA:TLS-RSA-WITH-AES-256-CBC-SHA",
"verify-x509-name " + connection.Hostname + " name", "verify-x509-name " + connection.Hostname + " name",
"auth-user-pass " + constants.OpenVPNAuthConf,
"auth " + settings.Auth,
// Added constant values // Added constant values
"auth-nocache", "auth-nocache",
@@ -37,12 +40,9 @@ func (p *Privado) BuildConf(connection models.Connection,
"auth-retry nointeract", "auth-retry nointeract",
"suppress-timestamps", "suppress-timestamps",
// Modified variables // Connection variables
"verb " + strconv.Itoa(settings.Verbosity),
"auth-user-pass " + constants.OpenVPNAuthConf,
connection.OpenVPNProtoLine(), connection.OpenVPNProtoLine(),
connection.OpenVPNRemoteLine(), connection.OpenVPNRemoteLine(),
"auth " + settings.Auth,
} }
lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...) lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...)

View File

@@ -40,14 +40,16 @@ func (p *PIA) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev " + settings.Interface,
"nobind", "nobind",
"remote-cert-tls server",
"tls-exit", "tls-exit",
"dev " + settings.Interface,
"verb " + strconv.Itoa(settings.Verbosity),
// PIA specific // PIA specific
"remote-cert-tls server",
"reneg-sec 0", "reneg-sec 0",
"disable-occ", "disable-occ",
"auth-user-pass " + constants.OpenVPNAuthConf,
// Added constant values // Added constant values
"auth-nocache", "auth-nocache",
@@ -56,9 +58,7 @@ func (p *PIA) BuildConf(connection models.Connection,
"auth-retry nointeract", "auth-retry nointeract",
"suppress-timestamps", "suppress-timestamps",
// Modified variables // Connection variables
"verb " + strconv.Itoa(settings.Verbosity),
"auth-user-pass " + constants.OpenVPNAuthConf,
connection.OpenVPNProtoLine(), connection.OpenVPNProtoLine(),
connection.OpenVPNRemoteLine(), connection.OpenVPNRemoteLine(),
} }

View File

@@ -21,12 +21,15 @@ func (p *Privatevpn) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev " + settings.Interface,
"nobind", "nobind",
"remote-cert-tls server",
"tls-exit", "tls-exit",
"dev " + settings.Interface,
"verb " + strconv.Itoa(settings.Verbosity),
// Privatevpn specific // Privatevpn specific
"remote-cert-tls server",
"auth-user-pass " + constants.OpenVPNAuthConf,
"auth " + settings.Auth,
// Added constant values // Added constant values
"auth-nocache", "auth-nocache",
@@ -35,12 +38,9 @@ func (p *Privatevpn) BuildConf(connection models.Connection,
"auth-retry nointeract", "auth-retry nointeract",
"suppress-timestamps", "suppress-timestamps",
// Modified variables // Connection variables
"verb " + strconv.Itoa(settings.Verbosity),
"auth-user-pass " + constants.OpenVPNAuthConf,
connection.OpenVPNProtoLine(), connection.OpenVPNProtoLine(),
connection.OpenVPNRemoteLine(), connection.OpenVPNRemoteLine(),
"auth " + settings.Auth,
} }
lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...) lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...)

View File

@@ -26,17 +26,19 @@ func (p *Protonvpn) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev " + settings.Interface,
"nobind", "nobind",
"remote-cert-tls server",
"tls-exit", "tls-exit",
"dev " + settings.Interface,
"verb " + strconv.Itoa(settings.Verbosity),
// Protonvpn specific // Protonvpn specific
"remote-cert-tls server",
"tun-mtu-extra 32", "tun-mtu-extra 32",
"mssfix " + strconv.Itoa(int(settings.MSSFix)), "mssfix " + strconv.Itoa(int(settings.MSSFix)),
"reneg-sec 0", "reneg-sec 0",
"key-direction 1", "key-direction 1",
"pull", "auth-user-pass " + constants.OpenVPNAuthConf,
"auth " + settings.Auth,
// Added constant values // Added constant values
"auth-nocache", "auth-nocache",
@@ -45,12 +47,9 @@ func (p *Protonvpn) BuildConf(connection models.Connection,
"auth-retry nointeract", "auth-retry nointeract",
"suppress-timestamps", "suppress-timestamps",
// Modified variables // Connection variables
"verb " + strconv.Itoa(settings.Verbosity),
"auth-user-pass " + constants.OpenVPNAuthConf,
connection.OpenVPNProtoLine(), connection.OpenVPNProtoLine(),
connection.OpenVPNRemoteLine(), connection.OpenVPNRemoteLine(),
"auth " + settings.Auth,
} }
lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...) lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...)

View File

@@ -17,16 +17,17 @@ func (p *Purevpn) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev " + settings.Interface,
"nobind", "nobind",
"remote-cert-tls server",
"tls-exit", "tls-exit",
"dev " + settings.Interface,
"verb " + strconv.Itoa(settings.Verbosity),
// Purevpn specific // Purevpn specific
"ping 10", "ping 10",
"key-direction 1",
"remote-cert-tls server", "remote-cert-tls server",
"key-direction 1",
"cipher AES-256-CBC", "cipher AES-256-CBC",
"auth-user-pass " + constants.OpenVPNAuthConf,
// Added constant values // Added constant values
"auth-nocache", "auth-nocache",
@@ -35,9 +36,7 @@ func (p *Purevpn) BuildConf(connection models.Connection,
"auth-retry nointeract", "auth-retry nointeract",
"suppress-timestamps", "suppress-timestamps",
// Modified variables // Connection variables
"verb " + strconv.Itoa(settings.Verbosity),
"auth-user-pass " + constants.OpenVPNAuthConf,
connection.OpenVPNProtoLine(), connection.OpenVPNProtoLine(),
connection.OpenVPNRemoteLine(), connection.OpenVPNRemoteLine(),
} }

View File

@@ -26,17 +26,20 @@ func (s *Surfshark) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev " + settings.Interface,
"nobind", "nobind",
"remote-cert-tls server",
"tls-exit", "tls-exit",
"dev " + settings.Interface,
"verb " + strconv.Itoa(settings.Verbosity),
// Surfshark specific // Surfshark specific
"ping 15",
"tun-mtu-extra 32", "tun-mtu-extra 32",
"mssfix " + strconv.Itoa(int(settings.MSSFix)), "mssfix " + strconv.Itoa(int(settings.MSSFix)),
"ping 15",
"remote-cert-tls server",
"reneg-sec 0", "reneg-sec 0",
"key-direction 1", "key-direction 1",
"auth-user-pass " + constants.OpenVPNAuthConf,
"auth " + settings.Auth,
// Added constant values // Added constant values
"auth-nocache", "auth-nocache",
@@ -45,12 +48,9 @@ func (s *Surfshark) BuildConf(connection models.Connection,
"auth-retry nointeract", "auth-retry nointeract",
"suppress-timestamps", "suppress-timestamps",
// Modified variables // Connection variables
"verb " + strconv.Itoa(settings.Verbosity),
"auth-user-pass " + constants.OpenVPNAuthConf,
connection.OpenVPNProtoLine(), connection.OpenVPNProtoLine(),
connection.OpenVPNRemoteLine(), connection.OpenVPNRemoteLine(),
"auth " + settings.Auth,
} }
lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...) lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...)

View File

@@ -26,19 +26,22 @@ func (t *Torguard) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev " + settings.Interface,
"nobind", "nobind",
"remote-cert-tls server",
"tls-exit", "tls-exit",
"dev " + settings.Interface,
"verb " + strconv.Itoa(settings.Verbosity),
// Torguard specific // Torguard specific
"ping 5",
"tun-mtu-extra 32", "tun-mtu-extra 32",
"mssfix " + strconv.Itoa(int(settings.MSSFix)), "mssfix " + strconv.Itoa(int(settings.MSSFix)),
"reneg-sec 0",
"key-direction 1",
"sndbuf 393216", "sndbuf 393216",
"rcvbuf 393216", "rcvbuf 393216",
"ping 5",
"remote-cert-tls server",
"reneg-sec 0",
"key-direction 1",
"auth-user-pass " + constants.OpenVPNAuthConf,
"auth " + settings.Auth,
// Added constant values // Added constant values
"auth-nocache", "auth-nocache",
@@ -47,12 +50,9 @@ func (t *Torguard) BuildConf(connection models.Connection,
"auth-retry nointeract", "auth-retry nointeract",
"suppress-timestamps", "suppress-timestamps",
// Modified variables // Connection variables
"verb " + strconv.Itoa(settings.Verbosity),
"auth-user-pass " + constants.OpenVPNAuthConf,
connection.OpenVPNProtoLine(), connection.OpenVPNProtoLine(),
connection.OpenVPNRemoteLine(), connection.OpenVPNRemoteLine(),
"auth " + settings.Auth,
} }
lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...) lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...)

View File

@@ -13,14 +13,15 @@ func (p *Provider) BuildConf(connection models.Connection,
settings configuration.OpenVPN) (lines []string, err error) { settings configuration.OpenVPN) (lines []string, err error) {
lines = []string{ lines = []string{
"client", "client",
"dev " + settings.Interface,
"nobind", "nobind",
"tls-exit", "tls-exit",
"remote-cert-tls server", "dev " + settings.Interface,
"verb " + strconv.Itoa(settings.Verbosity),
// VPNUnlimited specific // VPNUnlimited specific
"reneg-sec 0",
"ping 5", "ping 5",
"remote-cert-tls server",
"reneg-sec 0",
"route-metric 1", "route-metric 1",
// Added constant values // Added constant values
@@ -30,8 +31,7 @@ func (p *Provider) BuildConf(connection models.Connection,
"auth-retry nointeract", "auth-retry nointeract",
"suppress-timestamps", "suppress-timestamps",
// Modified variables // Connection variables
"verb " + strconv.Itoa(settings.Verbosity),
connection.OpenVPNProtoLine(), connection.OpenVPNProtoLine(),
connection.OpenVPNRemoteLine(), connection.OpenVPNRemoteLine(),
} }

View File

@@ -21,15 +21,18 @@ func (v *Vyprvpn) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev " + settings.Interface,
"nobind", "nobind",
"remote-cert-tls server",
"tls-exit", "tls-exit",
"dev " + settings.Interface,
"verb " + strconv.Itoa(settings.Verbosity),
// Vyprvpn specific // Vyprvpn specific
"ping 10", "ping 10",
"remote-cert-tls server",
// "verify-x509-name lu1.vyprvpn.com name", // "verify-x509-name lu1.vyprvpn.com name",
"tls-cipher TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-DHE-RSA-WITH-AES-256-CBC-SHA", //nolint:lll "tls-cipher TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-DHE-RSA-WITH-AES-256-CBC-SHA", //nolint:lll
"auth-user-pass " + constants.OpenVPNAuthConf,
"auth " + settings.Auth,
// Added constant values // Added constant values
"auth-nocache", "auth-nocache",
@@ -38,12 +41,9 @@ func (v *Vyprvpn) BuildConf(connection models.Connection,
"auth-retry nointeract", "auth-retry nointeract",
"suppress-timestamps", "suppress-timestamps",
// Modified variables // Connection variables
"verb " + strconv.Itoa(settings.Verbosity),
"auth-user-pass " + constants.OpenVPNAuthConf,
connection.OpenVPNProtoLine(), connection.OpenVPNProtoLine(),
connection.OpenVPNRemoteLine(), connection.OpenVPNRemoteLine(),
"auth " + settings.Auth,
} }
lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...) lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...)

View File

@@ -22,15 +22,19 @@ func (w *Windscribe) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev " + settings.Interface,
"nobind", "nobind",
"remote-cert-tls server",
"tls-exit", "tls-exit",
"dev " + settings.Interface,
"verb " + strconv.Itoa(settings.Verbosity),
// Windscribe specific // Windscribe specific
"ping 10", "ping 10",
"remote-cert-tls server",
"verify-x509-name " + connection.Hostname + " name",
"key-direction 1", "key-direction 1",
"reneg-sec 0", "reneg-sec 0",
"auth-user-pass " + constants.OpenVPNAuthConf,
"auth " + settings.Auth,
// Added constant values // Added constant values
"auth-nocache", "auth-nocache",
@@ -39,13 +43,9 @@ func (w *Windscribe) BuildConf(connection models.Connection,
"auth-retry nointeract", "auth-retry nointeract",
"suppress-timestamps", "suppress-timestamps",
// Modified variables // Connection variables
"verb " + strconv.Itoa(settings.Verbosity),
"auth-user-pass " + constants.OpenVPNAuthConf,
connection.OpenVPNProtoLine(), connection.OpenVPNProtoLine(),
connection.OpenVPNRemoteLine(), connection.OpenVPNRemoteLine(),
"auth " + settings.Auth,
"verify-x509-name " + connection.Hostname + " name",
} }
lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...) lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...)