Skip to content

About

QUIC-based HTTP/3 server and client in Rust - Quinn transport, h3 protocol layer, rustls TLS 1.3, self-signed cert bootstrap

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTTP/3 Server and Client - Quick Start Guide

Overview

This project contains a working HTTP/3 server and client using QUIC protocol.

Files

  • src/main.rs - HTTP/3 server
  • src/client.rs - HTTP/3 client
  • Cargo.toml - Project dependencies

How to Run

Terminal 1 - Start the Server

cargo run --bin server

You should see:

Http/3 server started on https://127.0.0.1:4433

Terminal 2 - Run the Client

cargo run --bin client

You 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!

What the Server Does

  • 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"

What the Client Does

  • 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

Technical Details

  • Protocol: HTTP/3 over QUIC
  • TLS: Self-signed certificate with rustls
  • Async Runtime: Tokio
  • QUIC Implementation: Quinn
  • HTTP/3 Implementation: h3 crate

Troubleshooting

"cargo: command not found"

Make sure Rust is installed and cargo is in your PATH.

Connection refused

Make sure the server is running before starting the client.

Certificate errors

The client is configured to skip certificate verification for development purposes. This is safe for local testing but should NOT be used in production.

About

QUIC-based HTTP/3 server and client in Rust - Quinn transport, h3 protocol layer, rustls TLS 1.3, self-signed cert bootstrap

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages