diff --git a/app/proxyman/outbound/handler.go b/app/proxyman/outbound/handler.go index fe43c429f..4c3b16a12 100644 --- a/app/proxyman/outbound/handler.go +++ b/app/proxyman/outbound/handler.go @@ -122,8 +122,8 @@ func NewHandler(ctx context.Context, config *core.OutboundHandlerConfig) (outbou if config.Concurrency < 0 { h.mux = &mux.ClientManager{Enabled: false} } - if config.Concurrency == 0 { - config.Concurrency = 8 // same as before + if config.Concurrency >= 0 && config.Concurrency <= 128 { + config.Concurrency = 128 } if config.Concurrency > 0 { h.mux = &mux.ClientManager{ @@ -134,7 +134,7 @@ func NewHandler(ctx context.Context, config *core.OutboundHandlerConfig) (outbou Dialer: h, Strategy: mux.ClientStrategy{ MaxConcurrency: uint32(config.Concurrency), - MaxConnection: 128, + MaxConnection: 1024, }, }, }, @@ -155,7 +155,7 @@ func NewHandler(ctx context.Context, config *core.OutboundHandlerConfig) (outbou Dialer: h, Strategy: mux.ClientStrategy{ MaxConcurrency: uint32(config.XudpConcurrency), - MaxConnection: 128, + MaxConnection: 1024, }, }, },