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
+6 -6
View File
@@ -28,13 +28,13 @@ func (h *forwardHandler) handleRawForwarding(ctx context.Context, conn net.Conn,
}
addr := target.Addr
if opts := target.Options(); opts != nil {
switch opts.Network {
case "unix":
if opts.Network != "" {
network = opts.Network
default:
if _, _, err := net.SplitHostPort(addr); err != nil {
addr += ":0"
}
}
}
if network != "unix" {
if _, _, err := net.SplitHostPort(addr); err != nil {
addr += ":0"
}
}