[Open Source] A Lightweight, Open-Source Web Application Firewall with Fully Self-Hosted Deployment and Data Encryption

Open SourceProcess Management
2026-06-28 05:43 2 次浏览 • 0 次下载 0KB
[Open Source] A Lightweight, Open-Source Web Application Firewall with Fully Self-Hosted Deployment and Data Encryption

1. Project Overview

Image

An Open-Source, Lightweight Web Application Firewall

SamWaf is an open-source, lightweight web application firewall that supports fully self-hosted deployment.

SamWaf is a free, lightweight web application firewall designed for small businesses, studios, and personal websites. It supports fully self-hosted deployment, encrypts data and stores it locally only, offers one-click startup, and supports Linux and 64-bit Windows.

2. Open Source License

Licensed under Apache-2.0

3. Screenshots

Interface

Image

Add Host Attack Logs
Image

Image

CC IP Blacklist
Image Image
IP Whitelist LDP
Image Image
Add Rule Script Logs Select Log
Image Image
Log Details Manual Rules

Image

Image
URL Blacklist URL Whitelist
Image Image

4. Feature Overview

Development Motivation:

  • [Lightweight] In the early days, I used several products that provided protection through plugins built on Nginx, Apache, and IIS. However, plugin-based solutions were too tightly coupled.

  • [Self-Hosted Deployment] Most solutions now rely on cloud-based protection services. However, self-hosted deployment is generally affordable only for medium-sized and large enterprises. The costs are too high for ordinary small businesses and small development studios.

  • [Privacy and Encryption] During website protection, local data should not be uploaded to the cloud for processing. The goal is to encrypt sensitive local information and secure network communications with the management interface.

  • [DIY Customization] After years of website maintenance and development, I wanted to incorporate my own ideas into certain specific features, but existing solutions made this difficult to achieve.

  • [Visibility] Website administrators who have never used a similar WAF may find it inconvenient to inspect access information through their own logs or tools such as Nginx, Apache, and IIS. They cannot easily tell who is visiting their websites or what requests are being made. In short, this project aims to provide a practical tool for protecting websites and APIs, defending against abnormal activity, and ensuring the normal operation of websites and applications.

Main features:

  • Fully Open-Source Code

  • Supports Self-Hosted Deployment

  • Lightweight, with No Dependency on Third-Party Services

  • Completely Independent Engine; Protection Features Do Not Depend on IIS or Nginx

  • Custom Protection Rules with Support for Script-Based and GUI Editing

  • Whitelist-Based Access Control

  • IP Blacklist Support

  • URL Whitelist Support

  • URL Access Restrictions

  • Support for Configurable Privacy Output of Interface Data

  • CC Frequency-Based Access Protection

  • One-Click Global Configuration

  • Independent Protection Policies for Individual Websites

  • Encrypted Log Storage

  • Encrypted Communication Logs

  • Sensitive Information Masking and Storage

5. Tech Stack

Architecture

Image

Quick Startup

Windows

  • Direct Startup

SamWaf64.exe
  • Run as a Service

//Install
SamWaf64.exe install

//Start
SamWaf64.exe start

//Stop
SamWaf64.exe stop

//Uninstall
SamWaf64.exe uninstall

Linux

  • Direct Startup

./SamWafLinux64
  • Run as a Service

//Install
./SamWafLinux64 install

//Start
./SamWafLinux64 start

//Stop
./SamWafLinux64 stop

//Uninstall
./SamWafLinux64 uninstall

Docker

docker run -d --name=samwaf-instance \
           -p 26666:26666 \
           -p 80:80 \
           -p 443:443 \
           -v /path/to/your/conf:/app/conf \
           -v /path/to/your/data:/app/data \
           -v /path/to/your/logs:/app/logs \
           samwaf/samwaf

Access After Startup

http://127.0.0.1:26666

Default Account: admin; Default Password: admin868 (Please change the default password upon your first login.)

More content, please refer to README.md document
#1
资源直链https://gitee.com/samwaf/SamWaf
去下载
星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare