fix(nat): bound dashboard credential classification

This commit is contained in:
naiba committed 2026-10-01 11:48:23 +00:00
1 parent 34ac50394d
commit 1420dd450c
7 files changed
+338 -95

No files matched your search

@@ -49,8 +49,8 @@ func setupNATFlowTest(t *testing.T) (*rpcService.NezhaHandler, *model.Server, *n
// Wire the gate exactly as cmd/dashboard/main.go does, with the real
// classifiers built by setupDashboardCredentialTest.
rpc.SetNATDashboardCredentialGate(IsDashboardCredential, IsDashboardCredentialValue)
t.Cleanup(func() { rpc.SetNATDashboardCredentialGate(nil, nil) })
rpc.SetNATDashboardCredentialGate(ClassifyDashboardCredentialValues)
t.Cleanup(func() { rpc.SetNATDashboardCredentialGate(nil) })
return handler, server, taskStream
}