mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-23 11:02:25 +03:00
Add ssm api server
This commit is contained in:
@@ -48,3 +48,16 @@ type V2RayStatsService interface {
|
||||
RoutedConnection(inbound string, outbound string, user string, conn net.Conn) net.Conn
|
||||
RoutedPacketConnection(inbound string, outbound string, user string, conn N.PacketConn) N.PacketConn
|
||||
}
|
||||
|
||||
type SSMServer interface {
|
||||
Service
|
||||
RoutedConnection(metadata InboundContext, conn net.Conn) net.Conn
|
||||
RoutedPacketConnection(metadata InboundContext, conn N.PacketConn) N.PacketConn
|
||||
}
|
||||
|
||||
type ManagedShadowsocksServer interface {
|
||||
Inbound
|
||||
Method() string
|
||||
Password() string
|
||||
UpdateUsers(users []string, uPSKs []string) error
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import (
|
||||
type Router interface {
|
||||
Service
|
||||
|
||||
Inbound(tag string) (Inbound, bool)
|
||||
Outbounds() []Outbound
|
||||
Outbound(tag string) (Outbound, bool)
|
||||
DefaultOutbound(network string) Outbound
|
||||
@@ -45,6 +46,9 @@ type Router interface {
|
||||
|
||||
V2RayServer() V2RayServer
|
||||
SetV2RayServer(server V2RayServer)
|
||||
|
||||
SSMServer() SSMServer
|
||||
SetSSMServer(server SSMServer)
|
||||
}
|
||||
|
||||
type routerContextKey struct{}
|
||||
|
||||
Reference in New Issue
Block a user