WxServer

Server
Download

Overview

WxServer is a web server and gateway for production deployments. It provides static content delivery, reverse proxying and load balancing, TLS, a WAF, caching, compression, TCP/UDP proxying, certificate automation, metrics and logging. Capabilities are organized as modules; the built-in set covers common production requirements and is enabled or adjusted through configuration files or the management console.

Supported platforms are Linux, FreeBSD, OpenBSD/NetBSD, macOS and Windows. The installer places the program, configuration templates, the default site tree and error pages, and registers the system service. The management side provides a web console and a REST API; configuration is validated before saving and applied by seamless reload. The software is free of charge, with no license keys, paid tiers or feature gating.

At a glance

  • Configuration follows familiar web-server conventions: sites, location matching, upstreams, rewrites, variables; one site per file
  • Static files, reverse proxy, FastCGI, SCGI, UWSGI, gRPC, WebSocket and TCP/UDP stream proxying
  • TLS with SNI, mTLS, session resumption, HTTP/2 and HTTP/3 (QUIC)
  • Automatic ACME issuance and renewal, including wildcards through DNS-01
  • WAF with a SecRule/CRS rule engine (imports OWASP CRS) and a lightweight engine; CC protection, rate limits, IP allow/deny, Basic/JWT authentication, signed URLs
  • Brotli, zstd and gzip; in-process proxy cache; image thumbnails and MP4 pseudo-streaming
  • Prometheus metrics, status page, OpenTelemetry traces, structured access and error logs
  • Web console and REST API; multiple administrators, TOTP two-factor authentication, login protection
  • Master/worker privilege separation; Linux, FreeBSD, macOS, Windows

Core capabilities

The following sections summarize the main capability areas. Each is implemented as one or more modules.

HTTP and content handling

  • Static file serving: conditional and range requests, zero-copy transmission for large files, directory indexing, error pages
  • Path matching: exact, prefix, regex and nested; try_files, internal redirects, named locations
  • Content rewriting: request and response header handling, body substitution and concatenation, charset, SSI, HTML/CSS minification

Reverse proxy and load balancing

  • Upstream protocols: HTTP/1.1, HTTP/2, gRPC, FastCGI, SCGI, uWSGI, memcached, WebDAV
  • Load balancing: weighted round robin, least connections, ip_hash; weights, passive ejection, active HTTP/TCP health checks, keepalive and session persistence
  • Runtime upstream add/remove without reload; mirrored traffic and proportional splitting

TLS and certificates

  • Protocols: HTTP/2, HTTP/3 (QUIC), TLS 1.2⁄1.3; QUIC shares the port with TCP and is advertised through Alt-Svc
  • Certificates: SNI with multiple certificates, mTLS, session resumption, optional kTLS backend
  • ACME: automatic issuance and renewal over HTTP-01 and DNS-01 (wildcards), with Cloudflare, Alibaba Cloud DNS, Tencent Cloud DNSPod and Route 53 support

Security

  • WAF: SecRule/CRS rule engine (imports the OWASP Core Rule Set, including libinjection detection) and a lightweight engine; can be toggled per location
  • Access control: IP/CIDR allow and deny lists, Basic authentication, JWT (HS256/RS256/ES256 with remote JWKS), external authentication, signed URLs, referer validation
  • Traffic protection: CC protection, request and connection limits, request body limits, error-rate blocking, system overload protection
  • Process model: the master binds privileged ports, workers run with dropped privileges

Caching and compression

  • Proxy cache: in-process, with capacity limits, expiry policies, bypass rules and conditional requests; reports status through X-Cache-Status
  • Compression: brotli, zstd and gzip negotiated per client; precompressed files served directly; upstream gzip responses decompressed for clients without gzip support

Observability

  • Metrics: Prometheus format and a status page
  • Logs: structured access and error logs, remote log delivery, WAF logs
  • Tracing: OpenTelemetry; statistics by GeoIP and User-Agent dimensions

Built-in modules

Built-in and external modules share the same manifest/hook interface and can be enabled through configuration files or the console. The table lists the 47 built-in modules shipped with the product (excluding the shared library).

