feat(listener/runix): support remote UDS forwarding (#102)

This commit is contained in:
Yuan Tong
2026-06-13 13:39:14 +08:00
committed by GitHub
parent 9f610fd163
commit 8b0806bad4
14 changed files with 247 additions and 34 deletions
+13
View File
@@ -82,6 +82,19 @@ func TestNewRecorderObject_UDP(t *testing.T) {
}
}
func TestNewRecorderObject_Unix(t *testing.T) {
h := newInitdHandler()
conn := newStringConn(nil)
conn.local = &net.UnixAddr{Name: "/tmp/local.sock", Net: "unix"}
conn.remote = &net.UnixAddr{Name: "/tmp/remote.sock", Net: "unix"}
ro := h.newRecorderObject(context.Background(), conn, time.Now())
if ro.Network != "unix" {
t.Errorf("expected network unix, got %s", ro.Network)
}
}
// ---------------------------------------------------------------------------
// checkRateLimit
// ---------------------------------------------------------------------------