Add urltest outbound

This commit is contained in:
世界
2022-07-22 13:51:08 +08:00
parent 139127f1e4
commit c4e46c35b5
17 changed files with 473 additions and 112 deletions

View File

@@ -16,3 +16,8 @@ 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
}

View File

@@ -6,6 +6,7 @@ import (
"net/netip"
"github.com/sagernet/sing-box/common/geoip"
"github.com/sagernet/sing-box/common/urltest"
"github.com/sagernet/sing-dns"
"github.com/sagernet/sing/common/control"
N "github.com/sagernet/sing/common/network"
@@ -38,6 +39,7 @@ type Router interface {
Rules() []Rule
SetTrafficController(controller TrafficController)
URLTestHistoryStorage(create bool) *urltest.HistoryStorage
}
type Rule interface {