From bd776d68bec0085e5255c6bce627fa46735b70c5 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Thu, 1 Jul 2021 15:01:22 +0200 Subject: [PATCH] fix(ptx): use another obfs4 bridge See discussion at https://github.com/ooni/probe-cli/pull/413#issuecomment-871552943. --- internal/ptx/obfs4.go | 13 ++++++------- internal/ptx/obfs4_test.go | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/internal/ptx/obfs4.go b/internal/ptx/obfs4.go index 1bb6cdf40c..b693762ff3 100644 --- a/internal/ptx/obfs4.go +++ b/internal/ptx/obfs4.go @@ -19,15 +19,14 @@ import ( // not wise to use this bridge in general. But, feel free to // use this bridge for integration testing of this code. func DefaultTestingOBFS4Bridge() *OBFS4Dialer { - // TODO(bassosimone): this is a public working bridge we have found - // with @hellais. We should ask @cohosh whether there's some obfs4 bridge - // dedicated to integration testing that we should use instead. + // See https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/blob/master/projects/tor-browser/Bundle-Data/PTConfigs/bridge_prefs.js + // for publicly available bridges used by Tor Browser. return &OBFS4Dialer{ - Address: "192.95.36.142:443", - Cert: "qUVQ0srL1JI/vO6V6m/24anYXiJD3QP2HgzUKQtQ7GRqqUvs7P+tG43RtAqdhLOALP7DJQ", + Address: "209.148.46.65:443", + Cert: "ssH+9rP8dG2NLDN2XuFw63hIO/9MNNinLmxQDpVa+7kTOa9/m+tGWT1SmSYpQ9uTBGa6Hw", DataDir: "testdata", - Fingerprint: "CDF2E852BF539B82BD10E27E9115A31734E378C2", - IATMode: "1", + Fingerprint: "74FAD13168806246602538555B5521A0383A1875", + IATMode: "0", } } diff --git a/internal/ptx/obfs4_test.go b/internal/ptx/obfs4_test.go index e07325b62f..fd606102e2 100644 --- a/internal/ptx/obfs4_test.go +++ b/internal/ptx/obfs4_test.go @@ -26,7 +26,7 @@ func TestOBFS4DialerWorks(t *testing.T) { t.Fatal("unexpected value returned by Name") } bridgearg := o4d.AsBridgeArgument() - expectedbridge := "obfs4 192.95.36.142:443 CDF2E852BF539B82BD10E27E9115A31734E378C2 cert=qUVQ0srL1JI/vO6V6m/24anYXiJD3QP2HgzUKQtQ7GRqqUvs7P+tG43RtAqdhLOALP7DJQ iat-mode=1" + expectedbridge := "obfs4 209.148.46.65:443 74FAD13168806246602538555B5521A0383A1875 cert=ssH+9rP8dG2NLDN2XuFw63hIO/9MNNinLmxQDpVa+7kTOa9/m+tGWT1SmSYpQ9uTBGa6Hw iat-mode=0" if bridgearg != expectedbridge { t.Fatal("unexpected AsBridgeArgument value", bridgearg) }