refactor: Modular inbound/outbound manager

This commit is contained in:
世界
2024-11-28 14:29:45 +08:00
parent f51bca97a8
commit 2a786daabe
69 changed files with 1184 additions and 754 deletions
+9 -1
View File
@@ -28,7 +28,15 @@ type UDPInjectableInbound interface {
type InboundRegistry interface {
option.InboundOptionsRegistry
CreateInbound(ctx context.Context, router Router, logger log.ContextLogger, tag string, outboundType string, options any) (Inbound, error)
Create(ctx context.Context, router Router, logger log.ContextLogger, tag string, inboundType string, options any) (Inbound, error)
}
type InboundManager interface {
NewService
Inbounds() []Inbound
Get(tag string) (Inbound, bool)
Remove(tag string) error
Create(ctx context.Context, router Router, logger log.ContextLogger, tag string, inboundType string, options any) error
}
type InboundContext struct {