Skip to content

Commit

Permalink
fix(core.py): relax riseupvpn scoring logic
Browse files Browse the repository at this point in the history
This diff, which would require additional tweaks, attempts at relaxing the riseupvpn scoring logic as discussed by #745.

Closes #745.
  • Loading branch information
bassosimone authored Oct 17, 2023
1 parent 6ecccef commit 75dbd87
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions fastpath/fastpath/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1432,21 +1432,10 @@ def score_riseupvpn(msm: dict) -> dict:
"""Calculate measurement scoring for RiseUp VPN
Returns a scores dict
"""
# https://github.com/ooni/backend/issues/541
# originally: https://github.com/ooni/backend/issues/541
# since 2023-10-17: https://github.com/ooni/backend/issues/745
scores = init_scores()
tk = g_or(msm, "test_keys", {})
tstatus = tk.get("transport_status") or {}
obfs4 = tstatus.get("obfs4")
openvpn = tstatus.get("openvpn")
anomaly = (
tk.get("api_status") == "blocked"
or tk.get("ca_cert_status") is False
or obfs4 == "blocked"
or openvpn == "blocked"
)
if anomaly:
scores["blocking_general"] = 1.0

scores["blocking_general"] = 1.0
scores["extra"] = dict(test_runtime=msm.get("test_runtime"))
return scores

Expand Down

0 comments on commit 75dbd87

Please sign in to comment.