Add basic clash api

This commit is contained in:
世界
2022-07-19 22:16:49 +08:00
parent c7fabe40ed
commit c5b3e8b042
36 changed files with 1498 additions and 41 deletions

View File

@@ -0,0 +1,13 @@
package adapter
import (
"context"
"net"
N "github.com/sagernet/sing/common/network"
)
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
}