Thanks for you contribution! I have got a look at the code and has the following observations:
Speed
As I understood, when using QUIC for improved transfer throughput, it is often necessary to patch the library and rewrite some part of the library, as the original developer might not be as invested with high packet loss network environment. There is an open issue about it: Transfer rate / congestion control issues Ā· Issue #1372 Ā· quinn-rs/quinn Ā· GitHub In golang space, the quic library also have a similar issue: implement BBRv3 Ā· Issue #4565 Ā· quic-go/quic-go Ā· GitHub Overall, while using UDP based transfer protocol does give engineers more control over the exact protocol details than TCP, how well this potential is realized still depends on execution.
As for UDP itself, which QUIC is based on, can receive higher restriction than UDP. Letās say in some (small) carrier (in at least China) may throttle it to make as slow as only dns, and ntp would work. This is also the reason why GitHub - wangyu-/udp2raw: A Tunnel which Turns UDP Traffic into Encrypted UDP/FakeTCP/ICMP Traffic by using Raw Socket,helps you Bypass UDP FireWalls(or Unstable UDP Environment) exists.
Overall speed wise, a QUIC based protocol can works better than TCP, but it does requires some engineering effort to make it so. It is really important to be prepared for such effort.
Censorship Resistant
Quicās encryption design works very similar to TLS. As a result, it can be fingerprinted in the same way, as well as get SNI extracted. So in general it would work as well as any tls based proxies.
Implementation Details
There are 2 details worth pointing out:
The first is about certificate, an active attacker could detect if an self-signed certificate is used in a QUIC configuration, so it is important to use an WebPKI certificate or at least pin the certificate. It is worth doing so early to make sure these options are supported by the library.
The second is about Rust. I am not am expert on Rust, however I think that is good choice overall since we are, in longer term, considering to move to a rust based pluggable transport system. That being said, we donāt have an existing Rust Pluggabe Transport pipeline yet, so it could take sometime before any rust based pluggable transport can be bundled in the mobile version of the tor browser. This is super true as Torās shippable mobile app is reaching its limit, bundling additional binary would incur engineering effort from other teams, which can be really slow, (in the worst case at the scale of years).