From 8c4e998ca05b11ce5e919aeab53d4bf659a4f1c1 Mon Sep 17 00:00:00 2001 From: RPRX <63339210+RPRX@users.noreply.github.com> Date: Tue, 9 Sep 2025 14:06:33 +0000 Subject: [PATCH] Update inbound.go --- proxy/vless/inbound/inbound.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/proxy/vless/inbound/inbound.go b/proxy/vless/inbound/inbound.go index 48a8a828..4cec46a6 100644 --- a/proxy/vless/inbound/inbound.go +++ b/proxy/vless/inbound/inbound.go @@ -197,7 +197,9 @@ func (h *Handler) GetReverse(a *vless.MemoryAccount) (*Reverse, error) { if r == nil { picker, _ := reverse.NewStaticMuxPicker() r = &Reverse{tag: a.Reverse.Tag, picker: picker, client: &mux.ClientManager{Picker: picker}} - runtime.Gosched() // prevents this outbound from becoming the default outbound + for len(h.outboundHandlerManager.ListHandlers(h.ctx)) == 0 { + runtime.Gosched() // prevents this outbound from becoming the default outbound + } if err := h.outboundHandlerManager.AddHandler(h.ctx, r); err != nil { return nil, err } @@ -547,9 +549,8 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection s switch request.Command { case protocol.RequestCommandUDP: return errors.New(requestAddons.Flow + " doesn't support UDP").AtWarning() - case protocol.RequestCommandRvs: + case protocol.RequestCommandMux, protocol.RequestCommandRvs: inbound.CanSpliceCopy = 3 - case protocol.RequestCommandMux: fallthrough // we will break Mux connections that contain TCP requests case protocol.RequestCommandTCP: var t reflect.Type