Make clash api and gVisor optional

This commit is contained in:
世界
2022-07-20 07:12:40 +08:00
parent 5905ad3278
commit 98adef316a
9 changed files with 49 additions and 16 deletions

View File

@@ -7,6 +7,11 @@ import (
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