From c29517be4de28f5fc4cea55eec4c8de409973ed2 Mon Sep 17 00:00:00 2001 From: ginuerzh Date: Sat, 20 Jun 2026 14:45:46 +0800 Subject: [PATCH] fix(quota): add UnwrapConn to quotaConn wrapper for handler type assertions --- limiter/quota/wrapper/conn.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/limiter/quota/wrapper/conn.go b/limiter/quota/wrapper/conn.go index 0c7d4c76..dbe97e8c 100644 --- a/limiter/quota/wrapper/conn.go +++ b/limiter/quota/wrapper/conn.go @@ -76,3 +76,9 @@ func (c *quotaConn) Context() context.Context { } return nil } + +// UnwrapConn returns the underlying connection, allowing type assertions +// in handlers that iterate wrapper layers (e.g., SSH handler's unwrapConn). +func (c *quotaConn) UnwrapConn() net.Conn { + return c.Conn +}