Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix how is checked server obfuscated support #718

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/docker/tester/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pytest==8.3.3
# Used for running tests with --timeout flag
pytest-timeout==2.0.1
pytest-timeout==2.3.1
requests==2.32.3
sh==1.14.1
paramiko==3.5.0
Expand Down
2 changes: 1 addition & 1 deletion core/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ func IsConnectableVia(tech ServerTechnology) Predicate {
// IsObfuscated returns a filter for keeping only obfuscated servers.
func IsObfuscated() Predicate {
return func(s Server) bool {
return IsConnectableVia(OpenVPNUDPObfuscated)(s) &&
return IsConnectableVia(OpenVPNUDPObfuscated)(s) ||
IsConnectableVia(OpenVPNTCPObfuscated)(s)
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/models_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ func TestIsObfuscated(t *testing.T) {
},
},
},
expected: false,
expected: true,
},
{
name: "not obfuscated online technology with online server",
Expand Down
11 changes: 2 additions & 9 deletions daemon/rpc_servers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,6 @@ func TestServers(t *testing.T) {
server3City,
false,
core.Groups{
{
ID: config.ServerGroup_OBFUSCATED,
Title: "Standard VPN",
},
{
ID: config.ServerGroup_STANDARD_VPN_SERVERS,
Title: "Standard VPN",
Expand All @@ -231,7 +227,6 @@ func TestServers(t *testing.T) {
[]core.ServerTechnology{
core.L2TP,
core.HTTPProxy,
core.OpenVPNTCPObfuscated,
core.OpenVPNTCP,
core.WireguardTech,
}),
Expand Down Expand Up @@ -325,9 +320,8 @@ func TestServers(t *testing.T) {
Id: int64(server3ID),
HostName: server3Hostname,
Virtual: false,
ServerGroups: []config.ServerGroup{config.ServerGroup_OBFUSCATED, config.ServerGroup_STANDARD_VPN_SERVERS},
ServerGroups: []config.ServerGroup{config.ServerGroup_STANDARD_VPN_SERVERS},
Technologies: []pb.Technology{
pb.Technology_OBFUSCATED_OPENVPN_TCP,
pb.Technology_OPENVPN_TCP,
pb.Technology_NORDLYNX,
},
Expand Down Expand Up @@ -385,9 +379,8 @@ func TestServers(t *testing.T) {
Id: int64(server3ID),
HostName: server3Hostname,
Virtual: false,
ServerGroups: []config.ServerGroup{config.ServerGroup_OBFUSCATED, config.ServerGroup_STANDARD_VPN_SERVERS},
ServerGroups: []config.ServerGroup{config.ServerGroup_STANDARD_VPN_SERVERS},
Technologies: []pb.Technology{
pb.Technology_OBFUSCATED_OPENVPN_TCP,
pb.Technology_OPENVPN_TCP,
pb.Technology_NORDLYNX,
},
Expand Down
2 changes: 1 addition & 1 deletion magefiles/mage.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const (
imageSnapPackager = registryPrefix + "snaper:0.0.4"
imageProtobufGenerator = registryPrefix + "generator:1.4.1"
imageScanner = registryPrefix + "scanner:1.1.0"
imageTester = registryPrefix + "tester:1.3.1"
imageTester = registryPrefix + "tester:1.3.2"
imageQAPeer = registryPrefix + "qa-peer:1.0.4"
imageRuster = registryPrefix + "ruster:1.3.0"

Expand Down
4 changes: 2 additions & 2 deletions test/qa/test_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,11 @@ def test_status_connected(tech, proto, obfuscated):

connect_time = time.monotonic()

time.sleep(15)
time.sleep(5)
sh.ping("-c", "1", "-w", "1", "1.1.1.1")

status_time = time.monotonic()
status_info = daemon.get_status_data()
status_time = time.monotonic()

print("status_info: " + str(status_info))
print("actual_status: " + str(sh.nordvpn.status()))
Expand Down
4 changes: 2 additions & 2 deletions test/qa/test_meshnet_routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ def test_route_to_peer_status_valid():

connect_time = time.monotonic()

time.sleep(15)
time.sleep(5)
sh.ping("-c", "1", "-w", "1", "103.86.96.100")

status_time = time.monotonic()
status_output = sh.nordvpn.status().lstrip("\r -")
status_time = time.monotonic()

# Split the data into lines, filter out lines that don't contain ':',
# split each line into key-value pairs, strip whitespace, and convert keys to lowercase
Expand Down
Loading