From fe6d378a1fa4296ea74390a3efd2e9c66b8637d0 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Mon, 22 Aug 2022 12:52:37 +0200 Subject: [PATCH] chore: use {go,oohttp,oocrypto} v1.18.5 (#872) * chore: use {go,oohttp,oocrypto} v1.18.5 This diff pins OONI to use go1.18.5 and oohttp and oocrypto at go1.18.5 as the version of go with which we build releases. The same codebase also works with go1.19 although this configuration cannot include Psiphon (see https://github.com/ooni/probe/issues/2222). Closes https://github.com/ooni/probe/issues/2223. * fix: use oocrypto@v0.1.1 This ensures we keep https://github.com/ooni/probe/issues/2122 fixed. --- GOVERSION | 2 +- go.mod | 4 ++-- go.sum | 8 ++++---- internal/netxlite/utls_test.go | 29 +++++++++++++++++------------ 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/GOVERSION b/GOVERSION index b9fb27ab4f..8e8b0a9335 100644 --- a/GOVERSION +++ b/GOVERSION @@ -1 +1 @@ -1.18.3 +1.18.5 diff --git a/go.mod b/go.mod index 17d1f71551..c91f2d72dd 100644 --- a/go.mod +++ b/go.mod @@ -25,8 +25,8 @@ require ( github.com/mitchellh/go-wordwrap v1.0.1 github.com/montanaflynn/stats v0.6.6 github.com/ooni/go-libtor v1.1.5 - github.com/ooni/oocrypto v0.2.1 - github.com/ooni/oohttp v0.3.0 + github.com/ooni/oocrypto v0.1.1 + github.com/ooni/oohttp v0.2.1 github.com/ooni/probe-assets v0.11.0 github.com/ooni/psiphon/tunnel-core v0.0.0-20220819091114-7dccc0b6b6cd github.com/oschwald/geoip2-golang v1.8.0 diff --git a/go.sum b/go.sum index f697e7a608..9ac91e1a58 100644 --- a/go.sum +++ b/go.sum @@ -621,10 +621,10 @@ github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/ooni/go-libtor v1.1.5 h1:YbwXR9aLuL37EwL7rksPCQQhcHwoxU+M/v+jwZR+n5Y= github.com/ooni/go-libtor v1.1.5/go.mod h1:q1YyLwRD9GeMyeerVvwc0vJ2YgwDLTp2bdVcrh/JXyI= -github.com/ooni/oocrypto v0.2.1 h1:jCx/s8SlZ81r6ECXkA8kiiz64D5q8CelcyQyKyl8sk8= -github.com/ooni/oocrypto v0.2.1/go.mod h1:NwhJ7wswn0Tlbc5Md2EIGZvvhTUE2CDUuNJM9jkbIFc= -github.com/ooni/oohttp v0.3.0 h1:75OsZKelkLXl6p2UD53dTJyIv+9owWqaL6sMT26LN8w= -github.com/ooni/oohttp v0.3.0/go.mod h1:fgNDPYw+nsgEKCDBpT/4R06bgnrCRtvgNmAWOCmm4JE= +github.com/ooni/oocrypto v0.1.1 h1:zYU9fxEGNHAd73gB8aRfbvvvAzdqRe/EXVlY64cMn7c= +github.com/ooni/oocrypto v0.1.1/go.mod h1:tP8tp455ERRdy38YWJQtQHb5LB6I5DvI4ffrnouypnM= +github.com/ooni/oohttp v0.2.1 h1:MGvRAXJdLFNqKeS5HXynIt8y7JIknmdTwC7DRpzDBko= +github.com/ooni/oohttp v0.2.1/go.mod h1:fgNDPYw+nsgEKCDBpT/4R06bgnrCRtvgNmAWOCmm4JE= github.com/ooni/probe-assets v0.11.0 h1:IM2d455Zeiu1bb115aYdO+Aj35fgPTTmh2q3F7a5JnI= github.com/ooni/probe-assets v0.11.0/go.mod h1:gI9d0ZNBkMsNgK5Me3m3K+QqWzFwHKP7KGZgyCB7IH4= github.com/ooni/psiphon/tunnel-core v0.0.0-20220819091114-7dccc0b6b6cd h1:zKGpY8HLA6dSStqV8df1BzfUz2lZ9Yh9XeokLhAOHls= diff --git a/internal/netxlite/utls_test.go b/internal/netxlite/utls_test.go index 570cf36300..4d03d51a85 100644 --- a/internal/netxlite/utls_test.go +++ b/internal/netxlite/utls_test.go @@ -10,7 +10,6 @@ import ( "time" "github.com/apex/log" - "github.com/ooni/probe-cli/v3/internal/model/mocks" utls "gitlab.com/yawning/utls.git" ) @@ -94,17 +93,23 @@ func TestUTLSConn(t *testing.T) { }) }) - t.Run("NetConn", func(t *testing.T) { - factory := newConnUTLS(&utls.HelloChrome_70) - conn := &mocks.Conn{} - tconn, err := factory(conn, &tls.Config{}) - if err != nil { - t.Fatal(err) - } - if tconn.NetConn() != conn { - t.Fatal("NetConn is not WAI") - } - }) + // TODO(https://github.com/ooni/probe/issues/2222): we cannot enable + // this test until we use oocrypto >= v0.2 which uses go1.19. In turn, + // we cannot use go1.19 as our main version until we upgrade psiphon + // such that it builds using go1.19, which is the issue in #2222. + /* + t.Run("NetConn", func(t *testing.T) { + factory := newConnUTLS(&utls.HelloChrome_70) + conn := &mocks.Conn{} + tconn, err := factory(conn, &tls.Config{}) + if err != nil { + t.Fatal(err) + } + if tconn.NetConn() != conn { + t.Fatal("NetConn is not WAI") + } + }) + */ } func Test_newConnUTLSWithHelloID(t *testing.T) {