refactor: Modular inbounds/outbounds

This commit is contained in:
世界
2024-11-02 00:39:02 +08:00
parent 3f143d6fc9
commit 6248abb6d4
151 changed files with 3115 additions and 2925 deletions

View File

@@ -4,7 +4,7 @@ import (
"encoding/binary"
"net"
"github.com/sagernet/sing-box/outbound"
"github.com/sagernet/sing-box/protocol/group"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/varbin"
)
@@ -47,7 +47,7 @@ func (s *CommandServer) handleSelectOutbound(conn net.Conn) error {
if !isLoaded {
return writeError(conn, E.New("selector not found: ", groupTag))
}
selector, isSelector := outboundGroup.(*outbound.Selector)
selector, isSelector := outboundGroup.(*group.Selector)
if !isSelector {
return writeError(conn, E.New("outbound is not a selector: ", groupTag))
}