telemt/src/protocol
David Osipov e4a50f9286
feat(tls): add boot time timestamp constant and validation for SNI hostnames
- Introduced `BOOT_TIME_MAX_SECS` constant to define the maximum accepted boot-time timestamp.
- Updated `validate_tls_handshake_at_time` to utilize the new boot time constant for timestamp validation.
- Enhanced `extract_sni_from_client_hello` to validate SNI hostnames against specified criteria, rejecting invalid hostnames.
- Added tests to ensure proper handling of boot time timestamps and SNI validation.

feat(handshake): improve user secret decoding and ALPN enforcement

- Refactored user secret decoding to provide better error handling and logging for invalid secrets.
- Added tests for concurrent identical handshakes to ensure replay protection works as expected.
- Implemented ALPN enforcement in handshake processing, rejecting unsupported protocols and allowing valid ones.

fix(masking): implement timeout handling for masking operations

- Added timeout handling for writing proxy headers and consuming client data in masking.
- Adjusted timeout durations for testing to ensure faster feedback during unit tests.
- Introduced tests to verify behavior when masking is disabled and when proxy header writes exceed the timeout.

test(masking): add tests for slowloris connections and proxy header timeouts

- Created tests to validate that slowloris connections are closed by consume timeout when masking is disabled.
- Added a test for proxy header write timeout to ensure it returns false when the write operation does not complete.
2026-03-16 21:37:59 +04:00
..
constants.rs fix: resolve clippy warnings 2026-02-24 05:57:53 +03:00
frame.rs fix: resolve clippy warnings 2026-02-24 05:57:53 +03:00
mod.rs fix: eliminate all compiler warnings 2026-02-24 03:40:59 +03:00
obfuscation.rs fix: eliminate all compiler warnings 2026-02-24 03:40:59 +03:00
tls.rs feat(tls): add boot time timestamp constant and validation for SNI hostnames 2026-03-16 21:37:59 +04:00
tls_security_tests.rs feat(tls): add boot time timestamp constant and validation for SNI hostnames 2026-03-16 21:37:59 +04:00