Skip to content

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
· 32 commits to main since this release

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.