Skip to content

Commit

Permalink
Update signal test endpoints fixes probe/2627 (#1389)
Browse files Browse the repository at this point in the history
## 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:
ooni/probe#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:
ooni/spec#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 <bassosimone@gmail.com>
  • Loading branch information
hellais and bassosimone committed Nov 21, 2023
1 parent 5c50be4 commit 6545fac
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 7 deletions.
50 changes: 44 additions & 6 deletions internal/experiment/signal/signal.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

const (
testName = "signal"
testVersion = "0.2.3"
testVersion = "0.2.4"

signalCA = `-----BEGIN CERTIFICATE-----
MIID7zCCAtegAwIBAgIJAIm6LatK5PNiMA0GCSqGSIb3DQEBBQUAMIGNMQswCQYD
Expand Down Expand Up @@ -117,7 +117,6 @@ func (tk *TestKeys) Update(v urlgetter.MultiOutput) {
tk.SignalBackendFailure = v.TestKeys.Failure
return
}
return
}

// Measurer performs the measurement
Expand Down Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion internal/experiment/signal/signal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
Expand Down

0 comments on commit 6545fac

Please sign in to comment.