readme added demo site, example upd

This commit is contained in:
yurymuski
2021-07-05 00:44:05 +03:00
parent 6dc658af13
commit 2fceb6ca10
2 changed files with 13 additions and 3 deletions
+8
View File
@@ -47,3 +47,11 @@ Sent QUIC client Initial, ALPN: h3-25h3-24h3-23
< HTTP/3 200 < HTTP/3 200
HTTP/3 200 HTTP/3 200
``` ```
### Demo
- Site: http3.yurets.pro
- Online test: [http3check](https://www.http3check.net/?host=http3.yurets.pro)
- Shell: `docker run -it --rm ymuski/curl-http3 curl -ILv https://http3.yurets.pro/ --http3`
+4 -2
View File
@@ -20,7 +20,7 @@ http {
server_name your_domain; server_name your_domain;
# Add Alt-Svc header to negotiate HTTP/3. # Add Alt-Svc header to negotiate HTTP/3.
add_header alt-svc 'h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400'; add_header alt-svc 'h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400';
return 301 https://$host$request_uri; return 301 https://$host$request_uri;
@@ -51,7 +51,7 @@ http {
} }
# Add Alt-Svc header to negotiate HTTP/3. # Add Alt-Svc header to negotiate HTTP/3.
add_header alt-svc 'h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400'; add_header alt-svc 'h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400';
location / { location / {
root html; root html;
@@ -61,6 +61,8 @@ http {
location /host { location /host {
return 200 "http3 on $hostname"; return 200 "http3 on $hostname";
add_header Content-Type text/plain; add_header Content-Type text/plain;
# Add Alt-Svc header to negotiate HTTP/3.
add_header alt-svc 'h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400';
} }
} }