### Start server with content directory Source: https://github.com/0x676e67/http3/blob/main/examples/readme.md Runs the server with a directory of content files to serve. ```bash > cargo run --example server -- --listen=127.0.0.1:4433 --dir=content/root ``` -------------------------------- ### Start the example client Source: https://github.com/0x676e67/http3/blob/main/examples/readme.md Sends an HTTP request to the server at https://localhost:4433. ```bash > cargo run --example client -- https://localhost:4433 ``` -------------------------------- ### Start the HTTP/3 server Source: https://github.com/0x676e67/http3/blob/main/examples/readme.md Runs the example server listening on 127.0.0.1:4433. Generates a self-signed certificate for encryption. ```bash > cargo run --example server -- --listen=127.0.0.1:4433 ``` -------------------------------- ### Start server for browser testing Source: https://github.com/0x676e67/http3/blob/main/examples/readme.md Runs the server on IPv6 with a valid certificate and key for browser compatibility. ```bash > cargo run --example server -- --listen=[::]:4433 --dir=examples/root --cert=examples/cert.der --key=examples/key.der ``` -------------------------------- ### Start client with skip-verify and performance options Source: https://github.com/0x676e67/http3/blob/main/examples/readme.md Runs the client ignoring certificate validation and setting request count, QPACK blocked streams, and max table capacity. ```bash > cargo run --example client -- --skip-verify --requests 10 --qpack-blocked-streams 100 --qpack-max-table-capacity 65535 https://localhost:8181/api/all ``` -------------------------------- ### Start client requesting a specific file Source: https://github.com/0x676e67/http3/blob/main/examples/readme.md Requests a file from the server by appending the file name to the URI. ```bash > cargo run --example client -- https://localhost:4433/index.html ``` -------------------------------- ### Run Chromium with QUIC forced Source: https://github.com/0x676e67/http3/blob/main/examples/readme.md Launches Chromium with QUIC enabled and forces QUIC for localhost:4433. ```bash > chromium --enable-quic --quic-version=h3 --origin-to-force-quic-on=localhost:4433 ``` -------------------------------- ### Import and use http3 client Connection Source: https://github.com/0x676e67/http3/blob/main/README.md Imports the client Connection type and shows a minimal main function. The actual connection setup is omitted in the example. ```rust use http3::client::Connection; fn main() { // ... } ``` -------------------------------- ### Run interop tests Source: https://github.com/0x676e67/http3/blob/main/interop/README.md Runs the local interoperability test suite for the http3 QUIC client against multiple HTTP/3 server backends. ```bash cargo test -p interop ``` -------------------------------- ### Run public-server interop checks Source: https://github.com/0x676e67/http3/blob/main/interop/README.md Runs the real public-server checks, which are ignored by default because they require external network access. Use --ignored and --nocapture with a single test thread. ```bash cargo test -p interop --test client -- --ignored --nocapture --test-threads=1 ``` -------------------------------- ### Add http3 dependency to Cargo.toml Source: https://github.com/0x676e67/http3/blob/main/README.md Adds the http3 crate as a dependency in your Cargo.toml file. Required before using the library. ```toml [dependencies] http3 = "0.1.1" ```