XHTTP transport: Fix "auto" mode with REALITY#5638
Conversation
|
你可以解释一下为什么解析auto的逻辑就在下面几行你还要在上面重新再写一遍吗 |
|
这个 PR 修复了 REALITY + XHTTP 的 auto 场景,但现在 sessionId 的生成逻辑依赖 streamSettings.SecurityType,会引入新的回归:
建议:先解析最终 mode,再决定是否生成 sessionId(mode==stream-one 才不生成),或至少使用 realityConfig != nil + downloadSettings 来判断,而不是 SecurityType。 |
|
。。。 |
我建议把 sessionId 的生成逻辑改为 基于“最终解析后的 mode”,而不是基于 SecurityType。 建议修改(核心思路):
示意代码(仅示意): 这样可以同时修复:
|
0376ced to
575c910
Compare
|
Thanks a lot for your suggestions and help. I updated the commit. Tested your approach on different configurations of XHTTP and XHTTP+REALITY (haven't tested other options like TLS). Works correctly. |
|
把 #5634 也放这里头吧 |
|
Done. |
Fix for issue #5635
Cause
The cause is described in detail in the above issue.
Fix
I rewrote the logic that defines when a session ID should be added to the request based on the XHTTP mode and security settings.