Projects STRLCPY sing-box Commits 4999441a
🤬
  • Fix missing default host in v2ray http transport`s request

  • Loading...
  • 世界 committed 1 year ago
    4999441a
    1 parent 09b001e7
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    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
Please wait...
Page is in error, reload to recover