Add v2ray stats api

This commit is contained in:
世界
2022-09-26 19:37:06 +08:00
parent d967847370
commit 0ea767a809
32 changed files with 1408 additions and 64 deletions

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) {

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
}