clash/constant/context.go

26 lines
353 B
Go
Raw Normal View History

package constant
import (
"net"
N "github.com/Dreamacro/clash/common/net"
2023-04-09 07:40:17 +00:00
"github.com/gofrs/uuid/v5"
)
type PlainContext interface {
ID() uuid.UUID
}
type ConnContext interface {
PlainContext
Metadata() *Metadata
Conn() *N.BufferedConn
}
type PacketConnContext interface {
PlainContext
Metadata() *Metadata
PacketConn() net.PacketConn
}