Skip to content

splitter/0.2.0

Latest

Choose a tag to compare

@qobil7681 qobil7681 released this 11 Sep 09:38
e0b4c80

Splitter grows from a Stream / Reverse Proxy manager into a full control plane for nginx: reusable Snippets, path and method routing, Docker and Swarm backends that follow your containers in real time, Let's Encrypt, log rotation with searchable history, and live nginx metrics.

✨ Added

Snippets page (admin, #19, #10). Reusable settings as named items, one section per kind, picked from a single Snippets block on the mapping form and from every custom location row:

  • Rate limits — connections per client IP, download / upload rate. Now applied to Reverse Proxy mappings too (limit_conn, limit_rate), not only Stream.
  • Timeouts — proxy and connect timeouts, rendered for both mapping kinds.
  • Log formats (#19) — custom log_format bodies with presets (including JSON), stream or http context, variable chips and a live preview.
  • Error pages — uploaded pages are now served by nginx on a mapping (proxy_intercept_errors + error_page), not just used by the dashboard.
  • Config snippets (#10) — raw nginx directive blocks written as include files, with presets (security headers, gzip, CORS, static caching, Cloudflare real IP and more).
  • Log rotation policies — keep N days, gzip, optional size trigger.
  • Editing any snippet re-applies every mapping that uses it under nginx -t protection; a snippet in use cannot be deleted.

Path and method routing (Reverse Proxy, #6). Each custom location can use its own backend pool and be limited to specific HTTP methods, for example /api GET on the main pool, POST/PUT to a write node, DELETE to a third. Several rows may share a path; a / row splits the whole site by method. Location hosts go through the same DNS check as the main pool.

Logs with history (#21, #5). Per-mapping logs are rotated daily by logrotate (dated, gzip, retention per mapping or a global default), run from Splitter every hour with nginx -s reopen. The Logs page adds a time-range search across the live file and every rotated archive, a Files & rotation list with per-archive downloads, default retention settings and a Rotate now button.

Docker and Swarm backends. A Docker page lists running containers or Swarm services and adds them to a pool by name. A background reconciler plus a real-time Docker events watcher re-render and reload a mapping the moment a container is recreated, stops, or changes health. Docker-managed mappings get their own list.

Let's Encrypt. Request certificates via certbot (HTTP-01) from the SSL page with automatic background renewal, alongside upload and self-signed.

Monitoring (#22). Live nginx stub_status counters (active, reading, writing, waiting connections, requests and connections per second) on the Monitoring page and in the Live Map header, from a loopback-only status endpoint Splitter provisions itself.

Port scanner (#24). An nmap-based port scanner on the Tools page (connect, SYN, UDP, host discovery, version detection, CIDR and range targets) with a pure-Python fallback when nmap is missing.

Accounts and UX. A read-only viewer role (#20). Info tooltips on every mapping-form option, starting with the load-balancing method (#23). A collapsible, drag-to-reorder sidebar. Custom error-page middleware for the dashboard's own errors. Log-file downloads.

🔁 Changed

  • Docker volumes consolidated to splitter_data (/var/lib/splitter) and splitter_nginx (all of /etc/nginx); see Upgrading.
  • Mappings and Interfaces are split into dedicated pages: Stream / Reverse Proxy tabs, and Sub-interfaces / Network.
  • The mapping form no longer has inline rate-limit, timeout, log-format or error-page fields; those are snippets now. Mappings saved before this keep their inline values until re-saved, and the form says so.
  • Reverse-Proxy-only fields are hidden while building a Stream mapping.
  • Error Pages moved from its own page into the Snippets page.
  • Preview on the Reverse Proxy form renders the real HTTP server block (routing, snippets, error pages) instead of the stream block.
  • The /api/health rollup is bounded by a hard deadline instead of the slowest probe.
  • OWASP CRS is fetched with curl during the image build, and the full Perl package is dropped.
  • Branding is simply "Splitter".

🐛 Fixed

  • X-Forwarded-Proto carried the wrong scheme; doomed "New Proxy" saves are now blocked up front.
  • Forward-proxy nginx variable names broke on hyphenated names.
  • Users page could be permanently invisible (it was nested inside the Map page), and page, row and stat content could get stuck invisible after transitions.
  • Live Map auto-fit did not recenter.
  • Missing mapping log directories are self-healed before nginx -t.
  • A sweep of the full API surface fixed several endpoint bugs (validation errors that returned 500, and role gaps).
  • Snippet pickers on location rows could sit disabled on "No snippets yet".

⬆️ Upgrading

Docker volumes changed. The compose file now uses two named volumes, splitter_data (/var/lib/splitter) and splitter_nginx (all of /etc/nginx), instead of splitter-data plus four nginx subdirectory volumes. Before docker compose up -d with the new file, copy your existing state across (the old volumes are left untouched):

docker volume create splitter_data && docker volume create splitter_nginx
docker cp splitter:/var/lib/splitter/. /var/lib/docker/volumes/splitter_data/_data/
docker cp splitter:/etc/nginx/.        /var/lib/docker/volumes/splitter_nginx/_data/
docker compose up -d --build

Then git pull and docker compose up -d --build, or sudo ./setup.sh --service on a native install. Two new dependencies, logrotate and nmap, are installed by both paths. Existing mappings keep working unchanged. On start, Splitter provisions the stub_status server block, exports error pages and snippet include files, and writes the log-rotation config automatically.

✅ Closed issues

Issue Feature
#24 Port scanner (nmap) on the Tools page
#23 Info icons / tooltips on the mapping form (load-balancing choice and every other option)
#22 nginx stub_status metrics on Monitoring and the Live Map
#21 Log viewing by date/time and per-mapping logrotate
#20 Users RBAC: read-only viewer role
#19 Log format snippets
#10 Reverse proxy config additions (config snippets, error pages, custom locations)
#6 Split per method (path and method routing)
#5 Logging (per-mapping logs, tail, download, search)

🔌 API additions

/api/snippets and /api/snippets/{ratelimit,timeouts,logrotate}, /api/log-formats, /api/config-snippets, /api/error-pages (now usable by every role for listing), /api/logs/<domain>/<port>/<kind>/{search,files}, /api/logs/rotate, /api/logs/rotation, /api/nginx/status and /nginx/status/provision, /api/tools/portscan, /api/docker/*, and Let's Encrypt actions under /api/ssl/certs. Mappings gained snippets and per-location backends, methods and snippets fields; the viewer role receives 403 on every write.