Area Module Function
HTTP and content http_staticfile Static file serving
HTTP and content http_rewrite Rewrites, returns and internal redirects
HTTP and content http_headers Request and response header handling
HTTP and content http_charset Response charset
HTTP and content http_addition Append files before or after the response body
HTTP and content http_sub Response body substitution
HTTP and content http_concat Response concatenation
HTTP and content http_ssi Server-side includes
HTTP and content http_minify HTML/CSS minification
HTTP and content http_empty_gif 1x1 transparent GIF
HTTP and content http_browser User-Agent browser policy
HTTP and content http_userid Anonymous user identifier cookie
HTTP and content http_nchan Long-lived message push
Proxy and upstream http_proxy Reverse proxy and load balancing
Proxy and upstream http_fastcgi FastCGI upstream
Proxy and upstream http_scgi SCGI upstream
Proxy and upstream http_uwsgi uWSGI upstream
Proxy and upstream http_grpc gRPC proxy
Proxy and upstream http_memcached memcached upstream
Proxy and upstream http_mirror Mirrored traffic
Proxy and upstream http_stream TCP/UDP stream proxying
Proxy and upstream http_mail Mail proxy (IMAP/POP3/SMTP)
Proxy and upstream http_mp4 MP4 pseudo-streaming
Proxy and upstream http_image_thumb Image thumbnails
Proxy and upstream http_upload File upload handling
Security http_waf WAF request inspection (SecRule/CRS and lightweight engines)
Security http_access IP/CIDR access control
Security http_auth_basic HTTP Basic authentication
Security http_auth_jwt JWT authentication
Security http_auth_request External request authentication
Security http_secure_link Signed URL validation
Security http_referer Referer anti-hotlink
Security http_realip Client IP from trusted proxies
Security http_limit Request and connection limits
Security http_error_guard Error-rate blocking
Security http_sysguard System overload protection
Security http_security_headers Security response headers
Compression http_gzip Gzip compression
Compression http_gunzip Decompress upstream gzip responses
Compression http_brotli Brotli compression
Compression http_zstd Zstandard compression
Observability and management http_accesslog Access logging
Observability and management http_logsink Remote log delivery
Observability and management http_metrics Prometheus metrics
Observability and management http_otel OpenTelemetry tracing
Observability and management http_stub_status Status page
Observability and management http_geoip GeoIP lookup

External modules are delivered as native dynamic libraries (.so on Linux and FreeBSD, .dylib on macOS, .dll on Windows) and are loaded through a stable C ABI, with optional SHA-256 pinning and Ed25519 signature verification. Placing a module in the module directory and registering it in configuration is sufficient; the main program does not need to change.

Performance

Measured on a 16-core / 31 GiB host with the client on the same machine, concurrency 64, static file size 129,648 bytes:

Scenario Result
Small static files 400,000+ requests/second
FastCGI dynamic requests about 186,000 QPS
WAF lightweight engine overhead about 6% over WAF off
WAF with the full CRS rule set five-digit QPS
Resident memory tens of megabytes

Deployment and operations

  • Installation: the package places the program, configuration, default site, error pages and log directories; --service install adapts to systemd, OpenRC, SysV, rc.d, launchd and Windows SCM
  • Validation: wxserver -t checks the configuration before it is applied; the console performs validation and reload on save
  • Management: the web console covers sites, upstreams, stream listeners, certificates and ACME, WAF, logs, modules and settings; the REST API exposes the same operations
  • Access control: the management listener defaults to loopback, source CIDR allowlists are enforced, multiple administrators, bcrypt password hashes and TOTP two-factor authentication are supported, and failed logins are throttled per IP with a captcha

Platform support

The platforms below run natively and can register as system services directly after installation.

Platform Execution Service management
Linux Native, master/worker privilege separation systemd / OpenRC / SysV
FreeBSD Native rc.d
OpenBSD / NetBSD Native rc.d or pid file
macOS Native launchd
Windows Native (AMD64 / ARM64) SCM

License

WxServer is free to use. No license keys, paid tiers or per-feature licensing are required.

Docker container deployment

oupula/wxserver:latest
80/tcp, 443/tcp, 443/udp, 9090/tcp
/etc/wxserver, /var/wxserver, /var/log/wxserver
docker run -d --name wxserver \
  -p 80:80 -p 443:443 -p 443:443/udp \
  -p 127.0.0.1:9090:9090 \
  -v /etc/wxserver:/etc/wxserver \
  -v /var/wxserver:/var/wxserver \
  -v /var/log/wxserver:/var/log/wxserver \
  oupula/wxserver:latest
services:
  wxserver:
    image: oupula/wxserver:latest
    container_name: wxserver
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
      - "443:443/udp"
      - "127.0.0.1:9090:9090"
    volumes:
      - /etc/wxserver:/etc/wxserver
      - /var/wxserver:/var/wxserver
      - /var/log/wxserver:/var/log/wxserver