feat: add XHTTP H3 and packet-up support#2649
Conversation
|
I confirm that XHTTP works correctly in stream-one mode. The issue with the endlessly increasing memory usage has also been fixed |
|
While testing last night, the node was always inside a load-balancing group, so I didn’t notice that one of the nodes kept reporting a StreamDown error. I tested again with the v26.03 test build and found that it worked fine. After taking a closer look, it turned out there was a deadlock issue (which has now been fixed). |
|
I think this pull request won’t get merged without rebasing onto the current alpha build and incorporating the changes that wwqgtxx has made over the past day. There are too many modifications to the existing code responsible for the core XHTTP support. The right approach would be to rework the code using the existing base implementation, and split each new feature into separate PRs — xmux separately, h3 support separately, packet‑up mode separately, and so on. |
I’m aware that this PR introduces quite a large set of changes. For now it mainly serves as an experimental implementation and a place for testing. If the approach proves workable, I’m open to rebasing it onto the current alpha branch and splitting the functionality into smaller PRs (xmux, H3 support, packet-up mode, etc.) so it’s easier to review and potentially merge. And if upstream ends up implementing similar functionality directly, I’m also happy to learn from that implementation and adjust accordingly. |
336bd7c to
5cbe38a
Compare
This reverts commit 336bd7c.
|
xhttp-H3 还有戏吗? |
应该已经支持了? |
|
重新Vibe了个, 也许可以试试 配置文件 proxies:
- name: test
alpn: ["h3", "h2", "http/1.1"]
xhttp-opts:
host: HOST
path: PATH
mode: packet-up
try-quic: truemihomo-linux-amd64.zip |


This PR adds HTTP/3 and packet-up support for XHTTP.
The motivation comes from my deployment scenario where nodes run a mixed HTTP/3 + HTTP/2 setup behind a CDN. Supporting this configuration in Mihomo would be very helpful for such environments.
I have tested the implementation locally with:
All scenarios worked as expected.
During this process, I also cleaned up some earlier experimental code I wrote yesterday which caused
vless_testto fail.Although I carefully reviewed and adjusted the code generated with the help of generative AI, there may still be defects or improvements to be made. I would greatly appreciate any feedback or suggestions.