{"id":13474882,"url":"https://github.com/mozilla/neqo","last_synced_at":"2025-05-14T06:11:48.130Z","repository":{"id":37270626,"uuid":"171342221","full_name":"mozilla/neqo","owner":"mozilla","description":"Neqo, the Mozilla Firefox implementation of QUIC in Rust","archived":false,"fork":false,"pushed_at":"2025-05-12T14:41:16.000Z","size":9484,"stargazers_count":1957,"open_issues_count":126,"forks_count":131,"subscribers_count":35,"default_branch":"main","last_synced_at":"2025-05-12T14:42:27.706Z","etag":null,"topics":["firefox","http3","ietf","mozilla","quic","rust"],"latest_commit_sha":null,"homepage":"https://firefox-source-docs.mozilla.org/networking/http/http3.html","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mozilla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-02-18T19:20:20.000Z","updated_at":"2025-05-12T13:16:48.000Z","dependencies_parsed_at":"2023-11-20T16:28:42.903Z","dependency_job_id":"fc449d5f-e783-411a-a2d3-79cf2256de79","html_url":"https://github.com/mozilla/neqo","commit_stats":{"total_commits":2581,"total_committers":47,"mean_commits":54.91489361702128,"dds":0.717551336691205,"last_synced_commit":"922d266bba926532982ee3fa91574ae131d55248"},"previous_names":[],"tags_count":97,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fneqo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fneqo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fneqo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fneqo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mozilla","download_url":"https://codeload.github.com/mozilla/neqo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253795162,"owners_count":21965488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firefox","http3","ietf","mozilla","quic","rust"],"created_at":"2024-07-31T16:01:15.655Z","updated_at":"2025-05-14T06:11:48.062Z","avatar_url":"https://github.com/mozilla.png","language":"Rust","readme":"# Neqo, an Implementation of QUIC in Rust\n\n![neqo logo](https://github.com/mozilla/neqo/raw/main/neqo.png \"neqo logo\")\n\nTo build Neqo:\n\n```shell\ncargo build\n```\n\nThis will use a system-installed [NSS][NSS] library if it is new enough. (See \"Build with Separate NSS/NSPR\" below if NSS is not installed or it is deemed too old.)\n\nTo run test HTTP/3 programs (`neqo-client` and `neqo-server`):\n\n```shell\n./target/debug/neqo-server '[::]:12345'\n./target/debug/neqo-client 'https://[::]:12345/'\n```\n\n## Build with separate NSS/NSPR\n\nYou can clone [NSS][NSS] and [NSPR][NSPR] into the same directory and export an\nenvironment variable called `NSS_DIR` pointing to NSS.  This causes the build to\nuse the existing NSS checkout.  However, in order to run anything that depends\non NSS, you need to set an environment as follows:\n\n### Linux\n\n```shell\nexport LD_LIBRARY_PATH=\"$(find . -name libssl3.so -print | head -1 | xargs dirname | xargs realpath)\"\n```\n\n### macOS\n\n```shell\nexport DYLD_LIBRARY_PATH=\"$(find . -name libssl3.dylib -print | head -1 | xargs dirname | xargs realpath)\"\n```\n\nNote: If you did not already compile NSS separately, you need to have\n[Mercurial (hg)][HG], installed. NSS builds require [GYP][GYP] and\n[Ninja][NINJA] to be installed.\n\n## Debugging Neqo\n\n### QUIC logging\n\nEnable generation of [QLOG][QLOG] logs with:\n\n```shell\ntarget/debug/neqo-server '[::]:12345' --qlog-dir .\ntarget/debug/neqo-client 'https://[::]:12345/' --qlog-dir .\n```\n\nYou can of course specify a different directory for the QLOG files.\nYou can upload QLOG files to [qvis][QVIS] to visualize the flows.\n\nTo export QLOG files for [Neqo Simulator](./test-fixture/src/sim) runs, set the\nenvironment variable `QLOGDIR`. For example:\n\n```shell\nQLOGDIR=/tmp/qlog cargo bench --profile=dev --bench min_bandwidth --features bench\n```\n\n### Using `SSLKEYLOGFILE` to decrypt Wireshark logs\n\nYou can export TLS keys by setting the `SSLKEYLOGFILE` environment variable\nto a filename to instruct NSS to dump keys in the\n[standard format](https://datatracker.ietf.org/doc/draft-ietf-tls-keylogfile/)\nto enable decryption by [Wireshark](https://wiki.wireshark.org/TLS) and other tools.\n\n### Using RUST_LOG effectively\n\nAs documented in the [env_logger documentation](https://docs.rs/env_logger/),\nthe `RUST_LOG` environment variable can be used to selectively enable log messages\nfrom Rust code. This works for Neqo's command line tools, as well as for when Neqo is\nincorporated into Gecko, although [Gecko needs to be built in debug mode](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Configuring_Build_Options).\n\nSome examples:\n\n1. ```shell\n   RUST_LOG=neqo_transport::dump ./mach run\n   ```\n\n   lists sent and received QUIC packets and their frames' contents only.\n\n1. ```shell\n   RUST_LOG=neqo_transport=debug,neqo_http3=trace,info ./mach run\n   ```\n\n   sets a `debug` log level for `transport`, `trace` level for `http3`, and `info` log\n   level for all other Rust crates, both Neqo and others used by Gecko.\n\n1. ```shell\n   RUST_LOG=neqo=trace,error ./mach run\n   ```\n\n   sets `trace` level for all modules starting with `neqo`, and sets `error` as minimum log level for other unrelated Rust log messages.\n\n### Trying in-development Neqo code in Gecko\n\nIn a checked-out copy of Gecko source, set `[patches.*]` values for the four\nNeqo crates to local versions in the root `Cargo.toml`. For example, if Neqo\nwas checked out to `/home/alice/git/neqo`, add the following lines to the root\n`Cargo.toml`.\n\n```toml\n[patch.\"https://github.com/mozilla/neqo\"]\nneqo-bin = { path = \"/home/alice/git/neqo/neqo-bin\" }\nneqo-common = { path = \"/home/alice/git/neqo/neqo-common\" }\nneqo-crypto = { path = \"/home/alice/git/neqo/neqo-crypto\" }\nneqo-http3 = { path = \"/home/alice/git/neqo/neqo-http3\" }\nneqo-qpack = { path = \"/home/alice/git/neqo/neqo-qpack\" }\nneqo-transport = { path = \"/home/alice/git/neqo/neqo-transport\" }\nneqo-udp = { path = \"/home/alice/git/neqo/neqo-udp\" }\n```\n\nThen run the following:\n\n```shell\n./mach vendor rust\n```\n\nCompile Gecko as usual with\n\n```shell\n./mach build\n```\n\nNote: Using newer Neqo code with Gecko may also require changes (likely to `neqo_glue`) if\nsomething has changed.\n\n### Connect with Firefox to local neqo-server\n\n1. Run `neqo-server` via `cargo run --bin neqo-server -- 'localhost:12345' --db ./test-fixture/db`.\n2. On Firefox, set `about:config` preferences:\n  - `network.http.http3.alt-svc-mapping-for-testing` to `localhost;h3=\":12345\"`\n  - `network.http.http3.disable_when_third_party_roots_found` to `false`\n3. Optionally enable logging via `about:logging` or profiling via \u003chttps://profiler.firefox.com/\u003e.\n4. Navigate to \u003chttps://localhost:12345\u003e and accept self-signed certificate.\n\n[NSS]: https://hg.mozilla.org/projects/nss\n[NSPR]: https://hg.mozilla.org/projects/nspr\n[GYP]: https://github.com/nodejs/gyp-next\n[HG]: https://www.mercurial-scm.org/\n[NINJA]: https://ninja-build.org/\n[QLOG]: https://datatracker.ietf.org/doc/draft-ietf-quic-qlog-main-schema/\n[QVIS]: https://qvis.quictools.info/\n","funding_links":[],"categories":["Rust","Libraries","库 Libraries","rust","框架和开源实现","Implementations"],"sub_categories":["Network programming","网络编程 Network programming","Rust"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Fneqo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmozilla%2Fneqo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Fneqo/lists"}