bogdanfinn / tls-client

net/http.Client like HTTP Client with options to select specific client TLS Fingerprints to use for requests.
BSD 4-Clause "Original" or "Old" License
668 stars 133 forks source link

[Feature Request]: HTTP/3 (QUIC) Support #104

Open sjid6ewh opened 4 months ago

sjid6ewh commented 4 months ago

Describe the feature / enhancement and how it would improve things

QUIC is a next generation protocol based on UDP mainly for http3. Major web browsers such as Chrome, Safari, and Firefox already support HTTP/3 (QUIC). On the server side, Google, Cloudflare, etc. are already using http3, and the number of servers that support it is increasing. The proportion of http3 traffic to total http traffic is also increasing. I think the purpose of developing the TLS client is to rewrite TLS information and send http(https) requests equivalent to web browsers and other http clients. However, if the TLS client does not support http 3, it will not be possible to reproduce http3 requests from web browsers, etc. It is expected that http3 traffic will continue to increase, so in the future the TLS client should support http3 in order to reproduce http3 requests.

Describe how your proposal will work, with code and/or pseudo-code

http3 and quic are complicated, so it will be difficult to implement them from scratch. I think it can be implemented relatively easily by partially modifying quic-go and incorporating it into the tls client. (quic-go is under the MIT License, so it is no problem to modify it and use it.) By replacing crypto/tls used in quic-go with utls, it will be able to change the tls information. I think it would be even better if quic-go added the ability to specify the order of request headers and the ability to set a proxy that supports UDP (QUIC) on the client.

DtyCv commented 4 months ago

@sjid6ewh A fork of quic-go that uses the extended version of the tls library and can be modified the tls fingerprint and the quic fingerprint has been published on gitlab. Therefore, there is no need to go through the hassle of replacing crypto/tls with utls. By using this fork of quic-go, it is very easy to implement HTTP3 QUIC on the tls client.