Compare commits

..
Author SHA1 Message Date
clawbot 8efd6339a6 README: what rproxy gives an app without waf (closes #386)
check / check (push) Failing after 2m29s
Adds a paragraph to "What it does" listing what rproxy enforces with
default settings whether or not waf answers: malformed requests, methods,
header size, request and response times, body sizes, idle connections.
After the list, it says which header limits are waf's.

Removes the "Slow and oversized requests" bullet, which the new list
states with figures.

Model: opus-5-5
2026-11-14 19:11:02 +01:00
clawbot 89a60cf9fc README: blocks misbehaving scrapers, not normal ones (closes #387)
check / check (push) Failing after 5m11s
The opening now lists what bans a client with the default settings: the
rate and byte limits, a probe for a secret path, a security scanner's
user agent, and the refusal limit. A scraper that does none of these is
left alone.

Model: opus-5-5
2026-11-14 18:56:10 +01:00
clawbot a05a82b1af Docs: rproxy runs behind any TLS-terminating reverse proxy (closes #388)
check / check (push) Failing after 2m26s
README, SPEC and docs no longer present traefik as the required front
proxy, and call it the TLS-terminating proxy. The README section of that
name lists what the proxy must do: forward plain HTTP to port 8080, keep
Host, set X-Forwarded-For and X-Forwarded-Proto, close an unused
connection in under 120 seconds, and connect from an address in
SWW_RPROXY_TRUSTED_PROXIES. traefik, Caddy and nginx appear as examples,
with the Caddy and nginx settings their defaults lack.

Model: opus-5-5
2026-11-14 18:41:10 +01:00
+34 -4
View File
@@ -2,7 +2,20 @@
`smallwebwaf` is an MIT-licensed web application firewall, written in Go by `smallwebwaf` is an MIT-licensed web application firewall, written in Go by
[@sneak](https://sneak.berlin), for self-hosted web apps. It refuses the [@sneak](https://sneak.berlin), for self-hosted web apps. It refuses the
requests of scrapers, scanners and other abusers before they reach an app. requests of misbehaving scrapers, scanners and other abusers before they reach
an app.
With the default settings, a client is banned when it does any of these:
- makes more than 120 requests in a minute, 1500 in an hour or 6000 in a day;
- moves more than `50G` of request and response bodies in an hour, or `100G` in
a day;
- asks for a secret or backup file, such as `/.env` or `/.git/config`;
- sends a user agent that names a security scanner, such as `sqlmap` or `nikto`;
- has more than 30 requests in a minute refused as probes or attacks.
A scraper that does none of these is left alone. A scraper that waits 15 seconds
between requests stays under the rate limits.
## What it does ## What it does
@@ -22,7 +35,26 @@ shipped in one image, with two commands that do this together:
The site keeps answering while `waf` is down, slow or restarting: without an The site keeps answering while `waf` is down, slow or restarting: without an
answer in time, `rproxy` passes the request to the app. answer in time, `rproxy` passes the request to the app.
It protects against: `rproxy` also protects the app on its own, whether or not `waf` answers. With
the default settings, `rproxy`:
- answers `400` to a malformed request, such as a broken header line or a
missing `Host`;
- answers `405` to a method it does not pass on, such as `TRACE`;
- answers `431` to a request line and headers over 32 KiB together;
- gives the visitor 60 seconds to send the request line and headers, and then 60
seconds more for the whole request to reach the app;
- answers `413` to a request body over 100 MiB;
- gives the app's answer 30 minutes to reach the visitor, counted from the end
of the request;
- answers `502` in place of an app's answer whose body is over 1 GiB, or cuts it
off if it has started;
- closes a kept-open connection after 120 seconds idle.
`rproxy` does not limit the number of headers. `waf` limits the number of
headers and cookies, and the length of the request line and of each header line.
Together, `rproxy` and `waf` protect against:
- Scrapers that fetch every page of a site, all day. Each client gets a limit on - Scrapers that fetch every page of a site, all day. Each client gets a limit on
requests and on body bytes per minute, per hour and per day. The defaults requests and on body bytes per minute, per hour and per day. The defaults
@@ -44,8 +76,6 @@ It protects against:
limit, so that they are banned sooner; limit, so that they are banned sooner;
- refuse or limit clients on a blocklist, a DNS blocklist, or with a high - refuse or limit clients on a blocklist, a DNS blocklist, or with a high
AbuseIPDB score. AbuseIPDB score.
- Slow and oversized requests. Every request and every answer has a time limit
and a size limit.
For the operator, it: For the operator, it: