mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-19 06:39:48 +03:00
API: Add ListInbounds and ListOutbounds (#4723)
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/xtls/xray-core/common"
|
||||
"github.com/xtls/xray-core/common/serial"
|
||||
"github.com/xtls/xray-core/features"
|
||||
"github.com/xtls/xray-core/transport"
|
||||
)
|
||||
@ -15,6 +16,8 @@ type Handler interface {
|
||||
common.Runnable
|
||||
Tag() string
|
||||
Dispatch(ctx context.Context, link *transport.Link)
|
||||
SenderSettings() *serial.TypedMessage
|
||||
ProxySettings() *serial.TypedMessage
|
||||
}
|
||||
|
||||
type HandlerSelector interface {
|
||||
@ -35,6 +38,9 @@ type Manager interface {
|
||||
|
||||
// RemoveHandler removes a handler from outbound.Manager.
|
||||
RemoveHandler(ctx context.Context, tag string) error
|
||||
|
||||
// ListHandlers returns a list of outbound.Handler.
|
||||
ListHandlers(ctx context.Context) []Handler
|
||||
}
|
||||
|
||||
// ManagerType returns the type of Manager interface. Can be used to implement common.HasType.
|
||||
|
Reference in New Issue
Block a user