From 75dbd87786bf2b72e315608358d08c5455aa287c Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Tue, 17 Oct 2023 09:22:58 +0200 Subject: [PATCH] fix(core.py): relax riseupvpn scoring logic This diff, which would require additional tweaks, attempts at relaxing the riseupvpn scoring logic as discussed by https://github.com/ooni/backend/issues/745. Closes https://github.com/ooni/backend/issues/745. --- fastpath/fastpath/core.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/fastpath/fastpath/core.py b/fastpath/fastpath/core.py index 34a05c87..9bafc2e6 100644 --- a/fastpath/fastpath/core.py +++ b/fastpath/fastpath/core.py @@ -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