Compare commits

..
3 Commits
Author SHA1 Message Date
2e4c13d8c4 Inbound: Close and remove the handler when it fails to start (#7223)
https://github.com/XTLS/Xray-core/pull/7223#pullrequestreview-5722817769

---------

Co-authored-by: 风扇滑翔翼 <Fangliding.fshxy@outlook.com>
2026-11-06 17:57:42 +00:00
RPRX bb335c6b0c VLESS Multiplex (mux.cool): Increase default maxConcurrency to 128, maxReuseTimes to 1024, mainly for XDRIVE, XDNS, XMC, XICMP
https://github.com/XTLS/Xray-core/pull/4231#issuecomment-6679992732
https://github.com/XTLS/Xray-core/issues/7208#issuecomment-6677620667
https://github.com/XTLS/Xray-core/pull/6748#issuecomment-5752780799
https://github.com/XTLS/Xray-core/pull/5581#issuecomment-3798801188
https://github.com/XTLS/Xray-core/pull/5872#issuecomment-4162202731
https://github.com/XTLS/Xray-core/pull/6487#issuecomment-5092235757
2026-11-06 08:43:07 +00:00
043d2e47fc XDRIVE transport: A bunch of optimizations for the Google Drive backend (#7340)
https://github.com/XTLS/Xray-core/pull/7217#issuecomment-6489554617
https://github.com/XTLS/Xray-core/issues/7208#issuecomment-6490366098
https://github.com/XTLS/Xray-core/issues/7208#issuecomment-6558792002
https://github.com/XTLS/Xray-core/issues/7208#issuecomment-6583177537
https://github.com/XTLS/Xray-core/issues/7208#issuecomment-6634955793
https://github.com/XTLS/Xray-core/issues/7208#issuecomment-6677620667

Syncs with https://github.com/anonymously-hidden/Xray-core/commit/f7a8d213ac69410c23b4484d6eeea8dc55b580bd

---------

Co-authored-by: anonymously-hidden <106820058+anonymously-hidden@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 05:50:58 +00:00
2 changed files with 15 additions and 5 deletions
+11 -1
View File
@@ -51,7 +51,17 @@ func (m *Manager) AddHandler(ctx context.Context, handler inbound.Handler) error
}
if m.running {
return handler.Start()
if err := handler.Start(); err != nil {
if len(tag) > 0 {
delete(m.taggedHandlers, tag)
} else {
m.untaggedHandlers = m.untaggedHandlers[:len(m.untaggedHandlers)-1]
}
if err := handler.Close(); err != nil {
errors.LogWarningInner(ctx, err, "failed to close handler ", tag)
}
return err
}
}
return nil
+4 -4
View File
@@ -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,
},
},
},