mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-16 13:27:16 +03:00
API: Add ListInbounds and ListOutbounds (#4723)
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
||||
|
||||
"github.com/xtls/xray-core/common"
|
||||
"github.com/xtls/xray-core/common/net"
|
||||
"github.com/xtls/xray-core/common/serial"
|
||||
"github.com/xtls/xray-core/features"
|
||||
)
|
||||
|
||||
@ -15,6 +16,10 @@ type Handler interface {
|
||||
common.Runnable
|
||||
// The tag of this handler.
|
||||
Tag() string
|
||||
// Returns the active receiver settings.
|
||||
ReceiverSettings() *serial.TypedMessage
|
||||
// Returns the active proxy settings.
|
||||
ProxySettings() *serial.TypedMessage
|
||||
|
||||
// Deprecated: Do not use in new code.
|
||||
GetRandomInboundProxy() (interface{}, net.Port, int)
|
||||
@ -32,6 +37,9 @@ type Manager interface {
|
||||
|
||||
// RemoveHandler removes a handler from Manager.
|
||||
RemoveHandler(ctx context.Context, tag string) error
|
||||
|
||||
// ListHandlers returns a list of inbound.Handler.
|
||||
ListHandlers(ctx context.Context) []Handler
|
||||
}
|
||||
|
||||
// ManagerType returns the type of Manager interface. Can be used for implementing common.HasType.
|
||||
|
Reference in New Issue
Block a user