You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/02/22 03:48:08 UTC

[GitHub] [apisix] lizj3624 commented on issue #6403: feat: apisix support QUIC+HTTP3

lizj3624 commented on issue #6403:
URL: https://github.com/apache/apisix/issues/6403#issuecomment-1047398206


   I patch [quiche](https://github.com/cloudflare/quiche) to OpenResty-1.15.8,I found error (epoll_ctl(1, 53) failed (17: File exists)) when access_by_lua of ngx_lua module enabled,I gruess ngx_lua not support quic.  [ngx_lua issue](https://github.com/openresty/lua-nginx-module/issues/1887)
   
   1. build env
   ```shell
   nginx version: openresty/1.15.8.1 (quiche-09c0e37)
   built by gcc 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)
   built with OpenSSL 1.1.1 (compatible; BoringSSL) (running with BoringSSL)
   TLS SNI support enabled
   configure arguments: --prefix=/myngx/nginx --with-debug --with-cc-opt='-DNGX_LUA_USE_ASSERT -DNGX_LUA_ABORT_AT_PANIC -O2 -ggdb -O2 -D JD_NGX_SSL_HANDSHAKE_TIME -D JD_NGX_HTTP_UPSTREAM_RANDOM' --add-module=../ngx_devel_kit-0.3.1rc1 --add-module=../echo-nginx-module-0.61 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2 --add-module=../set-misc-nginx-module-0.32 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.08 --add-module=../srcache-nginx-module-0.31 --add-module=../ngx_lua-0.10.15 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.33 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.19 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.7 --add-module=../rds-json-nginx-module-0.15 --add-module=../rds-csv-nginx-module-0.09 --add-module=../ngx_stream_lua-0.0.7 --with-ld-opt=-Wl,-rpath,/export/servers/myngx/luajit/lib --build=qui
 che-09c0e37 --with-pcre=/root/rpmbuild/BUILD/myngx-2.3-52.d375389/thirdparty/pcre-8.39 --with-pcre-jit --with-zlib=/root/rpmbuild/BUILD/myngx-2.3-52.d375389/thirdparty/zlib-1.2.8 --with-threads --with-http_auth_request_module --with-http_ssl_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_slice_module --add-module=/root/rpmbuild/BUILD/myngx-2.3-52.d375389/thirdparty/lua-ssl-nginx-module --add-module=/root/rpmbuild/BUILD/myngx-2.3-52.d375389/thirdparty/ngx_http_dyups_module --add-module=/root/rpmbuild/BUILD/myngx-2.3-52.d375389/thirdparty/ngx_http_sticky_module --with-stream --with-stream_ssl_module --with-http_v3_module --with-openssl=/root/myhome/quiche-cloudflare/deps/boringssl --with-quiche=/root/myhome/quiche-cloudflare --with-stream --with-stream_ssl_preread_module
   ``` 
   
   2.  some code
   ngx的conf配置
   ```cond
   http {
   ...
   lua_max_running_timers 512;
   lua_max_pending_timers 1024;
   
   lua_package_path "$prefix/app/lib/?.lua;$prefix/app/etc/?.lua;$prefix/app/src/?.lua;$prefix/sbin/openresty/lualib/?.lua;;";
   lua_package_cpath "$prefix/app/lib/?.so;$prefix/sbin/openresty/lualib/?.so;;";
   
   lua_check_client_abort on;
   lua_socket_log_errors off;
   lua_http10_buffering off;
   ...
   
   server {
   listen :443 quic reuseport;
   isten :443 ssl http2;
   ...
   access_by_lua_file my_waf.lua
   ...
   
   }
   }
   ```
   WAF模块的相关代码逻辑
   my_waf.lua
   ```lua
   _M.waf_request = function ()
   ...ngx.req.get_body_file()..
   local http_conn = http.new()
   ...http_conn.connect()...
   ...http_conn.request()...
   ...
   
   end
   ```
   
   3. error msg
   ```conf
   2022/02/22 11:00:05 [alert] 27764#27764: *42474256 epoll_ctl(1, 36) failed (17: File exists), client: 1.114.102.56, server:quic.ngx.com, request: "POST /a?&t=1511418329196 HTTP/2.0", host: "quic.ngx.com"
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org