Junyangz's docs
  • Introduction
  • Ops
    • Linux-tips
    • MySQL-5.7.20
    • Upgrading MySQL
    • Upgrade OpenSSH to 7.7p1 in CentOS 6
    • Linux PERSISTENT NAMING
    • Use Kafka with Flume - CRS2
    • Setup Chroot SFTP in CentOS
    • Setup software RAID-5 in CentOS
    • SSH-port-forwarding
    • Elasticsearch In Production
    • ELK-simple-tutorial
    • Ansible Playbooks for Apache Kafka in production
    • GitHub Actions depoly Hexo
    • Test HTTP3/QUIC docker
    • Docker tutorial
    • SFTP-auth-pubkey
    • Linux Process Substitution
  • Note
    • Interview
      • interview-prepare
      • 2020-campus-recruiting
    • Android Tips
    • MacOS tips
    • Secret knowledge
    • GPG-Note
    • ud185
    • ud185-2
    • Introducing Tensorflow Federated
    • Tensorflow Federated
    • Expert Python Programing
    • What happens when zh_CN
    • TILGC
    • VScode keyboard shortcuts
    • Abseil Python
    • Latex Note
    • Git Cheatsheet
    • Study Smarter Not Harder
    • Machine Learning Interviews
    • 深度学习中的优化
    • Beej's Guide to Network Programming Note
      • ch4
      • ch5
      • ch6
      • ch7
  • [Share]
    • What to do after what to do
    • Truman is everywhere
    • Way2outer
    • 未来十五年
  • Quote
Powered by GitBook
On this page

Was this helpful?

  1. Ops

Test HTTP3/QUIC docker

PreviousGitHub Actions depoly HexoNextDocker tutorial

Last updated 2 years ago

Was this helpful?

  • Nginx conf

events {
    worker_connections  1024;
}

http {
    server {
        # Enable QUIC and HTTP/3.
        listen 443 quic reuseport;

        # Enable HTTP/2 (optional).
        listen 443 ssl http2;

        ssl_certificate      cert.crt;
        ssl_certificate_key  cert.key;

        # Enable all TLS versions (TLSv1.3 is required for QUIC).
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;

        # Add Alt-Svc header to negotiate HTTP/3.
        add_header alt-svc 'h3-23=":443"; ma=86400';
    }
}
docker run --name test-quic -p 8180:80 -p 8143:443 --rm \
-v /var/www/html/:/usr/share/nginx/html:ro \
-v /etc/nginx/docker-nginx-conf/nginx.conf:/etc/nginx/nginx.conf \
-v /etc/nginx/docker-nginx-conf/certs/cert.crt:/etc/nginx/cert.crt \
-v /etc/nginx/docker-nginx-conf/certs/cert.key:/etc/nginx/cert.key \
ranadeeppolavarapu/nginx-http3:latest
  • MacOS open Chrome with flag enabled

open -a /Applications/Google\ Chrome\ Canary.app --args \
--flag-switches-begin \
--enable-quic \
--quic-version=h3-23 \
--enable-features=EnableTLS13EarlyData \
--flag-switches-end

https://github.com/cloudflare/quiche/blob/master/extras/nginx/README.md
docker-nginx-http3