mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-07-02 17:58:46 +00:00
Handle ECH H2C query correctly
Co-Authored-By: j2rong4cn <36783515+j2rong4cn@users.noreply.github.com>
This commit is contained in:
@@ -234,6 +234,9 @@ func dnsQuery(server string, domain string, sockopt *internet.SocketConfig) ([]b
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, 0, err
|
return nil, 0, err
|
||||||
}
|
}
|
||||||
|
// h2c: in config is just for claim
|
||||||
|
// change scheme to https and expect outbound to handle TLS (freedom + tlsSetting)
|
||||||
|
req.URL.Scheme = "https"
|
||||||
req.Header.Set("Accept", "application/dns-message")
|
req.Header.Set("Accept", "application/dns-message")
|
||||||
req.Header.Set("Content-Type", "application/dns-message")
|
req.Header.Set("Content-Type", "application/dns-message")
|
||||||
utils.TryDefaultHeadersWith(req.Header, "fetch")
|
utils.TryDefaultHeadersWith(req.Header, "fetch")
|
||||||
|
|||||||
Reference in New Issue
Block a user