Skip to content

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

Closed

Description

@endokai

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
↑↑↑↑

Activity

  1. added a commit that references this issue on Mar 18, 2020
  2. added a commit that references this issue on May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址