chore: support splice for direct outbound

This commit is contained in:
wwqgtxx
2023-04-25 23:01:05 +08:00
parent efcb278f61
commit 7bb5da3005
10 changed files with 76 additions and 9 deletions

View File

@ -204,6 +204,14 @@ func (c *conn) Upstream() any {
return c.ExtendedConn
}
func (c *conn) WriterReplaceable() bool {
return true
}
func (c *conn) ReaderReplaceable() bool {
return true
}
func NewConn(c net.Conn, a C.ProxyAdapter) C.Conn {
if _, ok := c.(syscall.Conn); !ok { // exclusion system conn like *net.TCPConn
c = N.NewDeadlineConn(c) // most conn from outbound can't handle readDeadline correctly