Skip to content

XDRIVE transport: Support h3 (Chrome CH by default) and XMUX as well; Send Chrome HTTP headers (User-Agent, etc.) by default - #7187

Merged
RPRX merged 3 commits into
XTLS:mainfrom
4RH1T3CT0R7:feat/xdrive-xmux-h3
Oct 21, 2026
Merged

RPRX merged 3 commits into
XTLS:mainfrom
4RH1T3CT0R7:feat/xdrive-xmux-h3

Conversation

@4RH1T3CT0R7

@4RH1T3CT0R7 4RH1T3CT0R7 commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

as RPRX asked in #7181. xmux the way masque has it, maxConnections 4 on google drive over h2 and 1 otherwise by default: a session takes a connection of xmux and moves to another after hMaxRequestTimes or hMaxReusableSecs, and the old one closes once its requests end. and h3 with alpn ["h3"] like DoH: quicParams and udp masks from finalmask, chrome parrot, bbr by default like xhttp, no fallback to h2 for now, with google-drive only noise among the udp masks

from a VPS to googleapis with 150 ms added, 32 parallel 4 MiB puts: google gives an h2 connection 1 MiB of window, so on one connection they make 3.4 MiB/s, spread over 4 connections 9-11, and one h3 connection makes 16.5, so h3 takes one by default

Comment thread infra/conf/transport_internet.go Resolved
@RPRX

RPRX commented Oct 17, 2026

Copy link
Copy Markdown
Member

感觉这个 PR 最好配合 #7135 ,虽然我不确定 TSPU 会不会针对 Google IP 也限制旧版 Chrome 指纹的连接数

所以 h3 时默认 maxConnections 是 1?

@4RH1T3CT0R7

Copy link
Copy Markdown
Contributor Author

@RPRX rebased. it was 4 with h3 as well, now h3 takes 1 by default and the 4 stays for h2, one h3 connection made 16.5 MiB/s where four on h2 made 9-11. xdrive takes the chrome fingerprint by default, so #7135 moves it to chrome 155 with nothing to change here

@RPRX

RPRX commented Oct 18, 2026

Copy link
Copy Markdown
Member

UA 目前是什么情况

@RPRX

RPRX commented Oct 18, 2026

Copy link
Copy Markdown
Member

另外你的下一个 PR 会是 #7170 (comment) 吗,保留 @Ahmad-2213 的 commits、author 等信息就行

@Ahmad-2213

Ahmad-2213 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Greetings; I'm glad you find it useful.not to mention that later in commits I addressed some issues until there were no bugs left according to claude; i suggest seeing the whole xdrive folder or last commit for the final version
Also, since the work was done by AI & @4RH1T3CT0R7 might need to rebase/modify the code in-order to preserve compatibility, I'm totally fine if he'd take the ownership & authority; In fact, the importance of this matter is to enhance xdrive for ordinary usage & Thanks to @RPRX it's taking reality suit.

@4RH1T3CT0R7

Copy link
Copy Markdown
Contributor Author

@RPRX none was set, so after a hello of chrome google got Go-http-client/2.0 over h2 and quic-go HTTP/3 over h3. added a commit: xdrive now takes the headers that xhttp and doh take, chrome's by default, and a template can set its own User-Agent in headers or one of chrome, firefox, safari, edge, curl, golang

yes, after this one. his main has about 70 xdrive commits on a base from before #7181, and @Ahmad-2213 says to take the final version of the folder, so I'll bring that onto main with him as co-author on the commits, without mux resume, which is a separate thing

@RPRX

RPRX commented Oct 18, 2026

Copy link
Copy Markdown
Member

@4RH1T3CT0R7 那你先准备一下吧,明天会合并这两个 PR,不冲突的话现在就能开新的,对了你是能实测 Google Drive 了吧

@4RH1T3CT0R7

Copy link
Copy Markdown
Contributor Author

ok, I'll prepare it on top of these two. yes, I test on a drive account of my own, the numbers in this pr are from it

@RPRX RPRX changed the title XDRIVE transport: Support XMUX ("maxConnections": 4 on Google Drive by default) and h3 XDRIVE transport: Support h3 (Chrome CH by default) and XMUX as well; Send Chrome HTTP headers (User-Agent, etc.) by default Oct 21, 2026
@RPRX

RPRX commented Oct 21, 2026

Copy link
Copy Markdown
Member

关于 XDRIVE 的 XMUX:h3 默认 maxConnections 1,h2 在 Google Drive 上暂时默认为 4,等 TSPU/NIN 针对它了再做调整

对 www.google.com 的连接数多点其实也还好,Golang h2 栈特征问题更大些,另外还有网盘响应的相关特征不太好处理

同样支持 XMUX 的 XHTTP、MASQUE 用的是 x/net #6797 (comment) ,XDRIVE 直接用的 Go HTTP,实际连接数暂时可能更多

@RPRX
RPRX merged commit fc5ba8e into XTLS:main Oct 21, 2026
40 checks passed
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