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.

Stars on GitHubOpen-source repositoriesApache 2.0 main projectLinux / Windows

SamWaf Tools · Online Toolbox

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.

Image compress & mergeJSON formatterBase64URL encode/decodeTimestampHashPassword generatorCode diffQR code
Open the toolbox
Featured

Two flagship projects

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.

GoApache-2.0Stars on GitHubLinux / Windows
  • Protection against SQL injection, XSS, CC attacks, scanners and malicious bots
  • OWASP CRS rule set built in, plus custom rules and allowlists
  • Visual console: sites, certificates, logs and statistics on one screen
  • Automatic SSL certificate issuance and renewal, HTTP/3 support
  • Attack logs stored encrypted locally, sensitive fields masked automatically

RemoteKnown

github.com/samwafgo/RemoteKnown

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.

Go + ElectronMITStars on GitHubWindows 10 / 11
  • Four-way detection across processes, windows, ports and sessions
  • Covers ToDesk, Sunlogin, Windows Remote Desktop, UU Remote and more
  • Full audit trail of session start, end and duration
  • Desktop notifications, tray status, Feishu / DingTalk alerts
  • Detection rules decoupled from the app — update and roll back independently
Open Source

Other open-source projects

A collection of small, practical tools built around security and operations. All source code is public on GitHub.

SamWafWeb

Firewall console (Vue 2)

SamWaf's visual console, built with Vue 2 and TDesign — site configuration, rule editing and attack log views.

VueApache-2.0View →

SamWafWebVue3

Console rewrite (Vue 3)

The next generation of the console on Vue 3 + Vite + TypeScript: faster page loads and stronger typing.

Vue 3Apache-2.0View →

cap_go_server

Human verification server

A native Go implementation of the Cap human-verification protocol, based on SHA-256 proof of work. No tracking, no fingerprinting, no data collection.

GoApache-2.0GitHubView →

SamWafBotIPDatabase

Crawler & callback IP dataset

IP ranges for major search engine crawlers and payment platform callbacks, so you can allowlist them quickly on a locked-down network without blocking legitimate traffic.

DatasetApache-2.0GitHubView →

SamWafIpMonitor

Outbound port monitor

A small utility that watches outbound access to ports 80 and 443 from your own machine, surfacing connections that shouldn't be there.

C#WindowsGitHubView →

SamWafWinEvent

Windows event alerts

Watches specific Windows system events and pushes a WeChat template message when one fires — handy for unattended machines.

C#Apache-2.0View →

proxy_protocol_tester

Proxy Protocol tester

Verifies that a Proxy Protocol implementation behaves correctly, for debugging real client IPs lost behind layers of reverse proxies.

GoView →

pg-maint

Portable PostgreSQL maintenance

Maintenance tool for portable PostgreSQL installs: run several versions side by side on one machine and start, stop, back up and switch from one place.

ScriptsWindowsView →

JSBeautifier

JavaScript beautifier

A Go implementation of a JavaScript beautifier that turns minified scripts back into readable code for front-end debugging.

GoView →

BatchJarSource

Batch jar audit helper

A batch decompilation helper for your own Java projects, intended for security audits of code you legally own. Use it only within your authorization — never for unlawful purposes.

GoAuthorized use onlyView →

simpleServer

Minimal static file server

A one-command static file server for local debugging and quick file sharing.

GoApache-2.0View →

docs

Documentation site source

Source of the official SamWaf documentation site — bilingual manuals, installation guides and FAQ.

MDXMITView →
Dev Journal

Development journal

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
  • Enhanced scanner detection (expanded fingerprints, case-insensitive User-Agent matching)
  • 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
Stay in Touch

Follow & contact

Releases, feature write-ups and security practices go out on the WeChat account first. Questions are welcome by email.