From 6545faca3e6a3c4a2fbc76b8f290248c22dcdf03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Tue, 21 Nov 2023 17:08:55 +0300 Subject: [PATCH] Update signal test endpoints fixes probe/2627 (#1389) ## Checklist - [x] I have read the [contribution guidelines](https://github.com/ooni/probe-cli/blob/master/CONTRIBUTING.md) - [x] reference issue for this pull request: https://github.com/ooni/probe/issues/2627 - [x] if you changed anything related to how experiments work and you need to reflect these changes in the ooni/spec repository, please link to the related ooni/spec pull request: https://github.com/ooni/spec/pull/281 - [x] if you changed code inside an experiment, make sure you bump its version number ## Description Signal has made changes to their endpoints. In this PR we drop a legacy endpoint and add more of the endpoints communicated to us by the signal devs. --------- Co-authored-by: Simone Basso --- internal/experiment/signal/signal.go | 50 ++++++++++++++++++++--- internal/experiment/signal/signal_test.go | 2 +- 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/internal/experiment/signal/signal.go b/internal/experiment/signal/signal.go index 28f1ba504..c991e0309 100644 --- a/internal/experiment/signal/signal.go +++ b/internal/experiment/signal/signal.go @@ -15,7 +15,7 @@ import ( const ( testName = "signal" - testVersion = "0.2.3" + testVersion = "0.2.4" signalCA = `-----BEGIN CERTIFICATE----- MIID7zCCAtegAwIBAgIJAIm6LatK5PNiMA0GCSqGSIb3DQEBBQUAMIGNMQswCQYD @@ -117,7 +117,6 @@ func (tk *TestKeys) Update(v urlgetter.MultiOutput) { tk.SignalBackendFailure = v.TestKeys.Failure return } - return } // Measurer performs the measurement @@ -164,33 +163,72 @@ func (m Measurer) Run(ctx context.Context, args *model.ExperimentArgs) error { } inputs := []urlgetter.MultiInput{ + // Here we need to provide the method explicitly. See // https://github.com/ooni/probe-engine/issues/827. - {Target: "https://textsecure-service.whispersystems.org/", Config: urlgetter.Config{ + {Target: "https://api.backup.signal.org/", Config: urlgetter.Config{ Method: "GET", FailOnHTTPError: false, CertPool: certPool, }}, - {Target: "https://storage.signal.org/", Config: urlgetter.Config{ + {Target: "https://cdn.signal.org/", Config: urlgetter.Config{ Method: "GET", FailOnHTTPError: false, CertPool: certPool, }}, - {Target: "https://cdn.signal.org/", Config: urlgetter.Config{ + {Target: "https://cdn2.signal.org/", Config: urlgetter.Config{ Method: "GET", FailOnHTTPError: false, CertPool: certPool, }}, - {Target: "https://cdn2.signal.org/", Config: urlgetter.Config{ + {Target: "https://cdsi.signal.org/", Config: urlgetter.Config{ + Method: "GET", + FailOnHTTPError: false, + CertPool: certPool, + }}, + {Target: "https://chat.signal.org/", Config: urlgetter.Config{ Method: "GET", FailOnHTTPError: false, CertPool: certPool, }}, + /* + TODO: understand why this endpoint does not speak TLS + {Target: "https://contentproxy.signal.org/", Config: urlgetter.Config{ + Method: "GET", + FailOnHTTPError: false, + CertPool: certPool, + }}, + */ {Target: "https://sfu.voip.signal.org/", Config: urlgetter.Config{ Method: "GET", FailOnHTTPError: false, CertPool: certPool, }}, + {Target: "https://storage.signal.org/", Config: urlgetter.Config{ + Method: "GET", + FailOnHTTPError: false, + CertPool: certPool, + }}, + {Target: "https://svr2.signal.org/", Config: urlgetter.Config{ + Method: "GET", + FailOnHTTPError: false, + CertPool: certPool, + }}, + {Target: "https://ud-chat.signal.org/", Config: urlgetter.Config{ + Method: "GET", + FailOnHTTPError: false, + CertPool: certPool, + }}, + {Target: "https://updates.signal.org/", Config: urlgetter.Config{ + Method: "GET", + FailOnHTTPError: false, + CertPool: certPool, + }}, + {Target: "https://updates2.signal.org/", Config: urlgetter.Config{ + Method: "GET", + FailOnHTTPError: false, + CertPool: certPool, + }}, {Target: "dnslookup://uptime.signal.org"}, } multi := urlgetter.Multi{Begin: time.Now(), Getter: m.Getter, Session: sess} diff --git a/internal/experiment/signal/signal_test.go b/internal/experiment/signal/signal_test.go index 1b8456bf0..cbae88470 100644 --- a/internal/experiment/signal/signal_test.go +++ b/internal/experiment/signal/signal_test.go @@ -17,7 +17,7 @@ func TestNewExperimentMeasurer(t *testing.T) { if measurer.ExperimentName() != "signal" { t.Fatal("unexpected name") } - if measurer.ExperimentVersion() != "0.2.3" { + if measurer.ExperimentVersion() != "0.2.4" { t.Fatal("unexpected version") } }