mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-16 18:02:37 +08:00
24 lines
480 B
Go
24 lines
480 B
Go
package adapter
|
|
|
|
import (
|
|
"context"
|
|
"net"
|
|
|
|
N "github.com/sagernet/sing/common/network"
|
|
)
|
|
|
|
type ClashServer interface {
|
|
Service
|
|
TrafficController
|
|
}
|
|
|
|
type TrafficController interface {
|
|
RoutedConnection(ctx context.Context, conn net.Conn, metadata InboundContext, matchedRule Rule) net.Conn
|
|
RoutedPacketConnection(ctx context.Context, conn N.PacketConn, metadata InboundContext, matchedRule Rule) N.PacketConn
|
|
}
|
|
|
|
type OutboundGroup interface {
|
|
Now() string
|
|
All() []string
|
|
}
|