Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XHTTP client: Enable XMUX for download in U-D-S #3965

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

RPRX
Copy link
Member

@RPRX RPRX commented Nov 3, 2024

XHTTP 上下行分离 #3955 时的 XMUX 并不对称,举个例子,若上下行均未填 XMUX,即均取以下默认值时:

{
  "maxConcurrency": "16-32",
  "maxConnections": 0,
  "cMaxReuseTimes": "64-128",
  "cMaxLifetimeMs": 0
}

上下行分别在 range 内 roll 出的确定值是独立、无关的,比如可能上行 maxConcurrency=16,下行 maxConcurrency=32

这样随着时间的推移,同一子连接的上下行会更容易被分到上行的第 N 号连接、下行的第 M 号连接,反分析效果更好

若以 maxConnections 为基础,则会加速随机,因为它是先开满连接数然后 rand 取用,而 maxConcurrency 是遍历数组

所以若以固定值的 maxConcurrency + cMaxReuseTimes + cMaxLifetimeMs 为基础,可能会导致上下行的 XMUX 对称

@RPRX RPRX merged commit e3276df into main Nov 3, 2024
36 checks passed
@LearZhou
Copy link

LearZhou commented Nov 4, 2024

請問,xmux object 應該寫在 xhttpSettings 下面一級呢,還是跟 xhttpSettings 平級?

問這個問題是因為,這個更新後的配置,在 downloadSettings 內的 xhttpSettings 配置的 xmux 寫在 xhttpSettings下級的話,客戶端會報錯。

而在 streamSettings 下面的 xmux 既可以寫在 xhttpSettings 裡面,也可以跟 xhttpSettings 平級,客戶端都不會報錯。

這就出現配置上的一些不一致了,有點讓人困惑。

@RPRX
Copy link
Member Author

RPRX commented Nov 4, 2024

@LearZhou 无论是 streamSettings 还是 downloadSettings,XMUX 始终都写在 xhttpSettings 内,此外写错位置没有报错机制

@LearZhou
Copy link

LearZhou commented Nov 4, 2024

多謝澄清!已根據指引排查錯誤。

@yuhan6665 yuhan6665 deleted the upload-download-splitting branch November 4, 2024 17:55
@sssagsag
Copy link

How do we know if xmux is working properly? Does the mux.cool work on stream-up and xhttp?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants