Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ononoki1/nginx-http3
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.4.57
Choose a base ref
...
head repository: ononoki1/nginx-http3
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Jan 14, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Jan 14, 2024
    Copy the full SHA
    2118943 View commit details
  2. Update hash and version

    ononoki1 authored and github-actions[bot] committed Jan 14, 2024
    Copy the full SHA
    02f3353 View commit details

Commits on Jan 17, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Jan 17, 2024
    Copy the full SHA
    7809261 View commit details

Commits on Jan 18, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Jan 18, 2024
    Copy the full SHA
    581e3e5 View commit details

Commits on Jan 19, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Jan 19, 2024
    Copy the full SHA
    55f2d6d View commit details

Commits on Jan 20, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Jan 20, 2024
    Copy the full SHA
    0240f6f View commit details

Commits on Jan 23, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Jan 23, 2024
    Copy the full SHA
    ad14a81 View commit details

Commits on Jan 24, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Jan 24, 2024
    Copy the full SHA
    8791d7a View commit details

Commits on Jan 25, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Jan 25, 2024
    Copy the full SHA
    f8ad777 View commit details

Commits on Jan 26, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Jan 26, 2024
    Copy the full SHA
    67fae20 View commit details

Commits on Jan 27, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Jan 27, 2024
    Copy the full SHA
    c23b397 View commit details

Commits on Jan 30, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Jan 30, 2024
    Copy the full SHA
    8f8e867 View commit details
  2. Update hash and version

    ononoki1 authored and github-actions[bot] committed Jan 30, 2024
    Copy the full SHA
    12570d4 View commit details

Commits on Jan 31, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Jan 31, 2024
    Copy the full SHA
    bdec31d View commit details

Commits on Feb 1, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Feb 1, 2024
    Copy the full SHA
    7ce7b6c View commit details

Commits on Feb 4, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Feb 4, 2024
    Copy the full SHA
    92afaef View commit details

Commits on Feb 8, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Feb 8, 2024
    Copy the full SHA
    1395f17 View commit details

