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

HTTP transport: Use dest as Host if not set #4038

Merged
merged 2 commits into from
Nov 21, 2024
Merged

HTTP transport: Use dest as Host if not set #4038

merged 2 commits into from
Nov 21, 2024

Conversation

Fangliding
Copy link
Member

http类传输的一堆work around 类似之前的WS和httpupgrade
今天研究这个过CF的时候发现的 如果问能不能过的话 是的 这个传输稍作修改就能透传CF

@RPRX
Copy link
Member

RPRX commented Nov 20, 2024

所以假装是 grpc 就能过 cf 了吗

幸好我及时搞了 XHTTP 上下行分离和 stream-up,不然 SplitHTTP 就有点尴尬了,不过还有 header padding 和 xmux

话说昨天我看了一下,quic-go v0.47 好像还能 grpc over h3

@RPRX
Copy link
Member

RPRX commented Nov 20, 2024

所以假装是 grpc 就能过 cf 了吗

XHTTP 用 stream-up 模式然后 extra 里填 headers 是不是就行了

@Fangliding
Copy link
Member Author

应该是的 但是我没有测试 不过那样为什么不用websocket

@RPRX
Copy link
Member

RPRX commented Nov 20, 2024

XHTTP 用 stream-up 模式然后 extra 里填 headers 是不是就行了

如果是这样的话,我甚至想默认 stream-up 模式,默认加上 grpc 伪装,反正不影响 REALITY,其它场景先试试运气,不行再切

@RPRX
Copy link
Member

RPRX commented Nov 20, 2024

不过那样为什么不用websocket

会有 ALPN 问题,而且 cf 的 ECH 太明显,那个 sni 已经被俄罗斯封了

@Fangliding
Copy link
Member Author

这很明显是cf给grpc开的后门 改默认约等于盯着cf薅 没有任何其他地方有这个行为 最好是别乱改。。 想玩的自己改请求头就是了

@RPRX
Copy link
Member

RPRX commented Nov 20, 2024

出个新模式:stream-cf

这下又要被说滥用了

@RPRX
Copy link
Member

RPRX commented Nov 20, 2024

开玩笑的,其实我是觉得不止 cf 有这样的行为吧,任何场景都可以先试试运气,不行再切

@RPRX
Copy link
Member

RPRX commented Nov 21, 2024

话说,这样的话它和其它 HTTP 类传输逻辑就一致了吗,如果不一致,都改成一样比较好

@RPRX
Copy link
Member

RPRX commented Nov 21, 2024

算了,反正这个是 HTTP 传输层的,无所谓,先合了

@RPRX RPRX merged commit 0a252ac into main Nov 21, 2024
36 checks passed
@Fangliding
Copy link
Member Author

还有个细枝末节的在header里填host:xxxxx 就像当初ws改的那样 不过不是什么大问题

@RPRX RPRX deleted the HTTP-fix branch November 21, 2024 07:17
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.

2 participants