Skip to content

Commit

Permalink
dnscrypt: m fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous committed Jan 22, 2025
1 parent 3a0da8d commit 722d3ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion intra/dnscrypt/servers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,16 @@ func (r fakeResolver) LookupNetIPFor(_ context.Context, _, _, _ string) ([]netip
return nil, errors.New("not implemented")
}

const minmtu = 1280

func TestOne(t *testing.T) {
ctx := context.TODO()
r := &net.Resolver{}
// create a struct that implements protect.Controller interface
ctl := &fakeCtl{}
obs := &fakeObs{}
// bdg := &fakeBdg{Controller: ctl}
pxr := ipn.NewProxifier(ctx, ctl, obs)
pxr := ipn.NewProxifier(ctx, minmtu, ctl, obs)
if pxr == nil {
t.Fatal("nil proxifier")
}
Expand Down
2 changes: 1 addition & 1 deletion intra/tun2socks.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (t traceout) s() string { return string(t) }

func init() {
// increase garbage collection frequency: archive.is/WQBf7
debug.SetGCPercent(10)
debug.SetGCPercent(25)
debug.SetMemoryLimit(1024 * 1024 * 1024 * 4) // 4GB
debug.SetPanicOnFault(true)
}
Expand Down

0 comments on commit 722d3ea

Please sign in to comment.