refactor: Modular inbound/outbound manager

This commit is contained in:
世界
2025-01-13 15:14:29 +08:00
parent 28ec898a8c
commit 19fb214226
69 changed files with 1186 additions and 754 deletions
+9
View File
@@ -22,3 +22,12 @@ type OutboundRegistry interface {
option.OutboundOptionsRegistry
CreateOutbound(ctx context.Context, router Router, logger log.ContextLogger, tag string, outboundType string, options any) (Outbound, error)
}
type OutboundManager interface {
NewService
Outbounds() []Outbound
Outbound(tag string) (Outbound, bool)
Default() Outbound
Remove(tag string) error
Create(ctx context.Context, router Router, logger log.ContextLogger, tag string, outboundType string, options any) error
}