mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-14 08:08:40 +00:00
Add quic fingerprints and preset configs
This commit is contained in:
parent
0b7a5086a2
commit
091725fd5d
3 changed files with 63 additions and 3 deletions
|
@ -120,6 +120,15 @@ func getHTTPClient(ctx context.Context, dest net.Destination, streamSettings *in
|
|||
},
|
||||
}
|
||||
transport = roundTripper
|
||||
|
||||
if fingerprint := tls.GetQuicFingerprint(tlsConfigs.Fingerprint); fingerprint != nil {
|
||||
quicSpec, err := quic.QUICID2Spec(*fingerprint)
|
||||
if err != nil {
|
||||
errors.LogError(ctx, "unknown fingerprint: ", tlsConfigs.Fingerprint)
|
||||
} else {
|
||||
transport = http3.GetURoundTripper(roundTripper, &quicSpec, nil)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
transportH2 := &http2.Transport{
|
||||
DialTLSContext: func(hctx context.Context, string, addr string, tlsConfig *gotls.Config) (net.Conn, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue