chore: add WaitReadFrom support in ssr

This commit is contained in:
wwqgtxx
2023-05-28 22:51:26 +08:00
parent 097f3e250c
commit 8e88e0b9f5
20 changed files with 182 additions and 88 deletions

View File

@ -8,6 +8,7 @@ import (
"strconv"
"strings"
N "github.com/Dreamacro/clash/common/net"
"github.com/Dreamacro/clash/common/pool"
"github.com/Dreamacro/clash/log"
"github.com/Dreamacro/clash/transport/ssr/tools"
@ -82,13 +83,13 @@ func (a *authAES128) StreamConn(c net.Conn, iv []byte) net.Conn {
return &Conn{Conn: c, Protocol: p}
}
func (a *authAES128) PacketConn(c net.PacketConn) net.PacketConn {
func (a *authAES128) PacketConn(c N.EnhancePacketConn) N.EnhancePacketConn {
p := &authAES128{
Base: a.Base,
authAES128Function: a.authAES128Function,
userData: a.userData,
}
return &PacketConn{PacketConn: c, Protocol: p}
return &PacketConn{EnhancePacketConn: c, Protocol: p}
}
func (a *authAES128) Decode(dst, src *bytes.Buffer) error {