chore: upgrade deps and attempt to enable using go1.19 (#869)

* upgrade to our go.mod enabled of psiphon-tunnel-core such that
we're now using v2.0.24 of the tunnel-core;

* upgrade to the latest lucas-clemente/quic-go release;

* upgrade to the latest ooni/oohttp release (which is based on go1.19
but the diff seems good enough to continue using go1.18.x as well);

* upgrade to the latest ooni/oocrypto release (for which we can make the
same remarks regarding using go1.18.x);

* deal with changes in lucas-clemente/quic-go API as well as changes
in what a go1.19 *tls.Conn compatible type should look like.

Unfortunately, we cannot switch to go1.19 because psiphon forks quic-go
and their fork's still not building using such a version of go.

Part of ooni/probe#2211.
This commit is contained in:
Simone Basso
2022-08-19 11:26:50 +02:00
committed by GitHub
parent 097926c51f
commit 9ffa124511
28 changed files with 291 additions and 244 deletions
+1 -1
View File
@@ -423,7 +423,7 @@ func (mx *Measurer) QUICHandshakeWithDB(ctx context.Context, db WritableDB,
defer cancel()
qd := mx.NewQUICDialerWithoutResolver(db, mx.Logger)
defer qd.CloseIdleConnections()
qconn, err := qd.DialContext(ctx, "udp", address, config, &quic.Config{})
qconn, err := qd.DialContext(ctx, address, config, &quic.Config{})
ol.Stop(err)
return qconn, err
}
+2 -2
View File
@@ -105,7 +105,7 @@ type quicDialerDB struct {
logger model.Logger
}
func (qh *quicDialerDB) DialContext(ctx context.Context, network, address string,
func (qh *quicDialerDB) DialContext(ctx context.Context, address string,
tlsConfig *tls.Config, quicConfig *quic.Config) (quic.EarlyConnection, error) {
started := time.Since(qh.begin).Seconds()
var state tls.ConnectionState
@@ -116,7 +116,7 @@ func (qh *quicDialerDB) DialContext(ctx context.Context, network, address string
}
dialer := netxlite.NewQUICDialerWithoutResolver(listener, qh.logger)
defer dialer.CloseIdleConnections()
sess, err := dialer.DialContext(ctx, network, address, tlsConfig, quicConfig)
sess, err := dialer.DialContext(ctx, address, tlsConfig, quicConfig)
if err == nil {
<-sess.HandshakeComplete().Done() // robustness (the dialer already does that)
state = sess.ConnectionState().TLS.ConnectionState