sing-box/adapter/traffic_controller.go

14 lines
356 B
Go
Raw Normal View History

2022-07-19 14:16:49 +00:00
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
}