mihomo/constant/context.go
2023-02-24 09:54:54 +08:00

25 lines
350 B
Go

package constant
import (
"net"
N "github.com/Dreamacro/clash/common/net"
"github.com/gofrs/uuid"
)
type PlainContext interface {
ID() uuid.UUID
}
type ConnContext interface {
PlainContext
Metadata() *Metadata
Conn() *N.BufferedConn
}
type PacketConnContext interface {
PlainContext
Metadata() *Metadata
PacketConn() net.PacketConn
}