Hot fix: interface name set for openvpn configs

This commit is contained in:
Quentin McGaw (desktop)
2021-08-20 01:13:04 +00:00
parent 96ee1bbfb2
commit 8d258feff7
18 changed files with 20 additions and 20 deletions

View File

@@ -30,7 +30,7 @@ func Test_BuildConfig(t *testing.T) {
Cipher: "cipher", Cipher: "cipher",
MSSFix: 999, MSSFix: 999,
Config: file.Name(), Config: file.Name(),
Interface: "tun", Interface: "tun0",
} }
lines, connection, intf, err := BuildConfig(settings) lines, connection, intf, err := BuildConfig(settings)
@@ -40,7 +40,7 @@ func Test_BuildConfig(t *testing.T) {
"keep me", "keep me",
"proto udp", "proto udp",
"remote 1.9.8.7 1194", "remote 1.9.8.7 1194",
"dev tun", "dev tun0",
"mute-replay-warnings", "mute-replay-warnings",
"auth-nocache", "auth-nocache",
"pull-filter ignore \"auth-token\"", "pull-filter ignore \"auth-token\"",
@@ -63,5 +63,5 @@ func Test_BuildConfig(t *testing.T) {
} }
assert.Equal(t, expectedConnection, connection) assert.Equal(t, expectedConnection, connection)
assert.Equal(t, "tun", intf) assert.Equal(t, "tun0", intf)
} }

View File

@@ -22,7 +22,7 @@ func (c *Cyberghost) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev tun", "dev " + settings.Interface,
"nobind", "nobind",
"persist-key", "persist-key",
"persist-tun", "persist-tun",

View File

@@ -23,7 +23,7 @@ func (f *Fastestvpn) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev tun", "dev " + settings.Interface,
"nobind", "nobind",
"persist-key", "persist-key",
"ping 15", "ping 15",

View File

@@ -17,7 +17,7 @@ func (h *HideMyAss) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev tun", "dev " + settings.Interface,
"nobind", "nobind",
"persist-key", "persist-key",
"ping 5", "ping 5",

View File

@@ -20,7 +20,7 @@ func (i *Ipvanish) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev tun", "dev " + settings.Interface,
"nobind", "nobind",
"persist-key", "persist-key",
"ping-timer-rem", "ping-timer-rem",

View File

@@ -20,7 +20,7 @@ func (i *Ivpn) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev tun", "dev " + settings.Interface,
"nobind", "nobind",
"persist-key", "persist-key",
"ping 5", "ping 5",

View File

@@ -17,7 +17,7 @@ func (m *Mullvad) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev tun", "dev " + settings.Interface,
"nobind", "nobind",
"persist-key", "persist-key",
"remote-cert-tls server", "remote-cert-tls server",

View File

@@ -25,7 +25,7 @@ func (n *Nordvpn) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev tun", "dev " + settings.Interface,
"nobind", "nobind",
"persist-key", "persist-key",
"remote-cert-tls server", "remote-cert-tls server",

View File

@@ -21,7 +21,7 @@ func (p *Privado) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev tun", "dev " + settings.Interface,
"nobind", "nobind",
"persist-key", "persist-key",
"ping 10", "ping 10",

View File

@@ -40,7 +40,7 @@ func (p *PIA) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev tun", "dev " + settings.Interface,
"nobind", "nobind",
"persist-key", "persist-key",
"remote-cert-tls server", "remote-cert-tls server",

View File

@@ -21,7 +21,7 @@ func (p *Privatevpn) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev tun", "dev " + settings.Interface,
"nobind", "nobind",
"persist-key", "persist-key",
"remote-cert-tls server", "remote-cert-tls server",

View File

@@ -26,7 +26,7 @@ func (p *Protonvpn) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev tun", "dev " + settings.Interface,
"nobind", "nobind",
"persist-key", "persist-key",
"remote-cert-tls server", "remote-cert-tls server",

View File

@@ -17,7 +17,7 @@ func (p *Purevpn) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev tun", "dev " + settings.Interface,
"nobind", "nobind",
"persist-key", "persist-key",
"remote-cert-tls server", "remote-cert-tls server",

View File

@@ -26,7 +26,7 @@ func (s *Surfshark) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev tun", "dev " + settings.Interface,
"nobind", "nobind",
"persist-key", "persist-key",
"remote-cert-tls server", "remote-cert-tls server",

View File

@@ -26,7 +26,7 @@ func (t *Torguard) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev tun", "dev " + settings.Interface,
"nobind", "nobind",
"persist-key", "persist-key",
"remote-cert-tls server", "remote-cert-tls server",

View File

@@ -13,7 +13,7 @@ func (p *Provider) BuildConf(connection models.Connection,
settings configuration.OpenVPN) (lines []string) { settings configuration.OpenVPN) (lines []string) {
lines = []string{ lines = []string{
"client", "client",
"dev tun", "dev " + settings.Interface,
"nobind", "nobind",
"persist-key", "persist-key",
"tls-exit", "tls-exit",

View File

@@ -21,7 +21,7 @@ func (v *Vyprvpn) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev tun", "dev " + settings.Interface,
"nobind", "nobind",
"persist-key", "persist-key",
"remote-cert-tls server", "remote-cert-tls server",

View File

@@ -22,7 +22,7 @@ func (w *Windscribe) BuildConf(connection models.Connection,
lines = []string{ lines = []string{
"client", "client",
"dev tun", "dev " + settings.Interface,
"nobind", "nobind",
"persist-key", "persist-key",
"remote-cert-tls server", "remote-cert-tls server",