■ ■ ■ ■ ■ ■
transport/v2rayhttp/client.go
| skipped 110 lines |
111 | 111 | | request = request.WithContext(ctx) |
112 | 112 | | switch hostLen := len(c.host); hostLen { |
113 | 113 | | case 0: |
| 114 | + | request.Host = c.serverAddr.AddrString() |
114 | 115 | | case 1: |
115 | 116 | | request.Host = c.host[0] |
116 | 117 | | default: |
| skipped 27 lines |
144 | 145 | | request = request.WithContext(ctx) |
145 | 146 | | switch hostLen := len(c.host); hostLen { |
146 | 147 | | case 0: |
| 148 | + | // https://github.com/v2fly/v2ray-core/blob/master/transport/internet/http/config.go#L13 |
| 149 | + | request.Host = "www.example.com" |
147 | 150 | | case 1: |
148 | 151 | | request.Host = c.host[0] |
149 | 152 | | default: |
| skipped 18 lines |