Hot fix: interface name set for openvpn configs
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user