refactor: enhance Mux connection handling in server #11590
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it?
改进 HTTPS Mux 模式的运行逻辑
仅对http流量去匹配http mux服务,对于其他非http/https流量直接关闭,减少如果被扫的情况下浪费的。链接资源
http跳转服务尽可能检查来源是否来自于真人, 通过后进行 307 后立刻关闭链接,避免浏览器 keep-alive, 或者扫描器占用资源 (虽然开销很低)
修复 mux 模式下 为了包装 cmux 的 tls 链接导致 h2 失效的问题
Summary of your change
Please indicate you've done the following: