Skip to content

Releases

v0.7.0 — metrics, bundled rules & policy inputs (nginx 1.31.10)

Choose a tag to compare

@github-actions github-actions released this 27 Nov 07:44

Adds what an operator needs around the gate: counters for every outcome,
ready-made crawler rules, more inputs for the policy map, and clearances that
survive a restart without Redis. All of it is opt-in; an existing configuration
keeps working unchanged. Built for nginx mainline 1.31.10 and nginx
stable 1.30.7
.

What changed

  • Metrics. pow_gate_status; in a location serves counters per
    (result, reason) in the Prometheus text format, shared across workers and
    kept across a reload, plus the load gauges. See
    Metrics.
  • Bundled rules. rules/ holds map includes for AI
    crawlers, search engines and automation tools, and verifier blocks with the
    published range feeds of Google, Bing, DuckDuckGo, Apple, OpenAI and
    Perplexity. scripts/robots2map.py turns a robots.txt into map entries.
    The files are in the repository at this tag, not in the release artifacts.
  • Weighted scoring. pow_gate_weights $a $b …; sums integer signals into
    $pow_gate_score, which a map turns into a decision.
  • Load-adaptive difficulty. $pow_gate_load (one-minute load as a
    percentage of the CPUs) and $pow_gate_load_1m feed
    pow_gate_difficulty_scale $var;, a multiplier for newly issued challenges.
    Clients that are already cleared are not challenged again when load rises.
  • Restart survival. pow_gate_state_file <file>; keeps the store identity
    on disk, so clearances survive a full restart on a single instance.
    Challenges and no-JS grants issued before the restart are refused, because
    the record of which ones were already redeemed is lost with the restart.
  • Honeypot. The embedded challenge page carries a hidden link to
    {endpoint}trap. A hit is answered with 404, logged as
    result=honeypot with a warn line for fail2ban, and counted. The module
    does not block the client itself.
  • deny:<status>. A decision can refuse with any status from 400 to 599;
    deny:444 closes the connection without a response.
  • pow_gate_cookie_partitioned on; adds Partitioned (and forces
    Secure) for gated content inside third-party iframes.
  • Link previews. examples/link-previews.conf
    admits preview fetchers: checked against the operator's ASN where it owns its
    network, by User-Agent otherwise, and rate-limited in both cases.

New how-tos: Use the bundled rules,
Keep link previews working and
Monitor the gate.

Upgrade notes

  • Protocol and cookies are unchanged. Protocol v2 clients, cookie names and
    existing configurations work as before.
  • /verify accepts a challenge at or above the location's difficulty
    instead of exactly equal. This is what lets a load surcharge apply to new
    challenges only. A challenge below the required difficulty is still rejected.
  • Replacing the module needs a restart, which invalidates clearances once
    unless Redis is configured. Adding pow_gate_state_file takes effect from
    the next restart on: the first start creates the file, later ones restore it.
  • Do not share a state file between instances, and prefer a service restart
    over nginx's binary-upgrade procedure while it is set. See
    Restart survival.
  • Custom challenge pages do not get the honeypot link automatically; see
    challenge-page.md.
  • Memory: the counters reserve one additional 256 KiB shared-memory zone
    per instance.
  • Map regexes containing { or } must be quoted in nginx, for example
    "~^\d{3,}$". The bundled examples do this.

Dependencies and toolchain

  • ureq 3, p256 0.14, sha2 0.11, hmac 0.13, getrandom 0.4 and a
    refreshed lockfile. This clears five RustSec advisories in dependencies:
    RUSTSEC-2026-0204 (crossbeam-epoch), RUSTSEC-2026-0381 (webpki-roots),
    RUSTSEC-2026-0382 (rustls-webpki), RUSTSEC-2026-0387 (crypto-bigint) and
    RUSTSEC-2026-0592 (url). webpki-roots is the trust store of the HTTPS
    client that fetches crawler range feeds.
  • Release modules are built with Rust 1.100. The musl build moved to Alpine
    3.24 with clang 20, the same Alpine release as the nginx:alpine image.
  • Building from source now needs Rust 1.88 or newer.

Performance

A before/after comparison against v0.6.2 on Linux/amd64 shows no measurable
change from the new features or the dependency upgrades: cleared, proof and
challenge requests stay within 1% in the four-worker layout, the same as the
ungated control. A profile-guided pass over the request path then makes cleared
requests about 3% faster (3.6% less worker CPU per request on one pinned
worker): headers are read through nginx's own pointers without lossy
conversion, the clearance payload is parsed without heap buffering, and each
worker counts outcomes in its own row. Portable P-256
verification in pow-gate-core is about 12% slower with p256 0.14; the nginx
module verifies with ring and is not affected. Details and raw results are in
performance.md.

A module must match the exact nginx version, libc and architecture of its
runtime.

Artifacts

nginx libc arch Module
1.31.10 glibc amd64 ngx_http_pow_gate_module-0.7.0-nginx1.31.10-glibc-amd64.so
1.31.10 glibc arm64 ngx_http_pow_gate_module-0.7.0-nginx1.31.10-glibc-arm64.so
1.31.10 musl amd64 ngx_http_pow_gate_module-0.7.0-nginx1.31.10-musl-amd64.so
1.31.10 musl arm64 ngx_http_pow_gate_module-0.7.0-nginx1.31.10-musl-arm64.so
1.30.7 glibc amd64 ngx_http_pow_gate_module-0.7.0-nginx1.30.7-glibc-amd64.so
1.30.7 glibc arm64 ngx_http_pow_gate_module-0.7.0-nginx1.30.7-glibc-arm64.so
1.30.7 musl amd64 ngx_http_pow_gate_module-0.7.0-nginx1.30.7-musl-amd64.so
1.30.7 musl arm64 ngx_http_pow_gate_module-0.7.0-nginx1.30.7-musl-arm64.so

Each module includes a .sig signature and .pem certificate. SHA256SUMS
covers all eight modules. The release workflow requires two independent,
byte-identical builds per module and attaches GitHub build-provenance
attestations before publishing.

Verify

Download your module, its .sig and .pem, and SHA256SUMS, then run:

module=ngx_http_pow_gate_module-0.7.0-nginx1.31.10-glibc-amd64.so
sha256sum -c --ignore-missing SHA256SUMS
gh attestation verify "$module" --repo teian/ngx_http_pow_gate
cosign verify-blob \
  --certificate "$module.pem" \
  --signature "$module.sig" \
  --certificate-identity 'https://github.com/teian/ngx_http_pow_gate/.github/workflows/release.yml@refs/tags/v0.7.0' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  "$module"

v0.6.2 — rebuild for nginx 1.31.10 security release

Choose a tag to compare

@github-actions github-actions released this 25 Nov 17:19

Rebuild the v0.6.1 module for nginx mainline 1.31.10, released on
2026-11-23 to fix an nginx security issue. Nginx stable stays at 1.30.7 and
is rebuilt unchanged. There are no module or protocol changes. The module
version advances because v0.6.1 has already shipped and published tags are
immutable.

nginx security fix

The fix is in nginx itself, not in this module. Upgrade nginx and the module
together; a module must match the exact nginx version, libc and architecture of
its runtime.

CVE nginx issue Fixed in
CVE-2026-132779 excessive CPU usage caused by a client when ssl_early_data is used 1.31.10

See the nginx security advisories
and the 1.31.10 change log.

nginx 1.31.10 also fixes a bug where nginx might hog CPU when SSL connections
to backends are used.

Nginx 1.31.9 users who cannot upgrade yet can keep using the signed
v0.6.1 builds,
but stay exposed to the issue above. Nginx 1.30.7 users do not need to
act: the 1.30.7 modules here are a rebuild of the same code against the same
nginx as v0.6.1.

Artifacts

nginx libc arch Module
1.31.10 glibc amd64 ngx_http_pow_gate_module-0.6.2-nginx1.31.10-glibc-amd64.so
1.31.10 glibc arm64 ngx_http_pow_gate_module-0.6.2-nginx1.31.10-glibc-arm64.so
1.31.10 musl amd64 ngx_http_pow_gate_module-0.6.2-nginx1.31.10-musl-amd64.so
1.31.10 musl arm64 ngx_http_pow_gate_module-0.6.2-nginx1.31.10-musl-arm64.so
1.30.7 glibc amd64 ngx_http_pow_gate_module-0.6.2-nginx1.30.7-glibc-amd64.so
1.30.7 glibc arm64 ngx_http_pow_gate_module-0.6.2-nginx1.30.7-glibc-arm64.so
1.30.7 musl amd64 ngx_http_pow_gate_module-0.6.2-nginx1.30.7-musl-amd64.so
1.30.7 musl arm64 ngx_http_pow_gate_module-0.6.2-nginx1.30.7-musl-arm64.so

Each module includes a .sig signature and .pem certificate. SHA256SUMS
covers all eight modules. The release workflow requires two independent,
byte-identical builds per module and attaches GitHub build-provenance
attestations before publishing.

Verify

Download your module, its .sig and .pem, and SHA256SUMS, then run:

module=ngx_http_pow_gate_module-0.6.2-nginx1.31.10-glibc-amd64.so
sha256sum -c --ignore-missing SHA256SUMS
gh attestation verify "$module" --repo teian/ngx_http_pow_gate
cosign verify-blob \
  --certificate "$module.pem" \
  --signature "$module.sig" \
  --certificate-identity 'https://github.com/teian/ngx_http_pow_gate/.github/workflows/release.yml@refs/tags/v0.6.2' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  "$module"

v0.6.1 — rebuild for nginx 1.31.9 and 1.30.7 security releases

Choose a tag to compare

@github-actions github-actions released this 19 Nov 08:10

Rebuild the v0.6.0 module for nginx mainline 1.31.9 and nginx stable
1.30.7
, both released on 2026-11-18 to fix several nginx security issues.
There are no module or protocol changes. The module version advances because
v0.6.0 has already shipped and published tags are immutable.

nginx security fixes

The fixes are in nginx itself, not in this module. Upgrade nginx and the module
together; a module must match the exact nginx version, libc and architecture of
its runtime.

CVE nginx issue Fixed in
CVE-2026-123007 HTTP/2 flow control window overflow (memory corruption) 1.31.9, 1.30.7
CVE-2026-118899 endless loop while reading the request body over SSL 1.31.9, 1.30.7
CVE-2026-113425 use-after-free in the mail proxy server 1.31.9, 1.30.7
CVE-2026-123633 use-after-free in HTTP/2 when worker_connections are exhausted 1.31.9, 1.30.7
CVE-2026-121810 use-after-free in HTTP/3 when worker_connections are exhausted 1.31.9, 1.30.7
CVE-2026-123634 use-after-free in the resolver during simultaneous lookups in subrequests 1.31.9, 1.30.7
CVE-2026-125283 buffer overflow with try_files and alias 1.31.9, 1.30.7
CVE-2026-120967 stream: client certificates verified against the default server instead of the SNI server 1.31.9, 1.30.7
CVE-2026-123640 ngx_stream_ssl_preread_module parses malformed ClientHello differently 1.31.9, 1.30.7
CVE-2026-120993 NULL pointer dereference with PROXY protocol v2 and dynamic certificates (1.31.4+ only) 1.31.9

See the nginx security advisories
and the 1.31.9 /
1.30.7 change logs.

nginx 1.31.9 also changes request parsing: header lines without a colon are now
rejected, and so are chunked request bodies with too much framing overhead.

Nginx 1.31.8 and 1.30.6 users who cannot upgrade yet can keep using the
signed v0.6.0 builds,
but stay exposed to the issues above.

Artifacts

nginx libc arch Module
1.31.9 glibc amd64 ngx_http_pow_gate_module-0.6.1-nginx1.31.9-glibc-amd64.so
1.31.9 glibc arm64 ngx_http_pow_gate_module-0.6.1-nginx1.31.9-glibc-arm64.so
1.31.9 musl amd64 ngx_http_pow_gate_module-0.6.1-nginx1.31.9-musl-amd64.so
1.31.9 musl arm64 ngx_http_pow_gate_module-0.6.1-nginx1.31.9-musl-arm64.so
1.30.7 glibc amd64 ngx_http_pow_gate_module-0.6.1-nginx1.30.7-glibc-amd64.so
1.30.7 glibc arm64 ngx_http_pow_gate_module-0.6.1-nginx1.30.7-glibc-arm64.so
1.30.7 musl amd64 ngx_http_pow_gate_module-0.6.1-nginx1.30.7-musl-amd64.so
1.30.7 musl arm64 ngx_http_pow_gate_module-0.6.1-nginx1.30.7-musl-arm64.so

Each module includes a .sig signature and .pem certificate. SHA256SUMS
covers all eight modules. The release workflow requires two independent,
byte-identical builds per module and attaches GitHub build-provenance
attestations before publishing.

Verify

Download your module, its .sig and .pem, and SHA256SUMS, then run:

module=ngx_http_pow_gate_module-0.6.1-nginx1.31.9-glibc-amd64.so
sha256sum -c --ignore-missing SHA256SUMS
gh attestation verify "$module" --repo teian/ngx_http_pow_gate
cosign verify-blob \
  --certificate "$module.pem" \
  --signature "$module.sig" \
  --certificate-identity 'https://github.com/teian/ngx_http_pow_gate/.github/workflows/release.yml@refs/tags/v0.6.1' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  "$module"

v0.6.0 — tolerate wrong client clocks (nginx 1.31.8)

Choose a tag to compare

@github-actions github-actions released this 05 Nov 15:55

Fixes challenge failures on devices whose clock is wrong. The browser solver used
the device clock to judge challenge expiry and to stamp per-request proofs, so a
phone clock a few minutes off could fail the check indefinitely. Built for
nginx mainline 1.31.8 and nginx stable 1.30.6.

What changed

  • Server-anchored clock. The challenge response carries the server time
    (now, additive; protocol v2 is otherwise unchanged). The solver derives its
    clock from it and the monotonic timer, and resyncs after standby, wall-clock
    jumps and about two minutes via X-Pow-Now on {endpoint}status.
  • Clock-skew diagnosis. A proof rejected only for its timestamp is answered
    with X-Pow-Reason: proof_skew and the server time; the solver adopts it and
    retries GET/HEAD once. New $pow_gate_reason values: proof_skew,
    challenge_expired, bad_token, wrong_solution.
  • User feedback. The challenge page shows a localized warning (26 languages,
    optional #pow-clock element) when the device clock differs from the server by
    60 seconds or more. The comparison uses UTC epoch time, so time zones and DST
    never trigger it.
  • Loop guard. The navigation-loop protection also works without
    sessionStorage.

pow_gate_proof_skew needs no increase for clients with wrong clocks; 5s-10s
is recommended. Custom pages that sign proofs themselves should use now /
X-Pow-Now instead of the local clock; see
protocol.md.
The solver URL is content-hashed, so browsers pick up the new solver.js
automatically.

A module must match the exact nginx version, libc and architecture of its
runtime.

Artifacts

nginx libc arch Module
1.31.8 glibc amd64 ngx_http_pow_gate_module-0.6.0-nginx1.31.8-glibc-amd64.so
1.31.8 glibc arm64 ngx_http_pow_gate_module-0.6.0-nginx1.31.8-glibc-arm64.so
1.31.8 musl amd64 ngx_http_pow_gate_module-0.6.0-nginx1.31.8-musl-amd64.so
1.31.8 musl arm64 ngx_http_pow_gate_module-0.6.0-nginx1.31.8-musl-arm64.so
1.30.6 glibc amd64 ngx_http_pow_gate_module-0.6.0-nginx1.30.6-glibc-amd64.so
1.30.6 glibc arm64 ngx_http_pow_gate_module-0.6.0-nginx1.30.6-glibc-arm64.so
1.30.6 musl amd64 ngx_http_pow_gate_module-0.6.0-nginx1.30.6-musl-amd64.so
1.30.6 musl arm64 ngx_http_pow_gate_module-0.6.0-nginx1.30.6-musl-arm64.so

Each module includes a .sig signature and .pem certificate. SHA256SUMS
covers all eight modules. The release workflow requires two independent,
byte-identical builds per module and attaches GitHub build-provenance
attestations before publishing.

Verify

Download your module, its .sig and .pem, and SHA256SUMS, then run:

module=ngx_http_pow_gate_module-0.6.0-nginx1.31.8-glibc-amd64.so
sha256sum -c --ignore-missing SHA256SUMS
gh attestation verify "$module" --repo teian/ngx_http_pow_gate
cosign verify-blob \
  --certificate "$module.pem" \
  --signature "$module.sig" \
  --certificate-identity 'https://github.com/teian/ngx_http_pow_gate/.github/workflows/release.yml@refs/tags/v0.6.0' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  "$module"

v0.5.1 — rebuild for nginx 1.31.8

Choose a tag to compare

@github-actions github-actions released this 22 Oct 16:22
66c8cac

Rebuild the v0.5.0 module for nginx mainline 1.31.8 and retain builds for
nginx stable 1.30.6. There are no module or protocol changes. The module
version advances because v0.5.0 has already shipped and published tags are
immutable.

Nginx 1.31.7 users should keep using the signed
v0.5.0 builds.
A module must match the exact nginx version, libc and architecture of its
runtime. The v0.5.0 upgrade guidance still applies when upgrading from an older
module version.

Artifacts

nginx libc arch Module
1.31.8 glibc amd64 ngx_http_pow_gate_module-0.5.1-nginx1.31.8-glibc-amd64.so
1.31.8 glibc arm64 ngx_http_pow_gate_module-0.5.1-nginx1.31.8-glibc-arm64.so
1.31.8 musl amd64 ngx_http_pow_gate_module-0.5.1-nginx1.31.8-musl-amd64.so
1.31.8 musl arm64 ngx_http_pow_gate_module-0.5.1-nginx1.31.8-musl-arm64.so
1.30.6 glibc amd64 ngx_http_pow_gate_module-0.5.1-nginx1.30.6-glibc-amd64.so
1.30.6 glibc arm64 ngx_http_pow_gate_module-0.5.1-nginx1.30.6-glibc-arm64.so
1.30.6 musl amd64 ngx_http_pow_gate_module-0.5.1-nginx1.30.6-musl-amd64.so
1.30.6 musl arm64 ngx_http_pow_gate_module-0.5.1-nginx1.30.6-musl-arm64.so

Each module includes a .sig signature and .pem certificate. SHA256SUMS
covers all eight modules. The release workflow requires two independent,
byte-identical builds per module and attaches GitHub build-provenance
attestations before publishing.

Verify

Download your module, its .sig and .pem, and SHA256SUMS, then run:

module=ngx_http_pow_gate_module-0.5.1-nginx1.31.8-glibc-amd64.so
sha256sum -c --ignore-missing SHA256SUMS
gh attestation verify "$module" --repo teian/ngx_http_pow_gate
cosign verify-blob \
  --certificate "$module.pem" \
  --signature "$module.sig" \
  --certificate-identity 'https://github.com/teian/ngx_http_pow_gate/.github/workflows/release.yml@refs/tags/v0.5.1' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  "$module"

v0.5.0 — Redis clustering and performance (nginx 1.31.7 / 1.30.6)

Choose a tag to compare

@github-actions github-actions released this 18 Oct 14:02

Redis coordination across gateway instances, more resilient browser recovery, and faster request verification. Protocol v2 remains in use.

Changes

  • Add optional pow_gate_redis coordination for one-use JS/no-JS redemption across independent nginx instances. Matching keys, policy and a provisioned epoch allow challenges and clearances to cross nodes without sticky routing. Ordinary clearance checks remain local.
  • Bound Redis work with nginx nonblocking socket events, connection/queue limits and a deadline covering queue time. Atomic epoch/clock checks fence lost control state; ambiguous redemption replies fail closed. The default remains the 2 MiB shared-memory replay store.
  • Scope cookie names automatically, confirm server-side cookie acceptance before navigation, and show a bounded error when cookies are blocked. Add bounded network retries, fresh challenges after ambiguous verification, worker watchdogs and in-page solver fallback.
  • Track crawler-feed snapshots independently, reject malformed replacements, expire stale sources and use indexed CIDR lookup. Add outcome logging variables and an optional ASN policy example.
  • Cache resolved configuration, policy fields and HMAC key schedules; enable native HMAC/P-256 verification in the module. Borrow token/configuration data, decode keys once, and send immutable response bodies without body-sized copies. Authentication, context, assurance and proof checks still run on every request.
  • Fingerprint public solver URLs for immutable caching across the page and workers. Keep challenges, verification and errors no-store; support nginx gzip filters with an example configuration.

Upgrade

Cookie names now include a scope suffix by default. Existing fixed-name cookies require a fresh solve. Update CDN bypass rules, logs and integrations that assumed the exact name pow_clearance; $pow_gate_cookie_name exposes the effective name. Set pow_gate_cookie_scope_suffix off explicitly if an exact fixed name is required. See cookie migration.

Install the .so atomically and deploy the module and solver together. Custom challenge pages should use the versioned solver URL and may adopt the embedded script-load recovery bootstrap. Cache keys must preserve the complete solver query.

Redis coordination requires one authoritative primary with noeviction and an explicitly provisioned shared epoch. It does not discover Redis Cluster/Sentinel topology or provide automatic durable failover. If spent-state continuity is uncertain, fence the fleet and rotate the epoch before resuming traffic. Switching replay backends invalidates existing tokens. Follow the Redis deployment and failover guide.

Validation and performance

CI, amd64 builds and native arm64 builds passed for the release commit on both pinned nginx channels, with glibc/musl coverage. The core passes 78 portable and 79 native-crypto tests. Coverage includes HTTP/1.1, HTTP/2, real TLS/QUIC HTTP/3, failed reloads, Redis cross-node races/failure fencing, feed freshness, gzip/HEAD/slow readers, and Chromium/Firefox recovery.

All performance tests ran on Linux/amd64. The first performance pass measured signed-proof throughput of 6,518 → 10,922 requests/second and worker CPU of 524.9 → 192.0 µs/request in a matched local four-worker setup. The allocation follow-up reduced normal clearance validation from six allocations to one; its separate matched run measured 10,530 → 10,965 proof requests/second. These are separate before/after experiments, not direct v0.4.0 release comparisons or production capacity estimates. Smaller throughput changes varied with concurrency and host load. See methodology and raw results.

Artifacts

Choose the exact nginx version, libc and architecture of your runtime.

nginx libc arch Module
1.31.7 glibc amd64 ngx_http_pow_gate_module-0.5.0-nginx1.31.7-glibc-amd64.so
1.31.7 glibc arm64 ngx_http_pow_gate_module-0.5.0-nginx1.31.7-glibc-arm64.so
1.31.7 musl amd64 ngx_http_pow_gate_module-0.5.0-nginx1.31.7-musl-amd64.so
1.31.7 musl arm64 ngx_http_pow_gate_module-0.5.0-nginx1.31.7-musl-arm64.so
1.30.6 glibc amd64 ngx_http_pow_gate_module-0.5.0-nginx1.30.6-glibc-amd64.so
1.30.6 glibc arm64 ngx_http_pow_gate_module-0.5.0-nginx1.30.6-glibc-arm64.so
1.30.6 musl amd64 ngx_http_pow_gate_module-0.5.0-nginx1.30.6-musl-amd64.so
1.30.6 musl arm64 ngx_http_pow_gate_module-0.5.0-nginx1.30.6-musl-arm64.so

Each module has a .sig signature and .pem signing certificate. SHA256SUMS covers all eight modules. The release workflow requires two independent, byte-identical builds of each module and attaches GitHub build-provenance attestations.

Verify

Download your module, its .sig and .pem, and SHA256SUMS, then run:

module=ngx_http_pow_gate_module-0.5.0-nginx1.31.7-glibc-amd64.so
sha256sum -c --ignore-missing SHA256SUMS
gh attestation verify "$module" --repo teian/ngx_http_pow_gate
cosign verify-blob \
  --certificate "$module.pem" \
  --signature "$module.sig" \
  --certificate-identity 'https://github.com/teian/ngx_http_pow_gate/.github/workflows/release.yml@refs/tags/v0.5.0' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  "$module"

v0.4.0 — bound PoW grants (nginx 1.31.7 / 1.30.6)

Choose a tag to compare

@github-actions github-actions released this 18 Oct 06:27

Protocol v2 closes reusable-challenge and cross-context clearance sharing holes, with bounded state shared across nginx workers.

Changes

  • Bind JS challenges to the canonical P-256 client key, client address policy, exact User-Agent and issuing policy/scope. Redemption requires a signature proving possession of that key.
  • Redeem JS and no-JS grants once, atomically across workers. A different valid nonce cannot reuse a spent challenge. One fixed 2 MiB shared zone per nginx instance holds up to 32,768 entries; live entries are never evicted and capacity exhaustion fails closed.
  • Bind clearances to the same client context and authenticated assurance. Easier PoW or no-JS clearances cannot satisfy a stronger PoW policy. Address binding defaults to IPv4 /32 and IPv6 /128; new pow_gate_ipv4_prefix, pow_gate_ipv6_prefix and pow_gate_policy directives control the policy.
  • Limit verification bodies to 8 KiB while streaming, including unknown-length HTTP/2 and HTTP/3 bodies. Bound FCrDNS resolver threads, queued work and cached verdicts. Keep verifier and replay-zone references tied to the active nginx configuration cycle so failed reloads do not affect respawned workers.
  • Add HTTP/3 tests over real TLS/QUIC alongside HTTP/1.1 and HTTP/2: concurrent streams and separate connections across four workers, key/context/policy binding, request proofs, no-JS reuse, and rejection of oversized bodies before stream completion.
  • Build both pinned nginx channels: mainline 1.31.7 and stable 1.30.6, for glibc/musl on amd64/arm64. The updater tracks each channel independently.

Upgrade

Breaking change: protocol-v1 clients and cookies are rejected. Deploy the module and embedded solver together with a full nginx process/container restart; existing visitors will solve again. Install the .so atomically rather than overwriting a mapped library. Custom challenge pages with hardcoded solver URLs need cache versioning or a cache purge.

Ordinary subsequent configuration reloads preserve the shared replay state. A full restart creates a fresh issuer and invalidates older tokens. Independent proxy instances currently have independent issuers and require sticky routing; the Redis cluster backend is a design proposal, not an implemented feature.

Navigation cookies remain bearer credentials within their allowed address/UA context. PoW does not impose a request-rate budget. The complete regular-traffic limits example starts in dry-run mode and needs tuning before enforcement.

Validation and performance

63 core tests, two updater regression tests, native builds and HTTP/1.1, HTTP/2, HTTP/3 and reload suites passed on both nginx versions. The HTTP/3 races reached all four workers with exactly one successful redemption; 8,192-byte verification bodies passed and 8,193 bytes was rejected before FIN without consuming the challenge.

The local bound-cookie comparison measured 51.4k versus 59.4k requests/second for v0.3.0, with p50 latency of 142 versus 123 microseconds: approximately 13.5% lower throughput for the additional context authentication. These short loopback measurements are not production capacity estimates. See the security review and performance methodology.

The full CI matrix also passed on both nginx channels, glibc/musl and amd64/arm64, including HTTP/3 end-to-end tests and failed-reload regression tests.

Artifacts

Choose the exact nginx version, libc and architecture used by your runtime.

Module nginx libc arch
ngx_http_pow_gate_module-0.4.0-nginx1.31.7-glibc-amd64.so mainline 1.31.7 glibc amd64
ngx_http_pow_gate_module-0.4.0-nginx1.31.7-glibc-arm64.so mainline 1.31.7 glibc arm64
ngx_http_pow_gate_module-0.4.0-nginx1.31.7-musl-amd64.so mainline 1.31.7 musl amd64
ngx_http_pow_gate_module-0.4.0-nginx1.31.7-musl-arm64.so mainline 1.31.7 musl arm64
ngx_http_pow_gate_module-0.4.0-nginx1.30.6-glibc-amd64.so stable 1.30.6 glibc amd64
ngx_http_pow_gate_module-0.4.0-nginx1.30.6-glibc-arm64.so stable 1.30.6 glibc arm64
ngx_http_pow_gate_module-0.4.0-nginx1.30.6-musl-amd64.so stable 1.30.6 musl amd64
ngx_http_pow_gate_module-0.4.0-nginx1.30.6-musl-arm64.so stable 1.30.6 musl arm64

Each .so includes a .sig signature and .pem signing certificate. SHA256SUMS covers all eight modules. Release builds are published only when two independent builds of every module are byte-identical; the workflow also attaches GitHub build-provenance attestations.

Verify

Download your module, its .sig and .pem, and SHA256SUMS, then run:

module=ngx_http_pow_gate_module-0.4.0-nginx1.31.7-glibc-amd64.so
sha256sum -c --ignore-missing SHA256SUMS
gh attestation verify "$module" --repo teian/ngx_http_pow_gate
cosign verify-blob \
  --certificate "$module.pem" \
  --signature "$module.sig" \
  --certificate-identity 'https://github.com/teian/ngx_http_pow_gate/.github/workflows/release.yml@refs/tags/v0.4.0' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  "$module"

v0.3.0 — challenged requests keep their body (nginx 1.31.3)

Choose a tag to compare

@github-actions github-actions released this 17 Aug 11:51

Highlights

  • A challenged POST is no longer lost. A clearance expires while a page is open, the user submits the form, and the gate answers that POST with the challenge page — the body is gone, and reloading after the solve re-issues a GET or makes the browser ask the user to confirm a resubmission. The gate now reads the body first and embeds the request in the challenge page it is already sending back to that same client (docs):
    • solver.js re-issues it the moment the clearance cookie is set — as a real form submit for an application/x-www-form-urlencoded POST, so redirects, history and rendering keep their native semantics, and through fetch with the raw bytes otherwise (multipart uploads, JSON, every method a form cannot express).
    • Stateless: nothing is buffered server-side, no shared memory, no TTL, no eviction policy — the client already has its own data. The payload is unsigned by design: it travels only back to the client that sent it, and a client that edits it merely sends a different request of its own, which a cleared client may do anyway. What is enforced is that it cannot break out of the page — the URL is held to an absolute same-site path and <, >, & are escaped in the JSON (wire format).
    • Covers every data-carrying method, not just POST: the rule is a deny-list of GET/HEAD/TRACE/CONNECT, so PUT, PATCH, DELETE, OPTIONS, WebDAV verbs and anything else an API speaks are replayed too. What decides is whether the request declared a body; the method is echoed back verbatim.
  • New directives, both inheriting http → server → location like the rest:
    • pow_gate_replay on|off — default on.
    • pow_gate_replay_max_body <size> — default 1m, matching nginx's own client_max_body_size default. A real budget: the body is read into the worker before the client has proven anything.
  • Not captured (unchanged behaviour — the client is still challenged, the request just loses its body as before): bodies over the budget or without a declared length (Transfer-Encoding: chunked), requests the browser marks as ones that will not render the page (Sec-Fetch-Dest outside document/iframe/frame — a fetch/XHR call gets the challenge page as inert bytes), and the challenge:nojs tier, which has no way to carry a body back. client_max_body_size still rejects first: nginx does that in the FIND_CONFIG phase, before the gate runs at all.
  • Fix: the manual dev sandbox (./scripts/dev.sh up) had not built since the nginx 1.31.3 bump — docker-compose.dev.yml still pinned 1.31.2 against the new tarball checksum.

Upgrading from 0.2.x: drop-in, no config change needed, and a custom pow_gate_page keeps working unchanged — just keep a </body> in it, that is where the block is injected. Note the default is on, so an un-cleared POST now has its body read (up to 1m) before the challenge page is served, and that page is sent Cache-Control: no-store. Use pow_gate_replay off; to restore the previous behaviour — worth doing on file-upload locations rather than reasoning about sizes.

Artifacts

File nginx libc arch
ngx_http_pow_gate_module-0.3.0-nginx1.31.3-glibc-amd64.so 1.31.3 glibc amd64
ngx_http_pow_gate_module-0.3.0-nginx1.31.3-glibc-arm64.so 1.31.3 glibc arm64
ngx_http_pow_gate_module-0.3.0-nginx1.31.3-musl-amd64.so 1.31.3 musl amd64
ngx_http_pow_gate_module-0.3.0-nginx1.31.3-musl-arm64.so 1.31.3 musl arm64

A module .so loads only into the exact nginx version it was built for (1.31.3, --with-compat).

Verify

sha256sum -c --ignore-missing SHA256SUMS
cosign verify-blob \
  --certificate ngx_http_pow_gate_module-0.3.0-nginx1.31.3-glibc-amd64.so.pem \
  --signature   ngx_http_pow_gate_module-0.3.0-nginx1.31.3-glibc-amd64.so.sig \
  --certificate-identity-regexp 'github.com/teian/ngx_http_pow_gate' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  ngx_http_pow_gate_module-0.3.0-nginx1.31.3-glibc-amd64.so

Builds are reproducible: the workflow builds every artifact twice independently and publishes only on byte-identical output.

v0.2.1 — rebuild for nginx 1.31.3

Choose a tag to compare

@github-actions github-actions released this 16 Jul 18:35

Highlights

Pure nginx rebuild — no module code changes since v0.2.0. Picked up by
nginx-update.yml
(nginx 1.31.2 → 1.31.3); the module version bumps to 0.2.1 because 0.2.0 was
already released and tags are immutable.

Artifacts

File nginx libc arch
ngx_http_pow_gate_module-0.2.1-nginx1.31.3-glibc-amd64.so 1.31.3 glibc amd64
ngx_http_pow_gate_module-0.2.1-nginx1.31.3-glibc-arm64.so 1.31.3 glibc arm64
ngx_http_pow_gate_module-0.2.1-nginx1.31.3-musl-amd64.so 1.31.3 musl amd64
ngx_http_pow_gate_module-0.2.1-nginx1.31.3-musl-arm64.so 1.31.3 musl arm64

A module .so loads only into the exact nginx version it was built for (1.31.3, --with-compat).

Verify

sha256sum -c --ignore-missing SHA256SUMS
cosign verify-blob \
  --certificate ngx_http_pow_gate_module-0.2.1-nginx1.31.3-glibc-amd64.so.pem \
  --signature   ngx_http_pow_gate_module-0.2.1-nginx1.31.3-glibc-amd64.so.sig \
  --certificate-identity-regexp 'github.com/teian/ngx_http_pow_gate' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  ngx_http_pow_gate_module-0.2.1-nginx1.31.3-glibc-amd64.so

Builds are reproducible: the workflow builds every artifact twice independently and publishes only on byte-identical output.

v0.2.0 — challenge tiers, parallel worker solver, no-JS fallback (nginx 1.31.2)

Choose a tag to compare

@github-actions github-actions released this 04 Jul 20:49

Highlights

  • Challenge tiers — the pow_gate_decision map now picks how hard a client is challenged, mirroring Anubis' challenge-method set (docs):
    • challenge:<N> — per-client PoW difficulty, HMAC-bound into the challenge token (echoing a lower one fails as BadToken; covered by e2e)
    • challenge:js — JS-execution proof only (difficulty 1): the keypair + verify roundtrip is the whole test
    • challenge:nojs[:secs] — no-JS meta-refresh challenge for text browsers (lynx, w3m) and JS-free setups: signed one-shot grant, minimum-wait enforced server-side via the new {endpoint}pass endpoint, too-early redeems restart the wait
  • Parallel worker solver — the browser solver hashes in pure JS across one Web Worker per core (~30× per thread over the old awaited-WebCrypto loop; ~2.5 MH/s per worker in Chromium). Falls back to a single-threaded in-page loop under strict CSP, and to crypto.subtle if the pure-JS hasher fails its startup self-test. Progress now shows the true solve probability instead of parking at 99 %.
  • New directive pow_gate_nojs_page — override the embedded no-JS page (per-request placeholders {{pass_url}}, {{delay}}).
  • Fix: empty non-204 responses (all 400/503 error paths) were never flushed — clients hung until EOF instead of seeing the error. Every error/redirect response now carries a body.

Upgrading from 0.1.x: drop-in; no config change needed. The challenge-token format changed (difficulty is now bound into the HMAC), so solves in flight during the reload fail once and self-heal via the solver's built-in retry. With the ~30× faster solver, consider raising pow_gate_difficulty (see the retuned difficulty table).

Artifacts

File nginx libc arch
ngx_http_pow_gate_module-0.2.0-nginx1.31.2-glibc-amd64.so 1.31.2 glibc amd64
ngx_http_pow_gate_module-0.2.0-nginx1.31.2-glibc-arm64.so 1.31.2 glibc arm64
ngx_http_pow_gate_module-0.2.0-nginx1.31.2-musl-amd64.so 1.31.2 musl amd64
ngx_http_pow_gate_module-0.2.0-nginx1.31.2-musl-arm64.so 1.31.2 musl arm64

A module .so loads only into the exact nginx version it was built for (1.31.2, --with-compat).

Verify

sha256sum -c --ignore-missing SHA256SUMS
cosign verify-blob \
  --certificate ngx_http_pow_gate_module-0.2.0-nginx1.31.2-glibc-amd64.so.pem \
  --signature   ngx_http_pow_gate_module-0.2.0-nginx1.31.2-glibc-amd64.so.sig \
  --certificate-identity-regexp 'github.com/teian/ngx_http_pow_gate' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  ngx_http_pow_gate_module-0.2.0-nginx1.31.2-glibc-amd64.so

Builds are reproducible: the workflow builds every artifact twice independently and publishes only on byte-identical output.