mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-09-20 02:27:50 +00:00
14 lines
356 B
Go
14 lines
356 B
Go
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
|
|
}
|