This commit is contained in:
Mateusz Gruszczyński committed 2026-10-09 13:11:33 +02:00
1 parent f87eec7287
commit dd8c195600
38 files changed
+5491 -4682

No files matched your search

+16
View File
@@ -20,6 +20,22 @@ refresh while keeping directive-controlled stale delivery through RFC 5861 and r
validator-based handling of response `no-cache` instead of reproducing Varnish hit-for-miss
behavior exactly.
## Web Server origins (0.29.4)
A Web Service selected as the vhost source now uses the normal RustProxy shared
object-cache pipeline when both global and vhost cache policy permit it.
`Cache-Control: public, max-age=...` (or another eligible freshness policy)
can produce `MISS` followed by `HIT` instead of a browser-only cache header.
Vhost response rules run before cache fill, and transformed output is what is
stored. Private/`Set-Cookie`/`no-store` origin responses remain ineligible,
even if a later response-header rule replaces their visible cache headers.
For Web Server sources, stale entries are refreshed by a new local-source
request rather than the remote-backend revalidation worker. As with reverse
proxy origins, range requests and conditional requests can reuse fresh stored
representations. Do not rely on stale-if-error remote-backend refresh behavior
for local Web Server routes.
## Settings
| Field | Default | Bounds / meaning |
+38 -2
View File
@@ -13,7 +13,36 @@ Request
-> existing error/header/logging/metrics/transport pipeline
```
Vhosts and locations still reference only a Web Service. PHP settings remain part of that reusable service.
Vhosts and locations still reference only a Web Service. Each Web Service may
use local PHP settings or reference a shared `php_fpm_profiles` entry from the
normal revisioned configuration; its local settings are retained on detach.
### Shared PHP-FPM profiles (0.29.4)
In **Web Server → Edit Web Service → PHP-FPM**, select **Local configuration**
or a named profile. **Manage PHP-FPM profiles** opens a modal with an expandable
editor for every profile and an **Add profile** action. A profile contains the
same PHP execution, FastCGI and PHP_VALUE/PHP_ADMIN_VALUE settings as local
configuration. Changes to a shared profile affect all attached services after
validation and apply. In-use profiles cannot be deleted.
Configuration example:
```json
{
"php_fpm_profiles": [{
"id": "php82", "name": "PHP 8.2 FPM",
"php": {"enabled": true, "endpoint": "unix:/run/php/php8.2-fpm.sock"}
}],
"web_services": [{
"id": "site", "name": "Site", "document_root": "/var/www/site",
"php_profile_id": "php82"
}]
}
```
Unspecified PHP fields inherit the safe serde defaults. A service without
`php_profile_id` uses its own `php` object as in earlier versions.
## Runtime model
@@ -173,7 +202,14 @@ PHP stderr is bounded by `stderr_log_bytes` and written to the RustProxy diagnos
PHP output does not use static file validators or the static-file OS representation path. Application response headers and the normal vhost/location response-header pipeline control client/intermediary caching.
The Web Service static `cache_rules` apply to local static file responses, not to PHP stdout. RustProxy does not silently place PHP responses into a new Web Server object cache.
The Web Service static `cache_rules` apply to local static file responses, not
to PHP stdout. When global/vhost caching is enabled, explicitly cacheable
PHP-FPM responses may enter the shared RustProxy cache; responses with
`Set-Cookie`, `Cache-Control: private` or `no-store` cannot be stored. In
particular, do not enable forced caching of authenticated WordPress pages
without auditing the origin response policy. HTTP/2 and HTTP/3 `:authority`
requests populate the `HTTP_HOST` FastCGI parameter, retaining the original
host/port from the incoming request when provided.
## PHP installation
+56 -3
View File
@@ -1,4 +1,50 @@
# Verification report - RustProxy 0.29.3
# Verification report - RustProxy 0.29.4
## 0.29.4 PHP-FPM profile toolbar shortcut (2026-10-09)
The Web Server list toolbar now contains a **PHP-FPM profiles** button
immediately before **New Web Service**. Both this shortcut and the PHP tab's
existing profile button open the same shared profile-management dialog;
no API or configuration schema changes were required. English/Polish button
translations and a UI regression covering placement, both entry paths and
closing the dialog were added.
`node --check` on the changed Web Server script and its profile helper,
`node tools/checks/web_service_ui_test.mjs`, and the focused version,
language, Web Server architecture and documentation checks passed.
`./dev.sh test` was attempted but exceeded the execution time limit during
the Rust-independent verification phase, so it did not complete in this run.
Rust compilation and runtime tests remain unverified without Cargo.
## 0.29.4 version bump (2026-10-09)
The PHP-FPM profiles, Web Server cache/transforms and `HTTP_HOST` fixes have
been assigned to a new 0.29.4 release. The source version, root Cargo.lock
package entry, OpenAPI metadata, release checks and documentation match 0.29.4.
The 0.29.3 internal-fallback changes remain included. This is a source release;
no compiled artifacts are included.
Release verification: `python3 tools/checks/version_contracts.py`,
`python3 tools/checks/check_source.py`, `python3 tools/checks/docs_check.py`,
`python3 tools/checks/release_smoke.py` and the Node Web Service profile
UI regression checks passed. `./dev.sh test` completed its Rust-independent
source, migration/upgrade, security, browser and documentation checks, then
exited 127 because Rust/Cargo is not installed. Compilation, Rust unit tests
and live HTTP/FastCGI/cache/transform verification remain unperformed.
## 0.29.4 feature verification (2026-10-09)
The operator-requested follow-up adds reusable PHP-FPM profiles, fixes the
Web Server cache/transform bypass and supplies `HTTP_HOST` for authority-only
HTTP/2 and HTTP/3 FastCGI requests. Changes include Config serialization,
revisioned administration section and OpenAPI, Web Server browser modal,
route cache/transform pipeline and FastCGI parameter encoding. New Rust unit
tests cover profile resolution, detach, validation and HTTP_HOST; the Node UI
test exercises opening/editing a profile and attaching it to a service.
Rust compilation, proxy/PHP-FPM integration tests and performance acceptance
remain unverified without Rust/Cargo. Static contracts and browser tests are
run separately and do not substitute for production acceptance.
## Changes
@@ -48,6 +94,13 @@ This source package is not certified for production deployment.
Installer/update now installs /etc/logrotate.d/rustproxy using the recorded service user/group. Updates repair /etc/profile.d/rustproxy-path.sh rather than warning. logrotate uses copytruncate because RustProxy holds open log descriptors; some log records may be lost during truncate. Rust build and live Debian/systemd acceptance remain unverified in this environment.
## Version identity (0.29.3 source release)
## Version identity (0.29.4 source release)
`Cargo.toml` package version is the canonical release identity (now 0.29.3). Rust uses `CARGO_PKG_VERSION` at build time; `build.rs` substitutes the admin HTML placeholder. Packaging, upgrade and dev scripts read the manifest with `scripts/version.py`. Run `python3 tools/checks/version_contracts.py` to check that executable paths do not hardcode a version. Historical documentation and external dashboards may retain manually managed versions. Rust compilation/runtime verification is still pending.
`Cargo.toml` package version is the canonical release identity (now 0.29.4). Rust uses `CARGO_PKG_VERSION` at build time; `build.rs` substitutes the admin HTML placeholder. Packaging, upgrade and dev scripts read the manifest with `scripts/version.py`. Run `python3 tools/checks/version_contracts.py` to check that executable paths do not hardcode a version. Historical documentation and external dashboards may retain manually managed versions. Rust compilation/runtime verification is still pending.
## Shared PHP-FPM profiles and Web Server cache/transform/Host patch (0.29.4)
- Added a revisioned `php_fpm_profiles` collection with per-Web-Service `php_profile_id`, preserving the local PHP configuration when a shared profile is attached/detached. Added profile editor modal, schema, Polish/English messages and browser regression test.
- Web Server vhost/location responses now pass the configured RustProxy cache, vhost response rules and transforms. Cache skips ineligible/private/`Set-Cookie` responses and handles cache hits, conditional requests and range requests. Filesystem/PHP requests are refreshed synchronously rather than using the reverse-proxy background revalidator.
- FastCGI always supplies `HTTP_HOST` when HTTP/2 or HTTP/3 omitted the ordinary `Host` header; existing explicit Host with port is retained. Added Rust regression tests for both paths.
- `bash ./dev.sh test`: all Rust-independent release, source, security, browser UI, documentation, migration and dependency checks passed; stopped at absent Rust/Cargo (exit 127). `bash ./dev.sh check` also stopped at absent Cargo (exit 127). Rust compilation, new Rust tests and live PHP-FPM/HTTP2/HTTP3 cache/transform verification remain unverified in this environment.
+10
View File
@@ -5,6 +5,16 @@ storage. A transformed identity representation is cached once and downstream com
is selected later for each client. Per-vhost and Docker-discovery transform opt-in remain
disabled by default even when the global engine is available.
## Web Server origins (0.29.4)
Static-file and PHP-FPM responses selected through Web Server vhost sources
use the same optional vhost transform stage as reverse-proxy backends.
The normal rules still apply: supported MIME/extension and response encoding,
known bounded body size, memory/concurrency limits, and `no-transform`
exclusions. Successful transformed representations are eligible for shared
cache storage under the original/derived cache privacy policy. Downstream
compression is still applied separately.
## Administration dashboard
The main **Transform** workspace reads `GET /api/transform` and exposes in-memory runtime
+10 -2
View File
@@ -30,7 +30,7 @@ The Web Service editor is split into stable configuration tabs so later features
- **MIME** - per-extension MIME overrides and fallback MIME type.
- **Cache & headers** - default `Cache-Control`, ordered cache rules and fixed response headers.
- **Delivery** - precompressed `.br`/`.gz` sidecars, forced-download extensions and Range/streaming information.
- **PHP-FPM** - Unix/loopback-TCP endpoint, executable extensions, connect/request timeout, bounded concurrency, Authorization forwarding, request/header/stderr limits, custom FastCGI parameters and controlled `PHP_VALUE` overrides.
- **PHP-FPM** - attach a shared PHP-FPM profile through the selector, open the profile-management modal to expand/edit/create profiles, or choose local configuration for all FastCGI tuning options.
- **Security** - symlink policy, request/response hardening summary and filesystem-confinement notes.
After the Web Service is saved, attach it under **Vhosts** by selecting `Web Server` and the service ID for the main source or a custom location.
@@ -191,7 +191,15 @@ The built-in table covers common HTML/CSS/JS/data formats, archives, images, aud
## Cache policy and Web Service headers
RustProxy still does **not** add a second object cache for local files. Static content uses filesystem/OS page cache, validators and normal HTTP client/intermediary caching.
For Web Server sources, filesystem/OS page cache still accelerates file reads, and
static files retain validators and normal browser cache headers. Additionally,
when global and vhost RustProxy caching are enabled, eligible Web Server
responses pass through the same shared HOT/COLD RustProxy object cache as
reverse-proxy origins. Cache policy requires an eligible GET/HEAD, public
freshness and response-side safety; `Set-Cookie`, `private`, `no-store` and
other ineligible responses are not stored. Vhost response-header rules and
transformations now run for Web Server responses before cache fill. PHP-FPM
responses are protected by these same rules.
A Web Service can define: