Open source · Self-hosted · Data never leaves your machine
Security tools you actually own
This is the official SamWaf site, and where its development journal and open-source projects live. We build lightweight, self-hostable security tools with the source in the open — a web application firewall, remote-control detection, human verification. All free, all open source.
A set of developer utilities that run entirely in your browser. Every calculation happens on your own machine — nothing is uploaded to any server. Use it online, or copy the folder into an air-gapped network and run it offline.
One guards the door to your website, the other guards your desktop. Both run offline; neither uploads anything.
SamWaf · Web Application Firewall
github.com/samwafgo/SamWaf
A web application firewall for independent site owners, studios and small teams. Single binary, works out of the box, fully self-hosted, data encrypted on disk — and by default it needs no MySQL, Redis or any other third-party service.
Local remote-control detection and audit for your own machine. Know whether — and exactly when — someone is remotely controlling your computer. Detection and records stay on the device; nothing is sent to any server.
Recent release notes. The journal archive includes the full history and contributor credits.
20268 releases
v1.3.25-beta.911 changes
Fixed
Website password access blocks are attributed to the corresponding authentication rule in access logs, making rule-based searches and troubleshooting clearer.
Notice
Access log export is now a background task with JSONL / CSV / encrypted SQLite [Notice]
Temporarily ban IPs with custom rules [Check]
The IP blacklist is WAF-layer only; system-layer blocking lives on the Firewall IP Block page [Notice] details
Firewall IP blocks are no longer tied to a website, and whole-network blocks are rejected [Notice] details
Website Excel import supports all integer widths [Check]
Website access diagnostics added to the site list [Check]
Setup guidance when application management is disabled [Check]
Per-entry enable switches for IP/URL black- and whitelists [Check]
Search access logs by URL keyword [Check]
Customize a shared admin title [Check]
v1.3.25-beta.840 changes
Added
Website password access can protect only specified paths, exclude specified paths, and use a password-free IP group.
Website health checks can be tested before saving, with probe results for each backend. Testing does not save the configuration or change runtime health status.
Requests that match no website receive a setup guidance page. A dedicated global page can be edited under Custom Blocking Response Pages > Unmatched Website Response; the HTTP status remains 403.
Fixed
Saving changes to the health check toggle or probe settings resets the status immediately. Disabling shows "Check off"; re-enabling starts from "No data yet".
Character-aware truncation of ServerChan notification titles and content improves message delivery compatibility.
Management API query parameter names now match the documentation in lower case. SSL certificate creation and renewal accept only http01 or dns01 for apply_method, with a clear response for invalid values.
IPv6 client address parsing in tunnels.
Requests blocked during a CC ban are recorded and can be found using the visit identifier on the blocking page. Deleting a website also removes its associated CC rules.
Failure counters and ban record reads when using Redis cache.
Improved
Human verification captchas and behavior checks.
Website configuration adds origin Host examples for Pass Backend Domain (hidden by default; click the help icon on the left to expand), clarifying that off preserves the visitor's Host and on uses the backend domain. The manual also explains how to pass the original visitor domain to the application with the custom request header X-Forwarded-Host: ${host}. Thanks to @hlwen (issue #869).
Notice
Back up your configuration, databases, and data/.keys. Log storage supports tiers and monthly archives. If cleanup is enabled, review retention for each tier; expired archives are recycled by partition.
Source and Path Analysis summaries accumulate after upgrading, without historical backfill. Excluding normal requests from logs by IP still counts their traffic bytes in traffic statistics.
If you use the API, check query parameter casing and the SSL certificate validation method values in your integration.
Per-port protocol selection - port 80 is no longer forced to HTTPS by the SSL switch [Important · Notice] details
CC protection is now rule-based, and a rate-mode threshold inconsistency is fixed [Important · Check] details
Check whether the console trusted proxy ranges are set too wide [Important · Check] details
Log archives are now cut per month and expired by dropping whole partitions (MySQL/PostgreSQL archive tables start being recycled) [Important · Notice] details
API query parameter names are now all lower case [Important · Notice] details
Setup guidance and a global custom page for unmatched websites [Check]
Crawler verification now includes a forward DNS confirmation, and CC rules can exempt verified crawlers [Check] details
Human verification settings are no longer hidden behind the switch, and the exclude list is renamed [Check] details
CC rules with the Human verification action no longer re-challenge visitors who already passed [Check] details
New Emergency mode - one click to put every visitor behind a human verification [Notice] details
Notification channel Webhooks can now reach intranet alerting platforms when declared in config.yml [Notice] details
Website password access gains session lifetime and online session management; auth now uses the real visitor IP [Notice] details
A single failed cache read no longer forces a new login when Redis is used [Notice] details
Oversized payloads are truncated on write, plus new access-log indexes for IP and rule lookups [Notice] details
Payloads move to their own table, and switching the IP tag location now merges the history [Notice] details
Tiered log storage, an IP watchlist, and time-ranged log export [Notice] details
New Source and Path Analysis page, viewing traffic by origin and by path [Notice] details
Exclude log recording by source IP, keeping office exits and probes out of the logs [Notice] details
No more picking a partition - the time range decides where to look, and a visit identifier is looked up across all of them [Notice] details
Requests blocked during a CC ban can be looked up by visit identifier [Notice] details
Test website health checks before saving [Notice] details
Site password access can now protect only specific paths, with a password-free IP group option [Notice] details
SSL certificate orders via API accept only http01 or dns01 as apply_method [Notice] details
Health check status now resets immediately when its settings change [Check]
Website groups added to the list, with group filtering and bulk move [Notice] details
Unified Access credentials are now scoped per site [Notice] details
v1.3.2445 changes
Notice
The default release package no longer bundles GeoLite2-Country.mmdb (the IPv6 geo database)
The central-management feature has been removed
Added
Per-site switch for outbound HTTP/2
Unified access authentication
Host brute-force protection for remote access
CDN origin IP ranges
Threat intelligence IP subscription
Wildcard resolution support in IP allowlist/blocklist
IP groups, bindable to IP allowlists, IP blocklists, and custom rules
Scheduled batch import for IP groups
Custom notification frequency and custom message templates
Custom webhook notification channel
Website nickname column in the log list
Pop-up reminder at the bottom-right corner when logging in from a different IP
Run diagnostics for troubleshooting CPU/memory usage
Local CA certificate management for the console, merged with the console access configuration
Upgrade notes: important changes of the new version are shown in the product after upgrading
Dashboard cards with same-period-yesterday comparison and live QPS trend
Per-site response buffering switch
IP Policy Match Lookup
SSL certificate export
Fixed
Skipping HTTPS certificate verification did not work when proxying HTTP to HTTPS
IP list rules moved to another site left stale cache on the old site
Priority between global rules and per-site rules did not take effect
SQL query error in site overview statistics
Log page preference and navigation issue
Windows service upgrade failed to replace files automatically with an "access denied" message
Allowlist rule issue in unified access authentication
HTTP3 did not take effect immediately after being enabled
Duplicate system firewall entries from threat intelligence IPs
HTTP-based certificate application failed in specific situations
AI assistant replies not working, plus several usability improvements
Version check timeout in fully intranet environments
Interrupted responses from large language model APIs
Incomplete traffic byte statistics
Custom blocking page content priority issue
Real IP source configuration was not saved
Improved
Host maintenance moved from the top navigation to the default left navigation
Clicking the version at the bottom-left corner now shows version details useful for feedback
Threat intelligence IPs support a false-positive exclusion list
Detailed logs for SSL certificate application to ease troubleshooting
SSL expiry check can be configured whether to auto-sync host domains
Security
Overall security hardening of the WAF and detection layers
Overall security hardening of the console
v1.3.232 changes
Fixed
On a fresh installation running as a service (Windows service / systemd), the initial password file initial_password.txt was written to the wrong directory due to a relative path and could not be found under the install directory; it is now always written to data/ under the install directory
Improved
The random initial password generated on a fresh installation is now also printed to the log, so it can be retrieved under service mode where no console is visible (this password is a one-time credential and must be changed immediately on first login)
v1.3.2210 changes
Added
Rules gain several generic command patterns that work alongside other built-in defense rules, plus rule content generation via a direct AI model connection
Database support for PostgreSQL
Batch import of nginx configurations
Fixed
Detection was limited to only the utf-8 and gbk encodings
Incorrect latest-access time in the MySQL risk log list
Abnormal display when initializing the IP database
Firewall not working properly in Docker environments
SamWaf v1.3.21 failing to start on lightweight Windows (LTSC) due to the missing NUL null device
Program exception caused by the first certificate application not being applied correctly
Improved
Layout optimization for the parameter configuration page
Releases, feature write-ups and security practices go out on the WeChat account first. Questions are welcome by email.
WeChat Official Account
Scan the code, or search SamWaf开源防火墙 in WeChat, for release notes, guides and security practices.
Email
Usage questions, bug reports and security disclosures are all welcome. For security issues, please put "Security" in the subject line and we will prioritise it.