Merge tag 'v1.14.3'

This commit is contained in:
Shtorm
2026-10-19 01:05:55 +03:00
321 changed files with 6750 additions and 5105 deletions
+6 -8
View File
@@ -13,7 +13,6 @@ import (
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/logger"
N "github.com/sagernet/sing/common/network"
@@ -89,24 +88,23 @@ func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLo
return inbound, nil
}
func (n *Inbound) Start(stage adapter.StartStage) error {
func (n *Inbound) Start(stage adapter.StartStage, scope *adapter.Scope) error {
if stage != adapter.StartStateStart {
return nil
}
scope.Add(func() error {
n.proxy.Shutdown()
return nil
})
listener, err := n.listener.ListenTCP()
if err != nil {
return err
}
scope.Add(n.listener.Close)
go n.proxy.Serve(listener)
return nil
}
func (n *Inbound) Close() error {
err := common.Close(&n.listener)
n.proxy.Shutdown()
return err
}
func (h *Inbound) UpdateUsers(users []option.MTProxyUser) {
secrets := make(map[string]mtglib.Secret, len(users))
for _, user := range users {