{ "name": "nginx", "version": "1.30.5", "summary": "nginx web server and reverse proxy (TLS, HTTP/2, HTTP/3, stream; brotli, zstd, GeoIP2, cache purge)", "category": "server", "license": "BSD-2-Clause", "homepage": "https://nginx.org/", "source": { "url": "https://nginx.org/download/nginx-1.30.5.tar.gz", "sha256": "6c20565aa2325cb82216ae804f4a4ff1875179014759a381c42ddc8e11c4906d" }, "watch": {"kind": "index", "url": "https://nginx.org/download/", "regex": "nginx-([0-9]+(?:\\.[0-9]+)+[a-z]?[0-9]*)\\.tar\\.gz", "pin": "1.30"}, "deps": [ "pcre2", "zlib", "openssl", "libxcrypt", "nginx-mod-geoip2", "nginx-mod-brotli", "nginx-mod-zstd", "nginx-mod-cache-purge" ], "env_packages": [], "static": true, "nss": true, "check": "v=$(sbin/nginx -v 2>&1 | sed -n 's/^nginx version: //p') && [ -n \"$v\" ] && check_static sbin/nginx && V=$(sbin/nginx -V 2>&1) && for x in user=guest group=guest with-compat with-http_ssl_module with-http_v2_module with-http_v3_module with-http_realip_module with-http_stub_status_module add-module=$PREFIX/share/nginx/modules-src/geoip2 add-module=$PREFIX/share/nginx/modules-src/brotli add-module=$PREFIX/share/nginx/modules-src/zstd add-module=$PREFIX/share/nginx/modules-src/cache-purge; do case $V in *\" --$x\"*) ;; *) echo \"nginx: --$x is missing\" >&2; exit 1 ;; esac; done && case $V in *--without-http_gzip_module* | *--without-http_proxy_module* | *--without-http_fastcgi_module*) echo \"nginx: gzip, proxy or fastcgi is left out\" >&2; exit 1 ;; esac && t=$(mktemp -d) && p=$(free_port) && s=$(free_port) && { while [ \"$s\" = \"$p\" ]; do s=$(free_port) || exit 1; done; } && m=bvs-nginx-$RANDOM$RANDOM && mkdir \"$t/html\" \"$t/pc\" \"$t/fc\" && printf '%s\\n' \"$m\" > \"$t/html/bvs.txt\" && seq 1 5000 > \"$t/html/big.txt\" && mmdb_one \"$t/one.mmdb\" && bin/openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:P-256 -nodes -days 2 -subj /CN=localhost -addext subjectAltName=DNS:localhost -addext basicConstraints=critical,CA:FALSE -keyout \"$t/key.pem\" -out \"$t/cert.pem\" > /dev/null 2>&1 && cat > \"$t/n.conf\" < \"$t/stderr.log\" 2>&1 & pid=$!; } && wait_port \"$p\" && wait_port \"$s\" && c=\"/usr/bin/curl -fsS -m 10 --cacert $t/cert.pem --resolve localhost:$s:127.0.0.1\" && cache() { $c -D - -o /dev/null \"http://127.0.0.1:$p/c/bvs.txt\" | tr -d '\\r' | sed -n 's/^[Xx]-[Cc]ache: //p'; } && h3() {\n # HTTP/3 through openssl s_client: one HEADERS frame on the client's stream (QPACK: GET, https, localhost,\n # /bvs.txt from the static table). s_client binds its one stream to whichever comes first, its request or nginx's\n # control stream; a try that loses ends at once (h3.rc), and the check makes up to five\n rm -f \"$t/h3.rc\" && : > \"$t/h3.out\" && {\n printf '\\x01\\x19\\x00\\x00\\xd1\\xd7\\x50\\x09localhost\\x51\\x08/bvs.txt'\n for _ in $(seq 1 50); do has -aF \"$m\" < \"$t/h3.out\" && break; [ -e \"$t/h3.rc\" ] && break; sleep 0.2; done\n } | { timeout 20 bin/openssl s_client -quic -alpn h3 -connect \"127.0.0.1:$s\" -servername localhost -CAfile \"$t/cert.pem\" -verify_return_error > \"$t/h3.out\" 2> \"$t/h3.err\"; echo $? > \"$t/h3.rc\"; } && has -x 'ALPN protocol: h3' < \"$t/h3.out\" && has -x 'Protocol: QUICv1' < \"$t/h3.out\" && h=$(od -An -tx1 -v \"$t/h3.out\" | tr -s ' \\n' ' ') && mh=$(printf '%s\\n' \"$m\" | od -An -tx1 -v | tr -s ' \\n' ' ') && case $h in *\" 2d 2d 2d 0a 01 \"*\" 00 00 d9 \"*\" 00 $(printf '%02x' $((${#m} + 1)))$mh\"*) ;; *) false ;; esac\n} && [ \"$($c --http1.1 \"http://127.0.0.1:$p/bvs.txt\")\" = \"$m\" ] && [ \"$($c --http1.1 \"https://localhost:$s/bvs.txt\")\" = \"$m\" ] && [ \"$($c --http2 -o \"$t/h2.out\" -w '%{http_version}' \"https://localhost:$s/bvs.txt\")\" = 2 ] && [ \"$(cat \"$t/h2.out\")\" = \"$m\" ] && $c --http1.1 -H 'Accept-Encoding: gzip' -D - -o \"$t/big.gz\" \"http://127.0.0.1:$p/big.txt\" | has -i '^content-encoding: gzip' && gzip -dc \"$t/big.gz\" | cmp -s - \"$t/html/big.txt\" && $c --http1.1 -H 'Accept-Encoding: br' -D - -o \"$t/big.br\" \"http://127.0.0.1:$p/big.txt\" | has -i '^content-encoding: br' && bin/brotli -dc \"$t/big.br\" | cmp -s - \"$t/html/big.txt\" && $c --http1.1 -H 'Accept-Encoding: zstd' -D - -o \"$t/big.zst\" \"http://127.0.0.1:$p/big.txt\" | has -i '^content-encoding: zstd' && bin/zstd -dcq \"$t/big.zst\" | cmp -s - \"$t/html/big.txt\" && [ \"$($c \"http://127.0.0.1:$p/geo?ip=128.0.0.1\")\" = \"PL none\" ] && [ \"$($c \"http://127.0.0.1:$p/geo?ip=127.0.0.2\")\" = \"PL PL\" ] && [ \"$(cache)\" = MISS ] && [ \"$(cache)\" = HIT ] && $c -o /dev/null \"http://127.0.0.1:$p/purge/c/bvs.txt\" && [ \"$(cache)\" = MISS ] && [ \"$(/usr/bin/curl -sS -m 10 -X PURGE -o /dev/null -w '%{http_code}' \"http://127.0.0.1:$p/x.php\")\" = 412 ] && { if [ -n \"$HOST\" ]; then echo \"nginx: the HTTP/3 request is not made in a cross build (qemu-user refuses getsockopt SO_COOKIE, which QUIC uses)\"; else for _ in 1 2 3 4 5; do h3 && break; done; fi; } && $c \"http://127.0.0.1:$p/nginx-status\" | has '^Active connections: '; r=$?; [ -n \"${pid:-}\" ] && kill \"$pid\" 2> /dev/null && wait \"$pid\" 2> /dev/null; [ $r = 0 ] || cat \"$t/stderr.log\" \"$t/e.log\" \"$t/h3.err\" >&2 2> /dev/null; rm -rf -- \"${t:?}\"; [ $r = 0 ] && echo \"$v: a static file over HTTP/1.1, HTTPS, HTTP/2 and HTTP/3 (QUIC, self-signed; not in a cross build), gzip, brotli and zstd responses, geoip2 lookups, a proxy cache entry purged, FastCGI purge, stub_status\"; exit $r" }