refactor: allow automatically wrap net/quic conn (#867)
See https://github.com/ooni/probe/issues/2219
This commit is contained in:
parent
e1d014e826
commit
097926c51f
12 changed files with 83 additions and 101 deletions
|
|
@ -172,8 +172,7 @@ func (m *Measurer) quicHandshake(ctx context.Context, index int64,
|
|||
alpn := strings.Split(m.config.alpn(), " ")
|
||||
trace := measurexlite.NewTrace(index, zeroTime)
|
||||
ol := measurexlite.NewOperationLogger(logger, "SimpleQUICPing #%d %s %s %v", index, address, sni, alpn)
|
||||
quicListener := netxlite.NewQUICListener()
|
||||
listener := trace.WrapQUICListener(quicListener)
|
||||
listener := netxlite.NewQUICListener()
|
||||
dialer := trace.NewQUICDialerWithoutResolver(listener, logger)
|
||||
tlsConfig := &tls.Config{
|
||||
NextProtos: alpn,
|
||||
|
|
|
|||
|
|
@ -182,7 +182,6 @@ func (m *Measurer) tlsConnectAndHandshake(ctx context.Context, index int64,
|
|||
return sp
|
||||
}
|
||||
defer conn.Close()
|
||||
conn = trace.WrapNetConn(conn)
|
||||
thx := trace.NewTLSHandshakerStdlib(logger)
|
||||
config := &tls.Config{
|
||||
NextProtos: alpn,
|
||||
|
|
|
|||
Loading…
Reference in a new issue