improve: use stream reduce auth check time

This commit is contained in:
naiba
2024-11-23 12:43:02 +08:00
parent cd42b1b9d5
commit 22738b6244
10 changed files with 249 additions and 141 deletions

View File

@@ -8,7 +8,7 @@ import (
"github.com/naiba/nezha/proto"
)
var _ io.ReadWriteCloser = &IOStreamWrapper{}
var _ io.ReadWriteCloser = (*IOStreamWrapper)(nil)
type IOStream interface {
Recv() (*proto.IOStreamData, error)

View File

@@ -8,7 +8,7 @@ import (
"net/http"
)
var _ io.ReadWriteCloser = &RequestWrapper{}
var _ io.ReadWriteCloser = (*RequestWrapper)(nil)
type RequestWrapper struct {
req *http.Request

View File

@@ -7,7 +7,7 @@ import (
"github.com/gorilla/websocket"
)
var _ io.ReadWriteCloser = &Conn{}
var _ io.ReadWriteCloser = (*Conn)(nil)
type Conn struct {
*websocket.Conn