Add v2ray stats api

This commit is contained in:
世界
2022-09-29 08:49:34 +08:00
parent c7a485815c
commit 1b44faed17
32 changed files with 1407 additions and 63 deletions
+4
View File
@@ -57,6 +57,10 @@ func (c *Conn) WriteBuffer(buffer *buf.Buffer) error {
return nil
}
func (c *Conn) Upstream() any {
return c.ExtendedConn
}
type DirectConn Conn
func (c *DirectConn) WriteTo(w io.Writer) (n int64, err error) {
+4
View File
@@ -35,3 +35,7 @@ func (c *PacketConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) er
c.writeCounter.Add(dataLen)
return nil
}
func (c *PacketConn) Upstream() any {
return c.PacketConn
}