https://github.com/btwiuse/h3
WebTransport over HTTP/3 echo server & client
https://github.com/btwiuse/h3
http3 http3-client http3-server webtransport
Last synced: about 1 month ago
JSON representation
WebTransport over HTTP/3 echo server & client
- Host: GitHub
- URL: https://github.com/btwiuse/h3
- Owner: btwiuse
- License: mit
- Created: 2022-09-17T06:17:44.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-13T01:20:51.000Z (2 months ago)
- Last Synced: 2025-04-10T16:30:17.182Z (about 1 month ago)
- Topics: http3, http3-client, http3-server, webtransport
- Language: JavaScript
- Homepage: https://h3.k0s.io
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# h3
WebTransport over HTTP/3 echo server & client
## Install
```
$ go install github.com/btwiuse/h3@latest
```## Start local server (needs [mkcert](https://mkcert.dev))
```
$ mkcert -install && mkcert localhost
The local CA is already installed in the system trust store! 👍
The local CA is already installed in the Firefox and/or Chrome/Chromium trust store! 👍Created a new certificate valid for the following names 📜
- "localhost"The certificate is at "./localhost.pem" and the key at "./localhost-key.pem" ✅
It will expire on 17 December 2024 🗓
$ env HOST=localhost PORT=8443 CERT=./localhost.pem KEY=./localhost-key.pem h3 server
2022/09/17 16:16:10 listening on https://localhost:8443 (UDP)
2022/09/17 16:16:13 new conn 127.0.0.1:45394
```## Connect to local server
```
$ env HOST=localhost PORT=8443 h3 client
2022/09/17 16:16:13 dialing https://localhost:8443/echo (UDP)
2022/09/17 16:16:13 new conn [::]:45394
BTW I USE ARCH
BTW I USE ARCH
```## Connect to public demo server at [h3.k0s.io](https://h3.k0s.io)
```
$ env HOST=h3.k0s.io PORT=444 h3 client
2022/09/17 18:45:44 dialing https://h3.k0s.io:444/echo (UDP)
2022/09/17 18:45:45 new conn [::]:36805
BTW I USE ARCH
BTW I USE ARCH
```## Test HTTP/3 against demo server with [`curl-http3`](https://aur.archlinux.org/packages/curl-http3)
```
$ curl3 -s https://h3.k0s.io -I --http3
HTTP/3 200
content-type: text/plain; charset=utf-8
x-content-type-options: nosniff$ curl3 -s https://h3.k0s.io -I
HTTP/2 200
alt-svc: h3=":444"
content-type: text/plain; charset=utf-8
date: Sat, 17 Sep 2022 15:44:28 GMT
x-content-type-options: nosniff
content-length: 12
```## TODO
- [ ] Figure how how to expose the HTTP/3 server through traefik ingress, rather
that `hostPort` (help wanted)
- [ ] Make the client discover available h3 endpoints from the Alt-Svc header