Add HTTP/3 opt-in support with migrations, tests, and cleanup#5587
Open
RicoUHD wants to merge 21 commits into
Open
Add HTTP/3 opt-in support with migrations, tests, and cleanup#5587RicoUHD wants to merge 21 commits into
RicoUHD wants to merge 21 commits into
Conversation
This change implements the full HTTP/3 opt-in capability for nginx-proxy-manager. Includes database migrations, backend schemas, template support for listen directives, UI toggle switches, Cypress E2E API tests, s6-overlay startup checks, and Docker Compose configurations.
Reverts docker-compose.yml to the standard production configuration and deletes sandbox-specific testing scripts.
Implements synchronous startup Nginx HTTP/3 binary capability checks, replaces window config lookup with a dynamic backend health check query in React, removes the hardware-dependent quic_gso directive, and tightens the advanced config reuseport sanitizer regex.
Hooks s6 55-http3-check.sh script into the oneshot prepare pipeline, resolves default.conf startup failures on non-QUIC or disabled hosts by dynamically stripping quic listeners at boot, and resolves api-level types by mapping http3_support to standard knex boolFields.
…-Svc header Implements copy-on-write idempotency for default.conf during s6 startup to allow runtime HTTP/3 enable/disable toggles across restarts, removes redundant server-level Alt-Svc headers from templates to avoid shadowing confusion, and cleans up stray spaces in the advanced config sanitizer.
Sets docker-compose to build dynamically from the local Dockerfile on standard ports 80/443 for seamless developer onboarding.
Reverts the root docker-compose.yml to reference the standard jc21/nginx-proxy-manager:latest production image, keeping the PR perfectly clean and free of development-only compilation scopes.
Add HTTP/3 opt-in support for proxy hosts with migrations and tests
…pliance Agent-Logs-Url: https://github.com/RicoUHD/NPM/sessions/e98f2019-77b0-46c1-aa0d-81cd122b1bc5 Co-authored-by: RicoUHD <190290209+RicoUHD@users.noreply.github.com>
Restore missing isolated CI compose overlay for Jenkins orchestration
Updated CI docker-compose file to include build context and additional environment variables for services. Never worked with Jenkins before :)
…evious CI breakage) Apologies for the previous commit which broke Jenkins by duplicating databases, using invalid Cypress arguments, and setting mismatched build contexts. This cleanly inherits from docker-compose.ci.yml to run HTTP/3 E2E specs on the standard testing network.
…Cypress E2E API validation Apologies for overlooking the health check schema validation! The health route GET /api returns the 'http3_disabled' property, but the swagger schema didn't define it and rejected additional properties, causing Cypress E2E tests to fail in the 'before all' hook. This resolves the validation failure.
|
Docker Image for build 10 is available on DockerHub: Note Ensure you backup your NPM instance before testing this image! Especially if there are database changes. Warning Changes and additions to DNS Providers require verification by at least 2 members of the community! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add HTTP/3 (QUIC over UDP) opt-in support for proxy hosts 🚀
📖 Description
This PR implements full, opt-in support for HTTP/3 (QUIC over UDP) for proxy hosts. It covers the complete stack, including backend database schema migrations, template listener generations, dynamic Nginx capability detection, frontend toggle UI with multi-language localizations, and E2E integration tests.
The feature is designed from the ground up as a safe, zero-regression opt-in, ensuring that existing users upgrading their installations will experience exactly zero changes or configuration risk by default.
🔗 Fixes & Resolved Issues
This implementation natively satisfies and closes the long-standing community feature requests:
Fixes #1550
🛡️ Key Architectural Highlights & Safety Guardrails
1. Robust Startup & Compatibility Protection (Non-QUIC Nginx Builds)
quicdirectives are present in configuration blocks on older binaries lacking the--with-http_v3_modulecompilation engine.55-http3-check.shsourced inside the s6-overlay prepare oneshot service pipeline. If Nginx lacks HTTP/3 capabilities OR ifNPM_HTTP3_DISABLED=1is set, the startup script dynamically stripsquiclisten parameters from the staticdefault.confbefore Nginx launches, ensuring complete system stability./). If the core system detects that HTTP/3 is disabled or unsupported, the frontend hook intercepts the component mount and masks the UI elements entirely.default.confon every container start, allowing operators to dynamically toggle theNPM_HTTP3_DISABLEDkill-switch across restarts without container rebuilds.2. Socket
reuseportConflict Resolutionreuseportmultiple times on identical sockets crashes Nginx. The master QUIC socket is initialized globally as a singleton insidedefault.conf.backend/internal/proxy-host.js(for both create and update operations) that programmatically strips manualreuseportdeclarations from user-submittedadvanced_configtextareas before database commit, preventing user-inflicted Nginx boot failures and cleaning up trailing punctuation cleanly.3. Standards-Compliant API Type Coercion
http3_supportnatively into the model's standardboolFieldslifecycle array. While the backend migration schema uses a storage-efficienttinyintformat, the data layer automatically handles the type translation so that the API surfaces standard JSON booleans (true/false), matching the repo's established model design rules line-for-line.4. Shadow-Safe Alt-Svc Header Inheritance
Alt-Svcheader is declared dynamically inside the default/location block and custom location templates (_location.conf), ensuring reliable QUIC advertisement on the wire without duplicate header noise or parent scoping erasure.💾 Database Migration & Rollback
20260527000000_http3_support.js) addshttp3_supportastinyint(1)defaulting to0(opt-in).downmigration defensively updates and zeroes all database rows before dropping the column to prevent template rendering errors during the hot reload cycle.🎨 Frontend & Internationalization
domains.http3-support) in all 22 supported languages to ensure zero internationalization debt across regional installations.🧪 E2E Verification & Hardened Test Results
We carried out multiple layers of automated and manual sandbox testing to guarantee absolute deployment safety:
✅ 1. Active Nginx Configuration Compile Validation
We verified that the dynamically generated Nginx configurations parse successfully with zero conflicts under the new s6 pipeline:
✅ 2. Live HTTP/3 Wire Advertisement Test
We queried the running upgraded container on port 443 over TLS forcing the exact SNI hostname (
beta.lehn.site) and verified that the dynamic HTTP/3 advertisement header is active and correctly broadcasting:✅ 3. Clean Baseline-to-Feature Upgrade & Data Integrity Verification
We deployed a clean production container running the current official release to initialize a fresh standard database, populated it with mock proxy host data, and then upgraded the container to this feature branch.
We ran an automated database validation pass to assert structural and data integrity: