refactor(netxlite): allow easy dialer chain customization (#770)
This diff modifies the construction of a dialer to allow one to insert custom dialer wrappers into the dialers chain. The point of the chain in which we allow custom wrappers is the optimal one for connect, read, and write measurements. This new design is better than the previous netx design since we don't need to construct the whole chain manually now. The work in this diff is part of the effort to make engine/netx just a tiny wrapper around netxlite. See https://github.com/ooni/probe/issues/2121.
This commit is contained in:
parent
e4f10eeac2
commit
69fd0c5119
10 changed files with 174 additions and 111 deletions
|
|
@ -30,7 +30,7 @@ func TestNewQUICDialer(t *testing.T) {
|
|||
t.Fatal("invalid logger")
|
||||
}
|
||||
resolver := logger.Dialer.(*quicDialerResolver)
|
||||
if _, okay := resolver.Resolver.(*nullResolver); !okay {
|
||||
if _, okay := resolver.Resolver.(*NullResolver); !okay {
|
||||
t.Fatal("invalid resolver type")
|
||||
}
|
||||
logger = resolver.Dialer.(*quicDialerLogger)
|
||||
|
|
|
|||
Loading…
Reference in a new issue