Перейти к файлу
Lars Eggert 67bd43bcd2
Add @mxinden to CODEOWNERS (#2025)
Discussed yesterday with @KershawChang. @martinthomson, are you OK with this? @mxinden is pretty actively reviewing, so it might unblock getting PRs merged when both of you are busy.

Signed-off-by: Lars Eggert <lars@eggert.org>
2024-07-31 12:29:36 +00:00
.github Add @mxinden to CODEOWNERS (#2025) 2024-07-31 12:29:36 +00:00
docs Fixed Build NSS command on Linux build document (#1217) 2021-09-07 14:20:45 +10:00
fuzz ci: Fix the fuzz targets (#1972) 2024-07-12 09:45:33 +00:00
hooks Clippy pedantic (#1649) 2024-02-14 11:33:12 +02:00
neqo-bin bench(bin): remove sample-size override (#2018) 2024-07-29 12:45:40 +00:00
neqo-common chore: Remove superfluous clippy allows (#1997) 2024-07-25 18:09:27 +03:00
neqo-crypto chore: Remove superfluous clippy allows (#1997) 2024-07-25 18:09:27 +03:00
neqo-http3 chore: Remove `test_` from test names (#2024) 2024-07-31 08:09:02 +00:00
neqo-qpack chore: Remove `test_` from test names (#2024) 2024-07-31 08:09:02 +00:00
neqo-transport feat(transport): Use a shorter ECN probe threshold initially (#1964) 2024-07-31 12:09:18 +00:00
neqo-udp chore: Remove superfluous clippy allows (#1997) 2024-07-25 18:09:27 +03:00
qns build(deps): bump martenseemann/quic-network-simulator-endpoint from `91b21d4` to `5114afe` in /qns (#2013) 2024-07-29 09:20:59 +00:00
taskcluster build(deps): bump alpine in /taskcluster/docker/linux (#2012) 2024-07-29 15:54:05 +03:00
test feat: DPLPMTUD (#1903) 2024-07-10 14:50:32 +00:00
test-fixture chore: Remove superfluous clippy allows (#1997) 2024-07-25 18:09:27 +03:00
.clippy.toml chore: Declutter, `clippy.toml` -> `.clippy.toml` (#1654) 2024-02-14 12:00:48 +02:00
.codecov.yml test: Experiment with `cargo fuzz` (#1764) 2024-04-18 11:51:25 +03:00
.dockerignore chore: Fix various QNS issues (#1799) 2024-04-09 08:49:51 +03:00
.gitattributes Add EOL rules 2019-03-08 11:39:51 +11:00
.gitignore chore: Add some things, remove some things (#1746) 2024-03-15 03:23:12 +00:00
.pre-commit-config.yaml fix: Disable pylint pre-commit check (#1958) 2024-07-03 18:42:46 +03:00
.rustfmt.toml fix(.rustfmt.toml): specify Rust edition 2021 (#1722) 2024-03-08 08:08:47 +00:00
.taskcluster.yml.disabled ci: Disable taskcluster again (#1949) 2024-07-02 10:12:37 +03:00
CODE_OF_CONDUCT.md Fix typo in the code of conduct file 2019-03-30 18:21:00 +01:00
Cargo.toml deps(quinn-udp): enable `direct-log` feature to log via `log` (#2004) 2024-07-23 17:41:44 +00:00
LICENSE-APACHE License as dual Apache2/MIT 2019-04-02 16:16:19 -07:00
LICENSE-MIT License as dual Apache2/MIT 2019-04-02 16:16:19 -07:00
README.md build: Use system NSS when possible (#1739) 2024-03-27 07:52:23 +00:00
SECURITY.md Create a security policy (#1573) 2024-01-25 09:43:49 +11:00
neqo.png Add logos 2019-08-20 14:58:29 +10:00
neqo.svg Add logos 2019-08-20 14:58:29 +10:00

README.md

Neqo, an Implementation of QUIC in Rust

neqo logo

To build Neqo:

cargo build

This will use a system-installed 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.)

To run test HTTP/3 programs (neqo-client and neqo-server):

./target/debug/neqo-server '[::]:12345'
./target/debug/neqo-client 'https://[::]:12345/'

Build with separate NSS/NSPR

You can clone NSS and NSPR into the same directory and export an environment variable called NSS_DIR pointing to NSS. This causes the build to use the existing NSS checkout. However, in order to run anything that depends on NSS, you need to set an environment as follows:

Linux

export LD_LIBRARY_PATH="$(dirname "$(find . -name libssl3.so -print | head -1)")"

macOS

export DYLD_LIBRARY_PATH="$(dirname "$(find . -name libssl3.dylib -print | head -1)")"

Note: If you did not already compile NSS separately, you need to have Mercurial (hg), installed. NSS builds require GYP and Ninja to be installed.

Debugging Neqo

QUIC logging

Enable generation of QLOG logs with:

target/debug/neqo-server '[::]:12345' --qlog-dir .
target/debug/neqo-client 'https://[::]:12345/' --qlog-dir .

You can of course specify a different directory for the QLOG files. You can upload QLOG files to qvis to visualize the flows.

Using SSLKEYLOGFILE to decrypt Wireshark logs

You can export TLS keys by setting the SSLKEYLOGFILE environment variable to a filename to instruct NSS to dump keys in the standard format to enable decryption by Wireshark and other tools.

Using RUST_LOG effectively

As documented in the env_logger documentation, the RUST_LOG environment variable can be used to selectively enable log messages from Rust code. This works for Neqo's command line tools, as well as for when Neqo is incorporated into Gecko, although Gecko needs to be built in debug mode.

Some examples:

  1. RUST_LOG=neqo_transport::dump ./mach run
    

    lists sent and received QUIC packets and their frames' contents only.

  2. RUST_LOG=neqo_transport=debug,neqo_http3=trace,info ./mach run
    

    sets a debug log level for transport, trace level for http3, and info log level for all other Rust crates, both Neqo and others used by Gecko.

  3. RUST_LOG=neqo=trace,error ./mach run
    

    sets trace level for all modules starting with neqo, and sets error as minimum log level for other unrelated Rust log messages.

Trying in-development Neqo code in Gecko

In a checked-out copy of Gecko source, set [patches.*] values for the four Neqo crates to local versions in the root Cargo.toml. For example, if Neqo was checked out to /home/alice/git/neqo, add the following lines to the root Cargo.toml.

[patch."https://github.com/mozilla/neqo"]
neqo-http3 = { path = "/home/alice/git/neqo/neqo-http3" }
neqo-transport = { path = "/home/alice/git/neqo/neqo-transport" }
neqo-common = { path = "/home/alice/git/neqo/neqo-common" }
neqo-qpack = { path = "/home/alice/git/neqo/neqo-qpack" }
neqo-crypto = { path = "/home/alice/git/neqo/neqo-crypto" }

Then run the following:

./mach vendor rust

Compile Gecko as usual with

./mach build

Note: Using newer Neqo code with Gecko may also require changes (likely to neqo_glue) if something has changed.