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 -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 {