Commits on Feb 9, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Feb 9, 2024
    Copy the full SHA
    940f009 View commit details
  2. Use http2 directive (#42)

    Update HTTP2 since it is deprecated in "listen".
    iz8mbw authored Feb 9, 2024
    Copy the full SHA
    7de06f3 View commit details

Commits on Feb 10, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Feb 10, 2024
    Copy the full SHA
    b416eb3 View commit details

Commits on Feb 11, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Feb 11, 2024
    Copy the full SHA
    2cdf26e View commit details

Commits on Feb 15, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Feb 15, 2024
    Copy the full SHA
    1279ed0 View commit details
  2. Update hash and version

    ononoki1 authored and github-actions[bot] committed Feb 15, 2024
    Copy the full SHA
    6985d31 View commit details
  3. Copy the full SHA
    4d34865 View commit details
  4. Remove http_sub_module

    ononoki1 committed Feb 15, 2024
    Copy the full SHA
    11c4cc2 View commit details
  5. Update hash and version

    ononoki1 authored and github-actions[bot] committed Feb 15, 2024
    Copy the full SHA
    d41e882 View commit details
  6. Copy the full SHA
    ad9fdf0 View commit details

Commits on Feb 22, 2024

  1. Remove boringssl dependency (#43)

    * Update build.sh
    
    * Update build.sh
    
    * Update build.sh
    
    * Update build.sh
    
    * Update README.md
    
    * Update build.yml
    
    * Update test.yml
    
    * Update minor
    ononoki1 authored Feb 22, 2024
    Copy the full SHA
    8b91f12 View commit details
  2. Update hash and version

    ononoki1 authored and github-actions[bot] committed Feb 22, 2024
    Copy the full SHA
    3dbe13d View commit details
  3. Fix libssl1.1 dependency (#45)

    * Update build.sh
    
    * Update build.sh
    
    * Update build.sh
    
    * Update build.sh
    
    * Update README.md
    
    * Update build.yml
    
    * Update test.yml
    ononoki1 authored Feb 22, 2024
    Copy the full SHA
    f6630e0 View commit details
  4. Update hash and version

    ononoki1 authored and github-actions[bot] committed Feb 22, 2024
    Copy the full SHA
    f89805e View commit details

Commits on Apr 17, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Apr 17, 2024
    Copy the full SHA
    878424c View commit details

Commits on May 30, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed May 30, 2024
    Copy the full SHA
    6bc4e32 View commit details

Commits on Jun 25, 2024

  1. Switch to bookworm (#47)

    * Update build.yml
    
    * Update test.yml
    
    * Update minor
    
    * Update README.md
    
    * Update Dockerfile
    ononoki1 authored Jun 25, 2024
    Copy the full SHA
    7a9d4d3 View commit details
  2. Update hash and version

    ononoki1 authored and github-actions[bot] committed Jun 25, 2024
    Copy the full SHA
    0adbd00 View commit details

Commits on Aug 15, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Aug 15, 2024
    Copy the full SHA
    8e9f13f View commit details

Commits on Sep 4, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Sep 4, 2024
    Copy the full SHA
    e383377 View commit details

Commits on Oct 3, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Oct 3, 2024
    Copy the full SHA
    8027a33 View commit details

Commits on Oct 4, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Oct 4, 2024
    Copy the full SHA
    2a2235c View commit details

Commits on Nov 10, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Nov 10, 2024
    Copy the full SHA
    a775ea5 View commit details

Commits on Nov 27, 2024

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Nov 27, 2024
    Copy the full SHA
    1752a6b View commit details

Commits on Feb 6, 2025

  1. Update hash and version

    ononoki1 authored and github-actions[bot] committed Feb 6, 2025
    Copy the full SHA
    66b9dcd View commit details
Showing with 42 additions and 52 deletions.
  1. +9 −9 .github/workflows/build.yml
  2. +5 −5 .github/workflows/test.yml
  3. +1 −1 Dockerfile
  4. +16 −15 README.md
  5. +8 −19 build.sh
  6. +1 −1 hash
  7. +1 −1 minor
  8. +1 −1 patch
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: build
on:
schedule:
- cron: '0 */12 * * *'
- cron: "0 0 * * *"
push:
branches: [ main ]
paths:
- '**.sh'
branches: [main]
paths:
- "**.sh"
- Dockerfile
workflow_dispatch:
jobs:
@@ -14,17 +14,17 @@ jobs:
name: build
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Build
uses: ./
- name: Upload
uses: actions/upload-artifact@v3.0.0
uses: actions/upload-artifact@v4
with:
name: v5.${{ env.minor }}.${{ env.patch }}
name: v8.${{ env.minor }}.${{ env.patch }}
path: /home/runner/work/_temp/_github_home/nginx.deb
- name: Update
if: ${{ env.change }}
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update hash and version
- name: Release
@@ -33,5 +33,5 @@ jobs:
with:
files: /home/runner/work/_temp/_github_home/nginx.deb
body: "SHA256: ${{ env.hash }}"
tag_name: v5.${{ env.minor }}.${{ env.patch }}
tag_name: v8.${{ env.minor }}.${{ env.patch }}
generate_release_notes: false
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: test
on:
push:
branches-ignore: [ main ]
branches-ignore: [main]
paths:
- '**.sh'
- "**.sh"
- Dockerfile
workflow_dispatch:
jobs:
@@ -12,11 +12,11 @@ jobs:
name: test
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Build
uses: ./
- name: Upload
uses: actions/upload-artifact@v3.0.0
uses: actions/upload-artifact@v4
with:
name: v5.${{ env.minor }}.${{ env.patch }}
name: v8.${{ env.minor }}.${{ env.patch }}
path: /home/runner/work/_temp/_github_home/nginx.deb
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM debian:bullseye-slim
FROM debian:bookworm
COPY build.sh /build.sh
ENTRYPOINT ["bash", "/build.sh"]
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# nginx-http3

## Distribution switch notice

According to [Debian Wiki](https://wiki.debian.org/DebianReleases), Debian bullseye will reach its end-of-life date in July 2024. Therefore, the project will switch to Debian bookworm as the packaging environment in June 2024.

**Update:** already switched on June 25th.

## Table of Contents

- [Features](#features)
- [Usage](#usage)
- [Note](#note)
- [Removed modules](#removed-modules)
- [Add modules back](#add-modules-back)
- [Use in another distribution](#use-in-another-distribution)
@@ -13,11 +18,10 @@
## Features

- Based on latest [NGINX](https://hg.nginx.org/nginx) mainline version
- HTTP/3 and QUIC support
- HTTP/3 and QUIC support, powered by [quictls](https://github.com/quictls/openssl)
- 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)
- Remove mountains of useless modules to improve performance

## Usage
@@ -29,15 +33,9 @@ wget https://github.com/ononoki1/nginx-http3/releases/latest/download/nginx.deb
sudo apt install ./nginx.deb
```

## Note

Due to usage of BoringSSL instead of OpenSSL, some directives may not work, e.g. `ssl_conf_command`. Besides, direct OCSP stapling via `ssl_stapling on; ssl_stapling_verify on;` does not work too. You should use `ssl_stapling on; ssl_stapling_file /path/to/ocsp;`. The OCSP file can be generated via `openssl ocsp -no_nonce -issuer /path/to/intermediate -cert /path/to/cert -url "$(openssl x509 -in /path/to/cert -noout -ocsp_uri)" -respout /path/to/ocsp`.

If you really need these directives, you should consider [nginx-quictls](https://github.com/ononoki1/nginx-quictls).

## Removed modules

- All modules that are not built by default, except `http_ssl_module`, `http_sub_module` and `http_v2_module`
- All modules that are not built by default, except `http_ssl_module`, `http_v2_module` and `http_v3_module`
- `http_access_module`
- `http_autoindex_module`
- `http_browser_module`
@@ -65,18 +63,19 @@ For example, if you want to add `http_scgi_module` back, you need to remove `--h

## Use in another distribution

Fork this repo, enable GitHub Actions, edit `Dockerfile` and `build.sh`, and change `bullseye-slim` to the one you like. Then wait for GitHub Actions to run. After it finishes, you can download from releases.
Fork this repo, enable GitHub Actions, edit `Dockerfile` and `build.sh`, and change `bookworm` to the one you like. Then wait for GitHub Actions to run. After it finishes, you can download from releases.

For example, if you want to use in Debian bookworm, you need to change `bullseye-slim` to `bookworm-slim` in `Dockerfile`.
For example, if you want to use in Debian bullseye, you need to change `bookworm` to `bullseye`.

Note: if you are using newer version of Debian (e.g. Debian bookworm or unstable), you can simply use releases from this repo as Debian is backward compatible.
Note: if you are using newer version of Debian (e.g. Debian trixie or unstable), you can still use releases for Debian bookworm as Debian is backward compatible.

## Recommended NGINX config

```nginx
http {
brotli on;
gzip on;
http2 on;
http3 on;
quic_gso on;
quic_retry on;
@@ -87,14 +86,16 @@ http {
ssl_protocols TLSv1.2 TLSv1.3;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 1d;
ssl_stapling on;
ssl_stapling_verify on;
server {
listen 80 reuseport;
listen [::]:80 reuseport; # delete if ipv6 is unavailable
return 444;
}
server {
listen 443 reuseport ssl http2;
listen [::]:443 reuseport ssl http2;
listen 443 reuseport ssl;
listen [::]:443 reuseport ssl;
listen 443 reuseport quic;
listen [::]:443 reuseport quic;
ssl_reject_handshake on;
27 changes: 8 additions & 19 deletions build.sh
Original file line number Diff line number Diff line change
@@ -5,10 +5,7 @@ echo deb http://deb.debian.org/debian bullseye-backports main >> /etc/apt/source
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 libmaxminddb-dev ninja-build wget zlib1g-dev > /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 \
-t bullseye-backports golang > /dev/null 2>&1
cmake git libmaxminddb-dev 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 https://nginx.org/packages/mainline/debian bullseye nginx \
>> /etc/apt/sources.list
@@ -20,20 +17,12 @@ apt-get build-dep --allow-change-held-packages --allow-downgrades --allow-remove
nginx > /dev/null 2>&1
echo Fetch NGINX source code.
apt-get source nginx > /dev/null 2>&1
echo Fetch quictls source code.
cd nginx-*
curl -sL https://raw.githubusercontent.com/kn007/patch/master/Enable_BoringSSL_OCSP.patch \
| patch -p1 > /dev/null 2>&1
echo Fetch boringssl source code.
mkdir debian/modules
cd debian/modules
git clone --depth 1 --recursive https://github.com/google/boringssl > /dev/null 2>&1
echo Build boringssl.
mkdir boringssl/build
cd boringssl/build
cmake -GNinja .. > /dev/null 2>&1
ninja -j$(nproc) > /dev/null 2>&1
git clone --depth 1 --recursive https://github.com/quictls/openssl > /dev/null 2>&1
echo Fetch additional dependencies.
cd ../..
git clone --depth 1 --recursive https://github.com/google/ngx_brotli > /dev/null 2>&1
mkdir ngx_brotli/deps/brotli/out
cd ngx_brotli/deps/brotli/out
@@ -46,14 +35,14 @@ git clone --depth 1 --recursive https://github.com/openresty/headers-more-nginx-
echo Build nginx.
cd ..
sed -i 's|NGINX Packaging <nginx-packaging@f5.com>|ononoki <me@ononoki.org>|g' control
sed -i 's|CFLAGS=""|CFLAGS="-Wno-ignored-qualifiers"|g' rules
sed -i 's|export DEB_CFLAGS_MAINT_APPEND=.*|export DEB_CFLAGS_MAINT_APPEND=|g' rules
sed -i 's|export DEB_LDFLAGS_MAINT_APPEND=.*|export DEB_LDFLAGS_MAINT_APPEND=|g' rules
sed -i 's|CFLAGS=""|CFLAGS="-Wno-error"|g' rules
sed -i 's|--sbin-path=/usr/sbin/nginx|--sbin-path=/usr/sbin/nginx --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|g' rules
sed -i 's|--with-cc-opt="$(CFLAGS)" --with-ld-opt="$(LDFLAGS)"|--with-cc-opt="-I../modules/boringssl/include $(CFLAGS)" --with-ld-opt="-L../modules/boringssl/build/ssl -L../modules/boringssl/build/crypto $(LDFLAGS)"|g' rules
sed -i 's|--http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx|--user=www-data --group=www-data|g' rules
sed -i 's|--with-compat||g' rules
sed -i 's|--with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module||g' rules
sed -i 's|--with-http_stub_status_module||g' rules
sed -i 's|--with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module|--with-http_v3_module --with-pcre-jit --without-select_module --without-poll_module --without-http_access_module --without-http_autoindex_module --without-http_browser_module --without-http_charset_module --without-http_empty_gif_module --without-http_limit_conn_module --without-http_memcached_module --without-http_mirror_module --without-http_referer_module --without-http_split_clients_module --without-http_scgi_module --without-http_ssi_module --without-http_upstream_hash_module --without-http_upstream_ip_hash_module --without-http_upstream_keepalive_module --without-http_upstream_least_conn_module --without-http_upstream_random_module --without-http_upstream_zone_module|g' rules
sed -i 's|--with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module|--with-http_ssl_module|g' rules
sed -i 's|--with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module|--with-pcre-jit --without-select_module --without-poll_module --without-http_access_module --without-http_autoindex_module --without-http_browser_module --without-http_charset_module --without-http_empty_gif_module --without-http_limit_conn_module --without-http_memcached_module --without-http_mirror_module --without-http_referer_module --without-http_split_clients_module --without-http_scgi_module --without-http_ssi_module --without-http_upstream_hash_module --without-http_upstream_ip_hash_module --without-http_upstream_keepalive_module --without-http_upstream_least_conn_module --without-http_upstream_random_module --without-http_upstream_zone_module --with-openssl=$(CURDIR)/debian/modules/openssl|g' rules
cd ..
dpkg-buildpackage -b > /dev/null 2>&1
cd ..
2 changes: 1 addition & 1 deletion hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bde01e1a94a9311544226fa4794ed74d2ba65400e3a5c252066ceeb2c053a1f4
07cc9c989465aa3206a20510353915401814f76ded3d835fdb2939e26e6c4506
2 changes: 1 addition & 1 deletion minor
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4
0
2 changes: 1 addition & 1 deletion patch
Original file line number Diff line number Diff line change
@@ -1 +1 @@
57
7