Files
RustProxy/docs/FEATURES.md
T
2026-11-24 23:16:54 +01:00

118 lines
13 KiB
Markdown

# Feature list
RustProxy is a single service that combines a reverse proxy, a static/PHP web server, certificate management, an HTTP cache and traffic monitoring, all managed from a browser panel or an API. Optional features are disabled by default; enable only what you need.
![Overview dashboard](images/overview.png)
## Reverse proxy
| Feature | Details |
|---|---|
| Vhosts | Exact and wildcard hostnames, aliases, several listeners per Vhost, per-Vhost HTTP/2 and HTTP/3 switches |
| Backends | HTTP and HTTPS origins, HTTP/1.1, automatic ALPN (H2/H1), strict HTTP/2 and H2C, optional upstream certificate verification with custom CA and server name |
| Load balancing | Least connections (default), round robin, least traffic, adaptive, random (two choices), consistent hash of path / URI / host / header / cookie / query parameter / client IP with optional bounded load, and IP hash; member weights, backup and draining members, sticky cookie or IP affinity; per-location backend groups with their own algorithm (HAProxy `use_backend` style); in-panel distribution simulator. Conditional routing: locations and whole-host rules selected by header, cookie, query parameter, method, client IP/CIDR, host or country (AND of conditions, negation, regex), with an in-panel routing tester. Header rules accept HAProxy-style variables (`%[srv_id]`, `%[location]`, `%[hash_key]`, `%[cache_status]`, …) with one-click diagnostic header presets. See [Load balancing](LOAD_BALANCING.md) |
| Health checks | Active TCP or HTTP probes with thresholds, optional separate probe port, expected response text and live health status per member |
| Connection reuse | Bounded keep-alive pools with idle and age limits, pool recycling and protocol telemetry |
| Custom locations | Prefix, exact and regex paths, path rewriting, per-location backends, Web Services, local responses, redirects and internal error fallbacks |
| WebSockets | HTTP/1.1 Upgrade, RFC 8441 (HTTP/2) and RFC 9220 (HTTP/3) Extended CONNECT |
| Forwarding headers | `X-Forwarded-*`, `Forwarded`, `X-Real-IP`, trusted proxy ranges, Cloudflare client IP and country |
| Redirects and pages | Redirect hosts, canonical host and HTTPS redirects, 404 hosts, custom error pages and direct-IP pages |
| TCP/UDP Streams | Layer-4 forwarding with backend pools, health checks, session limits and idle timeouts |
## Frontends and TLS
- HTTP/1.1, HTTPS with HTTP/2, optional HTTP/3 (QUIC) with `Alt-Svc` management, configurable UDP buffers and QUIC keep-alive for long requests (only while a request is in progress, or always).
- Named listeners with per-listener protocols; Vhosts bind to listener IDs.
- TLS 1.2/1.3 policy with cipher-suite allowlist and per-Vhost overrides.
- Optional hybrid post-quantum key exchange (X25519MLKEM768).
- SNI certificate selection, hot certificate reload without restart.
## Web Server
- Static sites and downloads served from reusable **Web Services** shared by several Vhosts.
- Index files, optional directory listing, MIME mapping and attachment extensions.
- `try_files`, regex rewrites and a safe subset of Apache `.htaccess` rules.
- Conditional requests (`ETag`, `Last-Modified`), byte ranges, precompressed `.br`/`.gz` sidecars and optional Linux `sendfile`.
- Symlink policy, attack-probe blocking and header hardening presets.
- PHP through external PHP-FPM with shared profiles, per-application pools and resource limits.
- Presets for single-page apps, WordPress and Roundcube.
![Web Server editor](images/web-server.png)
## Certificates
- Self-signed certificates, PEM import and externally managed certificate paths (for example Certbot).
- Managed ACME with HTTP-01 and DNS-01 (Cloudflare, OVH, RFC 2136), automatic renewal, on-demand check, forced renewal (panel, API, `tls renew --force`) and job history.
- Certificate inventory with expiry, coverage check and bulk assignment to Vhosts.
- Restricted certificate API keys for deploy/reload from external systems such as OPNsense.
- Prometheus metrics for the expiry date and remaining days of every installed certificate, ready for alerting.
![Certificates](images/certificates.png)
## Access and security
- IP/CIDR and DNS/DDNS allow/deny rules, reusable ACL profiles (up to eight per Vhost).
- Country allow/deny lists with automatic GeoIP database updates and a searchable country picker in global and Vhost security settings.
- Request rate limiting per Vhost and globally, with burst and `Retry-After`.
- HTTP method policy, request Content-Type denylist and User-Agent blocking.
- Security headers: HSTS, CSP, X-Frame-Options, Referrer-Policy, Permissions-Policy, `nosniff`.
- HTTP Basic authentication with Argon2 hashes and brute-force limits.
- Forward Auth with Tinyauth, Authelia and authentik; OIDC (Authorization Code + PKCE) with Authelia, authentik, Pocket ID and compatible providers.
- Fail-closed authentication errors, identity header stripping and private/no-store responses for authenticated content.
- Protection against private/loopback/control-plane upstream destinations unless explicitly allowed.
## Cache and delivery
- Shared HTTP cache with a memory tier (HOT) and an optional disk tier (COLD).
- RFC 9111 freshness, validators and `Vary` with conservative header-aware normalization (known comma-list fields, language/encoding/charset qualities and media types), while preserving opaque values and quoted strings; stale-while-revalidate, stale-if-error and request coalescing. Configurable static-extension exception for cookie-independent assets: omit `Vary: Cookie` only for explicitly public cacheable responses, preserving all other Vary dimensions. A central [cache decision](CACHE.md#cache-decision-precedence-explicit-pass-and-public-static-assets) separates security bypasses, explicit VCL `pass`, Cookie/session guards (`cookie_pass`) and backend properties, so public static assets can be HIT for logged-in users without weakening explicit pass rules; Cookie-bearing static fills are stored only when the backend reply is explicitly public.
- Varnish-compatible policy option, forced caching rules and per-location cache switches.
- Graphical [cache rules](CACHE.md#cache-rules-vcl-style) with global and per-Vhost precedence, terminal VCL pass/hash behavior, ordered safe request-header/cookie/query rewrites, vcl_hash variants, reversible rule-only no-store decisions, backend-response header edits before cache policy, and delivery header overrides; includes a shared, responsive two-section tester in global, ordinary vhost and Docker vhost editors, a scope-aware in-panel VCL guide, and a warning-reporting VCL subset importer. The exact VCL syntax, backend vs deliver `Vary`/header mutations and safety restrictions are listed in [VCL compatibility](VCL.md); the [traffic cookbook](VCL_TRAFFIC_COOKBOOK.md) includes ready-to-import examples and expected live request outcomes.
- RFC 9211 `Cache-Status` and optional `X-Cache` diagnostics.
- Purge and ban from the panel, the API or HTTP PURGE/BAN from allowlisted addresses.
- Live compression with gzip, Brotli, Zstandard and deflate.
- Optional minification of JavaScript, CSS, HTML, SVG and JSON with memory budgets.
![Cache](images/cache.png)
- Searchable **quick-rule template gallery** in global/Vhost/Docker cache editors: grouped ready-made session/privacy, CMS/framework, CDN/parent-cookie, API/GraphQL, public TTL, static assets and response-header scenarios. Risky cache-acceleration templates are disabled until reviewed; examples are documented in [Quick rules library](CACHE_TEMPLATE_LIBRARY.md).
- Separate disabled-by-default per-Vhost template for exact-name or single trailing-prefix (`SESS*`) removal of verified unrelated parent-domain cookies; unrelated/session cookies survive and the unchanged CDN template can independently strip CDN-only cookies or bypass remaining sessions. No automatic cookie Domain detection.
- CDN security-cookie template (Cloudflare and Akamai) that strips whole Cookie headers only when every cookie is allowlisted, with session/Authorization/path bypass; opt-in for verified public content. The [VCL support matrix](VCL_SUPPORT_MATRIX.md) documents supported and deliberately excluded constructs.
- **VCL subset only:** graphical rules are the canonical configuration. Partial imports require review; the VCL text shown in the editor is an approximate preview. Cache storage is restricted to HTTP 200 (non-200 responses can still receive deliver-header rules). See [VCL import](VCL.md).
## Monitoring and logs
- Overview dashboard with requests per second, bandwidth, status codes, completed-exchange error share, final-request cache hit ratio and outcomes, protocol mix, system load, backend health, requests rejected by limits and nearest certificate expiry.
- Optional **Memory breakdown** card: process RSS split into cache data, cache bookkeeping, cache buffers, allocator-held free memory, mapped files and the rest of the process, with glibc heap statistics and an "outside cache" trend for spotting leaks.
- Customizable dashboard layouts (drag-and-drop with a live drop placeholder, keyboard moves, per-block width, explicit gap filling), 18 built-in layouts and up to 16 saved presets per administrator.
- Per-Vhost, per-backend, per-Web-Service and per-Stream statistics.
- Live request log in the browser and in the terminal (`--livelogs`).
- Stored JSON access logs with search syntax, per-Vhost log files and an error log; source labels include configured domains and aliases (also Docker-generated sites, redirects and local 404 hosts).
- Prometheus exporter with token/CIDR protection, JSON metrics and a compact summary endpoint.
- Cache and Traffic scope selectors include Docker-generated Vhosts with readable container/domain/agent labels and a Docker-inventory fingerprint, even when the saved configuration revision is unchanged.
- Lightweight revision-aware polling views for Cache, Traffic and Transform keep the administration panel responsive without repeatedly transferring static configuration.
- Grafana dashboard and Nagios checks included.
![Live logs](images/logs.png)
## Operations
- Configuration stored in SQLite or in a JSON file, with validation before activation and hot reload.
- Headless mode without the panel: configuration from a read-only JSON file, catch-all `*` host, reload by `SIGHUP`/`systemctl reload` and a `/healthz` endpoint ([Headless mode](HEADLESS.md)).
- Headless HTTPS and Traefik-style operation: certificate files or directories (Certbot/acme.sh layouts) and automatic DV certificates with renewal (HTTP-01 or DNS-01 with Cloudflare, OVH, RFC 2136, wildcards), `acme.auto` for every vhost host, configured in a `"headless"` JSON section or on the command line; `--route HOST=URL` without a configuration file, `--force-https`, automatic reload on file changes (`watch`), forced re-issue of ACME certificates on demand (`rust-proxy --headless tls renew --force`) and a `/certificates` status endpoint ([Headless mode](HEADLESS.md#https-certificate-files-and-automatic-certificates)).
- Revision history with diff and one-click restore.
- Encrypted full backups and validated offline restore; encrypted Secret Store for credentials.
- Docker and Podman discovery through a separate agent: publish containers as Vhosts with one switch, one-time agent provisioning codes, publishing from container labels, multiple domains and certificate lists per agent, per-app HTTP Basic Auth, method policy, rate limit, country access, security and diagnostic headers, a searchable list of published apps, host and container diagnostics with history, authenticated agent process diagnostics and bounded inventory polling, Docker alerts, Prometheus host metrics and optional Docker Overview cards; the Grafana dashboard covers several RustProxy servers.
- Nginx Proxy Manager import with a dry-run plan.
- Managed install/update scripts with rollback, DEB/RPM packages, Docker image and an OPNsense plugin.
- Panel in English and Polish, light and dark themes, adjustable density and corner style, plus a default-on stable dialog position option for tabbed editors.
- Optional account-scoped semantic SVG icons for navigation, actions, tabs and dialogs; off by default.
## Administration and API
- Panel served on a separate, loopback-only listener by default; optional HTTPS for remote administration.
- Single administrator with Argon2 password, session revocation and CSRF/Origin protection.
- Complete REST API described by a bundled OpenAPI schema with Swagger UI at `/docs`.
- Scoped `ro`/`rw` API tokens bound to IP allowlists, and certificate-only API keys for ACME automation (for example the [OPNsense ACME client](../integrations/opnsense-acme/README.md)).
- Command-line tools for setup, configuration, certificates, backups and live logs.
See the [screenshots](SCREENSHOTS.md) for a visual tour and the [documentation index](README.md) for detailed guides.