feat(netxlite): implement hooks for transparent proxy (#561)
See https://github.com/ooni/probe/issues/1803#issuecomment-957323297.
This commit is contained in:
parent
eaa3d6eae0
commit
ffdafaf351
5 changed files with 65 additions and 6 deletions
|
|
@ -38,7 +38,7 @@ func TestDialerSystem(t *testing.T) {
|
|||
t.Run("has a default timeout", func(t *testing.T) {
|
||||
d := &dialerSystem{}
|
||||
ud := d.newUnderlyingDialer()
|
||||
if ud.Timeout != dialerDefaultTimeout {
|
||||
if ud.(*net.Dialer).Timeout != dialerDefaultTimeout {
|
||||
t.Fatal("unexpected default timeout")
|
||||
}
|
||||
})
|
||||
|
|
@ -47,7 +47,7 @@ func TestDialerSystem(t *testing.T) {
|
|||
const smaller = 1 * time.Second
|
||||
d := &dialerSystem{timeout: smaller}
|
||||
ud := d.newUnderlyingDialer()
|
||||
if ud.Timeout != smaller {
|
||||
if ud.(*net.Dialer).Timeout != smaller {
|
||||
t.Fatal("unexpected timeout")
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue