diff --git a/README.md b/README.md index 7f8e019..e25a9dc 100755 --- a/README.md +++ b/README.md @@ -5,10 +5,11 @@ - Based on latest [NGINX](https://hg.nginx.org/nginx) mainline version - HTTP/3 and QUIC support, powered by [nginx-quic](https://hg.nginx.org/nginx-quic) - Brotli support, powered by [ngx_brotli](https://github.com/google/ngx_brotli) +- GeoIP2 support, powered by [ngx_http_geoip2_module](https://github.com/leev/ngx_http_geoip2_module) - Headers More support, powered by [ngx_headers_more](https://github.com/openresty/headers-more-nginx-module) - OCSP stapling support, powered by [this patch](https://github.com/kn007/patch/blob/master/Enable_BoringSSL_OCSP.patch) -- WAF support, powered by [ngx_waf](https://github.com/ADD-SP/ngx_waf/tree/current) - Security Headers support, powered by [ngx_security_headers](https://github.com/GetPageSpeed/ngx_security_headers) +- WAF support, powered by [ngx_waf](https://github.com/ADD-SP/ngx_waf/tree/current) - Zstandard support, powered by [zstd-nginx-module](https://github.com/tokers/zstd-nginx-module) - Use [BoringSSL](https://github.com/google/boringssl), [Cloudflare's zlib](https://github.com/cloudflare/zlib) and [jemalloc](https://github.com/jemalloc/jemalloc) - Use OpenSSL's hash functions instead of NGINX's, powered by [this patch](https://github.com/kn007/patch/blob/master/use_openssl_md5_sha1.patch) diff --git a/build.sh b/build.sh index b139ec1..cc3b433 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ set -e cd /github/home echo Install dependencies. apt-get update > /dev/null 2>&1 -apt-get install --allow-change-held-packages --allow-downgrades --allow-remove-essential -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold -fy cmake curl git golang libcurl4-openssl-dev libmodsecurity-dev libsodium-dev libunwind-dev libzstd-dev mercurial ninja-build rsync wget > /dev/null 2>&1 +apt-get install --allow-change-held-packages --allow-downgrades --allow-remove-essential -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold -fy cmake curl git golang libcurl4-openssl-dev libmaxminddb-dev libmodsecurity-dev libsodium-dev libunwind-dev libzstd-dev mercurial ninja-build rsync wget > /dev/null 2>&1 wget -qO /etc/apt/trusted.gpg.d/nginx_signing.asc https://nginx.org/keys/nginx_signing.key echo deb-src http://nginx.org/packages/mainline/debian bullseye nginx >> /etc/apt/sources.list echo -e 'Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900' > /etc/apt/preferences.d/99nginx @@ -45,13 +45,14 @@ cd zlib make -f Makefile.in distclean > /dev/null 2>&1 cd .. git clone --recursive https://github.com/google/ngx_brotli > /dev/null 2>&1 +git clone https://github.com/leev/ngx_http_geoip2_module > /dev/null 2>&1 git clone https://github.com/openresty/headers-more-nginx-module > /dev/null 2>&1 git clone https://github.com/GetPageSpeed/ngx_security_headers > /dev/null 2>&1 git clone https://github.com/tokers/zstd-nginx-module > /dev/null 2>&1 echo Build nginx. cd .. sed -i 's/CFLAGS=""/CFLAGS="-fstack-protector-strong -Wno-ignored-qualifiers -Wno-sign-compare"/g' rules -sed -i 's/--sbin-path=\/usr\/sbin\/nginx/--sbin-path=\/usr\/sbin\/nginx --add-module=$(CURDIR)\/debian\/modules\/ngx_waf --add-module=$(CURDIR)\/debian\/modules\/ngx_brotli --add-module=$(CURDIR)\/debian\/modules\/headers-more-nginx-module --add-module=$(CURDIR)\/debian\/modules\/ngx_security_headers --add-module=$(CURDIR)\/debian\/modules\/zstd-nginx-module/g' rules +sed -i 's/--sbin-path=\/usr\/sbin\/nginx/--sbin-path=\/usr\/sbin\/nginx --add-module=$(CURDIR)\/debian\/modules\/ngx_waf --add-module=$(CURDIR)\/debian\/modules\/ngx_brotli --add-module=$(CURDIR)\/debian\/modules\/ngx_http_geoip2_module --add-module=$(CURDIR)\/debian\/modules\/headers-more-nginx-module --add-module=$(CURDIR)\/debian\/modules\/ngx_security_headers --add-module=$(CURDIR)\/debian\/modules\/zstd-nginx-module/g' rules sed -i 's/--with-cc-opt="$(CFLAGS)" --with-ld-opt="$(LDFLAGS)"/--with-http_v3_module --with-stream_quic_module --with-zlib=$(CURDIR)\/debian\/modules\/zlib --with-cc-opt="-I..\/modules\/boringssl\/include $(CFLAGS)" --with-ld-opt="-ljemalloc -L..\/modules\/boringssl\/build\/ssl -L..\/modules\/boringssl\/build\/crypto $(LDFLAGS)"/g' rules sed -i 's/dh_shlibdeps -a/dh_shlibdeps -a -- --ignore-missing-info/g' rules cd ..