v0.34.0_1

This commit is contained in:
Mateusz Gruszczyński committed 2026-10-17 20:34:13 +02:00
1 parent 9b3d6731cc
commit 00f29f92c8
68 files changed
+2599 -513

No files matched your search

+34 -1
View File
@@ -99,12 +99,45 @@ The Web Service editor is split into stable configuration tabs so later features
- **.htaccess** - bounded migration-oriented Apache compatibility, recursive scan and strict-mode behavior.
- **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.
- **Delivery** - opt-in Linux `sendfile`, precompressed `.br`/`.gz` sidecars, forced-download extensions and Range/streaming information.
- **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.
### Optional native Linux sendfile (0.34.0 source candidate)
Set **Web Server -> Edit service -> Delivery -> Linux sendfile** to **Auto**
(or `web_services[].sendfile: "auto"`). The default is `"off"` for full
backward compatibility. This option changes only transport; switching it
never invalidates the HOT or COLD object cache. No database migration is needed.
**Platforms other than Linux (FreeBSD, OpenBSD, NetBSD, DragonFly BSD, macOS and Windows):** `sendfile: "auto"` is accepted as configuration but does **not** activate kernel zero-copy in RustProxy 0.34.0. The Linux-specific bridge is compiled only on Linux; on other targets ordinary Tokio `ReaderStream`/Hyper streaming serves the exact file content, including HEAD, ranges, validators, PHP and existing authorization/cache policies. `"off"` and `"auto"` behave the same on those targets. This describes the `sendfile` feature only and is **not** a claim that the entire application currently passes a cross-platform compile/test suite. FreeBSD/macOS native `sendfile` and Windows `TransmitFile` require separate implementations and runtime tests; Linux `libc::sendfile` cannot be reused directly.
The kernel `sendfile(2)` bridge is selected **only** if all conditions hold:
- Linux, plain TCP **HTTP/1.1** (no TLS, HTTP/2, HTTP/3 or QUIC);
- static **GET** of an already-constrained file, full **200 OK** response;
- file at least **64 KiB**, exact `Content-Length`, no `Range`/`If-Range`;
- no negotiated compression/precompressed variant, response transform or
object cache participation, and no rewritten content/encoding headers.
The file descriptor is duplicated from the already-authorized confined open
file (not re-resolved by path), then attached to a bounded HTTP/1.1 TCP
connection bridge. The bridge sends the physical file bytes using Linux
`sendfile(2)` and never sends the internal marker bytes to the client. If
conditions are not met, RustProxy uses the existing stream/counters unchanged.
Only new cleartext connections pick up a newly enabled adapter; this option
does not change the listener protocol configuration.
**Release acceptance:** This source candidate has not been compiled or
tested against a running 0.34.0 RustProxy binary in the current environment.
The included Rust unit/integration test and real-network test cases must pass
on a Linux build worker before enabling in production. Sendfile cannot by
itself close the small-response gap to nginx. See
`docs/TEST_REPORT_0.34.0.md` and
`scripts/performance/simulate_nginx_gap_034.py`.
### Intercept application HTTP errors (0.29.7)
Open **Vhosts → Edit vhost → Pages** (not the Web Service PHP tab), enable