2021-01-23 14:49:46 +08:00
|
|
|
package constant
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net"
|
|
|
|
|
2023-11-03 21:01:45 +08:00
|
|
|
N "github.com/metacubex/mihomo/common/net"
|
2023-02-24 09:54:54 +08:00
|
|
|
|
2023-04-09 15:40:17 +08:00
|
|
|
"github.com/gofrs/uuid/v5"
|
2021-01-23 14:49:46 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
type PlainContext interface {
|
|
|
|
ID() uuid.UUID
|
|
|
|
}
|
|
|
|
|
|
|
|
type ConnContext interface {
|
|
|
|
PlainContext
|
|
|
|
Metadata() *Metadata
|
2023-02-24 09:54:54 +08:00
|
|
|
Conn() *N.BufferedConn
|
2021-01-23 14:49:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type PacketConnContext interface {
|
|
|
|
PlainContext
|
|
|
|
Metadata() *Metadata
|
|
|
|
PacketConn() net.PacketConn
|
|
|
|
}
|