My issue:
Yield didn’t work fine on http3.
How I encountered the problem:
If I use this command : curl
https://example.mncdn.org:8443
it works fine.
But if I tried curl
https://example.mncdn.org:8443
--http3-only
, it didn’t work fine.
Solutions I’ve tried:
My config:
daemon off;
user root;
worker_processes 1;
error_log /dev/stdout debug;
worker_rlimit_nofile 100000;
master_process off;
error_log logs/error.log debug;
worker_priority -10;
events {
multi_accept on;
use epoll;
worker_connections 51202;
}
thread_pool default threads=32 max_queue=65536;
http {
log_format quic '$remote_addr - $remote_user [$time_local] ’
'“$request” $status $body_bytes_sent ’
‘“$http_referer” “$http_user_agent” “$http3”’;
access_log logs/access.log quic;
lua_package_path "$prefixlua/?.so;;$prefixlua/module/?.so;$prefixlua/?.lua;$prefixlua/module/?.lua;;";
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA;
ssl_prefer_server_ciphers on;
ssl_certificate certs/wildcard_mncdn_org.crt;
ssl_certificate_key certs/wildcard_mncdn_org.key;
server {
listen 8443 ssl reuseport;
listen 8443 quic reuseport;
server_name example.mncdn.org;
ssl_early_data on;
http2 on;
ssl_certificate_by_lua_block {
local redis = require "resty.redis"
local red, err = redis:new()
if not red then
ngx.log(ngx.ERR, "failed to instantiate redis: ", err)
return
end
red:set_timeouts(1000, 1000, 1000)
local ok, err = red:connect("127.0.0.1", 6379)
if not ok then
ngx.log(ngx.ERR, "failed to connect redis: ", err)
return
end
local value, err = red:get("foo")
if not value then
ngx.log(ngx.ERR, "failed to get value", err)
return
end
ngx.log(ngx.DEBUG, "The value is ", value)
print("About to initiate a new SSL handshake!")
}
location / {
add_header Alt-Svc 'h3=":$server_port"; ma=30, h3-29=":$server_port"; ma=30';
return 200 'Hello, world!';
}
}
}