This project contains a working HTTP/3 server and client using QUIC protocol.
src/main.rs- HTTP/3 serversrc/client.rs- HTTP/3 clientCargo.toml- Project dependencies
cargo run --bin serverYou should see:
Http/3 server started on https://127.0.0.1:4433
cargo run --bin clientYou should see:
Connecting to https://127.0.0.1:4433...
Connected!
--- Sending request to / ---
Status: 200 OK
Body: Hello from Http3
--- Sending request to /test ---
Status: 200 OK
Body: Hello from Http3 test endpoint
--- Sending request to /health ---
Status: 200 OK
Body: Hello from Http3 health endpoint
All requests completed successfully!
- Listens on
127.0.0.1:4433 - Generates a self-signed certificate automatically
- Handles HTTP/3 requests on three endpoints:
/- Returns "Hello from Http3"/test- Returns "Hello from Http3 test endpoint"/health- Returns "Hello from Http3 health endpoint"- Any other path - Returns "hello from http3 - unknown endpoint"
- Connects to the server using QUIC
- Skips certificate verification (safe for self-signed certs in development)
- Sends HTTP/3 requests to all three endpoints
- Prints the response status and body for each request
- Protocol: HTTP/3 over QUIC
- TLS: Self-signed certificate with rustls
- Async Runtime: Tokio
- QUIC Implementation: Quinn
- HTTP/3 Implementation: h3 crate
Make sure Rust is installed and cargo is in your PATH.
Make sure the server is running before starting the client.
The client is configured to skip certificate verification for development purposes. This is safe for local testing but should NOT be used in production.