feat: implement TTFB measurement as default#9
feat: implement TTFB measurement as default#9navidmafi wants to merge 2 commits intonoql-net:mainfrom
Conversation
|
Previously H2 connections were being treated as http/1.1 resulting in false positives. The results make much more sense now. Please review carefully, especially the assumptions made about a "successful handshake". |
|
Given today's relief on the IRGFW and after some testing, the results make sense and more importantly, found to be representative of real-world TLS usage. |
|
Hi, thanks for the PR. A concern I have:
|
|
Thank you for reviewing this PR. The changes do alter the current behavior intentionally, as I explained in my first comment regarding passive blocking. I strongly believe this should become the new behavior. Regarding the second point, could you please clarify what the expected outcome should be? The current struct already exposes timings, so I’m not sure what else might be missing. |
|
Ok. |
|
Sorry for responding this late. To be honest, I've been seeing the "passive blocking" behavior again and decided to check back on this. I believe that we already separate TLS and TTFP with two distinct columns. I have not conditionally "bound" a successful TLS handshake to TTFB. It's up to the user to interpret whether a sequence of "successful TLS handshake and then unconditional timeout" is passive blocking or not. Can you please check again? |
Following the Iran-Israel war in June 2025, some implementations of the GFW (namely the IRGFW) have shifted TLS fingerprinting and sabotage to a more "passive" state.
Specifically, the TCP handshake and TLS ClientHello typically proceed without interruption — the server completes the handshake and even returns the ServerHello and related messages successfully. However, once the TLS session is established, any client-initiated PSH segment containing application data (e.g., an
HTTP GET /) triggers silent packet drops and retransmissions, eventually leading to a timeout on anyreadoperation on the socket.This PR introduces a lightweight, and perhaps naive verification mechanism that issues a minimal HTTP GET / request over the established TLS channel and attempts to read a single response byte. If the connection remains usable (if a reply is received, be it a 200, 404, etc. ) then we assume passive blocking is not taking place. Otherwise, the observed behavior (no ACKs, repeated retransmissions) indicates that application data is being suppressed post-handshake, consistent with what we've seen recently.
Feedback is welcome.