Repository navigation
refactor(utls): modularize stream.rs into focused stream/ submodules (#108) - #140
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses Issue #108 (Part 2) by modularizing the monolithic
crates/yip-utls/src/stream.rs(~3,450 lines) into a focused module directorycrates/yip-utls/src/stream/:record.rs: Record-layer codecs,record_header,find_finished_end, and record constants (CONTENT_TYPE_*,RECORD_HEADER_LEN,LEGACY_RECORD_VERSION*,MAX_*).cert.rs: Certificate chain parsing, leaf extraction, and SPKI public key extraction (CertFlightInfo,scan_cert_flight,certificate_chain_ders,spki_sec1_pubkey_from_der).sig.rs: Signature verification,sign_certificate_verify, andverify_reality_binding.flight.rs: Flight shape scanning, greedy record framing, and synthetic server flight emission (FlightShapeScan,scan_flight_shape,ServerFlight,emit_server_flight).mod.rs: Async I/O stream orchestration (connect,serve,capture_dest_flight,RealityStream), RNG adapters, and re-exports.tests.rs: Mock server test fixtures, loopback end-to-end handshakes, and verification tests.Invariants & Compatibility
yip_utls::connect,yip_utls::capture_dest_flight,yip_utls::RealityStream,yip_utls::stream::serve,yip_utls::stream::scan_flight_shape,yip_utls::stream::emit_server_flight,yip_utls::stream::sign_certificate_verify,FlightShapeScan,ServerFlight) retain identical paths and signatures.#![forbid(unsafe_code)]with zerounsafeblocks.Verification
cargo test --all: All 351 unit tests and 42 integration/netns tests pass.cargo clippy --all-targets -- -D warnings: 0 warnings across workspace.cargo fmt --check: Clean formatting.cargo deny check: Advisories, bans, licenses, and sources all OK.