• 7 Posts
  • 100 Comments
Joined 2 years ago
cake
Cake day: June 1st, 2023

help-circle
  • So I am not entirely sure. I did find the code for it however if you want to take a look.

    In Firefox it uses the variable for the neqo library, which is the the Mozilla Firefox implementation of QUIC in Rust.

    Line #284: https://github.com/mozilla-firefox/firefox/blob/57e6d88cb3ad7f9777145f2d4fba11d4fc9de369/netwerk/socket/neqo_glue/src/lib.rs#L284

    code:

    let mut params = ConnectionParameters::default()
        .versions(quic_version, version_list)
        .cc_algorithm(cc_algorithm)
        .max_data(max_data)
        .max_stream_data(StreamType::BiDi, false, max_stream_data)
        .grease(static_prefs::pref!("security.tls.grease_http3_enable"))
        .sni_slicing(static_prefs::pref!("network.http.http3.sni-slicing"))
        .idle_timeout(Duration::from_secs(idle_timeout.into()))
        // Disabled on OpenBSD. See <https://bugzilla.mozilla.org/show_bug.cgi?id=1952304>.
        .pmtud_iface_mtu(cfg!(not(target_os = "openbsd")))
        // MLKEM support is configured further below. By default, disable it.
        .mlkem(false);
    

    In the neqo library it’s used here: https://github.com/mozilla/neqo/blob/9e52e922343609dba5171c0adb869cff7bd8d3a0/neqo-transport/src/crypto.rs#L1594

    code:

    let written = if sni_slicing && offset == 0 {
        if let Some(sni) = find_sni(data) {
            // Cut the crypto data in two at the midpoint of the SNI and swap the chunks.
            let mid = sni.start + (sni.end - sni.start) / 2;
            let (left, right) = data.split_at(mid);
    
            // Truncate the chunks so we can fit them into roughly evenly-filled packets.
            let packets_needed = data.len().div_ceil(builder.limit());
            let limit = data.len() / packets_needed;
            let ((left_offset, left), (right_offset, right)) =
                limit_chunks((offset, left), (offset + mid as u64, right), limit);
            (
                write_chunk(right_offset, right, builder),
                write_chunk(left_offset, left, builder),
            )
        } else {
            // No SNI found, write the entire data.
            (write_chunk(offset, data, builder), None)
        }
    } else {
        // SNI slicing disabled or data not at offset 0, write the entire data.
        (write_chunk(offset, data, builder), None)
    };
    












  • Copied the images as well as the comment containing information.

    ConsciousFish6170: Idk why my description didn’t post. I put a raspberry pi 2 w inside a mostly gutted ps4 controller that wasn’t working anymore. Wanted to make the controller still look functional so I left the joy sticks but removed what I could to fit the pi. I have retro pi on it running nes, snes, ps1, gba, and n64 but n64 doesn’t seem to run great. I have two usb c mini adapters for the power supply and a USB hub. I was able to upload roms on a micro SD and put that into the USB hub to put roms on. I have only ever seen USB sticks and tried the micro SD because it was all I had. This is my first attempt at using raspberry pi and any kind of emulators.