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

在使用ip=参数下,h2传输协议未正确传输http host #520

Closed
endokai opened this issue Mar 17, 2020 · 0 comments
Closed

在使用ip=参数下,h2传输协议未正确传输http host #520

endokai opened this issue Mar 17, 2020 · 0 comments

Comments

@endokai
Copy link

endokai commented Mar 17, 2020

gost版本:gost 2.11.0 (go1.14 windows/amd64)

在wss/mwss下,-L wss://后的地址和端口部分会应用到SNI、HTTP Host里面,然后同时指定ip=参数可以实现多IP和端口负载均衡而且同时会用wss://后的域名发送SNI、HTTP Host

但在传输协议h2下,如ss+h2://example.com:443,如果不指定ip=参数,是没问题的,SNI和HTTP Host都是example.com。但如果指定了ip=,则会只发送SNI,HTTP Host就变成了ip 1.1.1.1而不是域名了

简略:
-L ss+wss://example.com:443?ip=1.1.1.1:443,1.0.0.1:443 则SNI=example.com HTTP_Host=example.com
-L ss+h2://example:443?ip=1.1.1.1:443,1.0.0.1:443 则SNI=example.com,HTTP Host=1.1.1.1或1.0.0.1

log:
gost -L socks5://:1080 -F socks5+h2://example.com:443?ip=1.1.1.1:443 -D
2020/03/17 22:09:23 route.go:645: socks5://:1080 on [::]:1080
2020/03/17 22:09:30 socks.go:126: [socks5] 5 1 [0]
2020/03/17 22:09:30 socks.go:151: [socks5] 5 0
2020/03/17 22:09:30 socks.go:860: [socks5] 127.0.0.1:15927 -> 127.0.0.1:1080
5 1 0 3 ip.sb:443
2020/03/17 22:09:30 socks.go:888: [socks5] 127.0.0.1:15927 -> socks5://:1080 -> ip.sb:443
2020/03/17 22:09:30 socks.go:940: [route] 127.0.0.1:15927 -> socks5://:1080 -> 1@socks5+h2://1.1.1.1:443 -> ip.sb:443
2020/03/17 22:09:30 http2.go:275: [http2] CONNECT / HTTP/2.0
Host: 1.1.1.1:443
↑↑↑↑

ginuerzh added a commit that referenced this issue Mar 18, 2020
@endokai endokai closed this as completed Apr 3, 2020
ginuerzh added a commit that referenced this issue May 23, 2020
hktalent pushed a commit to hktalent/gost that referenced this issue Oct 23, 2022
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

No branches or pull requests

1 participant