sing-box/adapter/experimental.go
2022-07-26 06:56:24 +08:00

28 lines
539 B
Go

package adapter
import (
"context"
"net"
N "github.com/sagernet/sing/common/network"
)
type ClashServer interface {
Service
TrafficController
}
type Tracker interface {
Leave()
}
type TrafficController interface {
RoutedConnection(ctx context.Context, conn net.Conn, metadata InboundContext, matchedRule Rule) (net.Conn, Tracker)
RoutedPacketConnection(ctx context.Context, conn N.PacketConn, metadata InboundContext, matchedRule Rule) (N.PacketConn, Tracker)
}
type OutboundGroup interface {
Now() string
All() []string
}