diff options
| author | Jeroen Wijenbergh <jeroenwijenbergh@protonmail.com> | 2024-05-06 14:47:07 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2024-05-24 13:25:11 +0200 |
| commit | a2ee44b700d6f094bbf887c8cfb4734da3e3cb3f (patch) | |
| tree | d57c53dc3eed4a28d309749811b14c6c981e0330 /client | |
| parent | 4b852feede7bff61d8b164025bd03bafb0430370 (diff) | |
Client Test: Fix OpenVPN prefer TCP tests
Diffstat (limited to 'client')
| -rw-r--r-- | client/client_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/client_test.go b/client/client_test.go index 4afcff5..b1bfd0e 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -329,8 +329,8 @@ func TestPreferTCP(t *testing.T) { config, configErr := state.GetConfig(ck, serverURI, srvtypes.TypeCustom, true, false) // Test server should accept prefer TCP! - if config.Protocol != protocol.OpenVPN { - t.Fatalf("Invalid protocol for prefer TCP, got: WireGuard, want: OpenVPN") + if config.Protocol != protocol.OpenVPN && config.Protocol != protocol.WireGuardProxy { + t.Fatalf("Invalid protocol for prefer TCP") } if configErr != nil { @@ -338,7 +338,7 @@ func TestPreferTCP(t *testing.T) { } // We also test for script security 0 here - if !strings.HasSuffix(config.VPNConfig, "udp\nscript-security 0") { + if config.Protocol == protocol.OpenVPN && !strings.HasSuffix(config.VPNConfig, "udp\nscript-security 0") { t.Fatalf("Suffix for prefer TCP is not in the right order for config: %s", config.VPNConfig) } |
