SafeLine README

The project's README from github.com/chaitin/SafeLine. As one markdown file: README.md.

SafeLine - Make your web apps secure

🏠 Website   |   📖 Docs   |   🔍 Live Demo   |   🙋‍♂️ Discord   |   中文版

🏆 Achievements

chaitin/SafeLine — #1 GitHub Trending Repository chaitin/SafeLine — #1 Go Repository of the Day

chaitin/SafeLine — #1 Go Repository of the Week chaitin/SafeLine — #9 Go Repository of the Month

👋 INTRODUCTION

SafeLine is a self-hosted WAF(Web Application Firewall) to protect your web apps from attacks and exploits.

A web application firewall helps protect web apps by filtering and monitoring HTTP traffic between a web application and the Internet. It typically protects web apps from attacks such as SQL injection, XSS, code injection, os command injection, CRLF injection, ldap injection, xpath injection, RCE, XXE, SSRF, path traversal, backdoor, bruteforce, http-flood, bot abused, among others.

💡 How It Works

By deploying a WAF in front of a web application, a shield is placed between the web application and the Internet. While a proxy server protects a client machine’s identity by using an intermediary, a WAF is a type of reverse-proxy, protecting the server from exposure by having clients pass through the WAF before reaching the server.

A WAF protects your web apps by filtering, monitoring, and blocking any malicious HTTP/S traffic traveling to the web application, and prevents any unauthorized data from leaving the app. It does this by adhering to a set of policies that help determine what traffic is malicious and what traffic is safe. Just as a proxy server acts as an intermediary to protect the identity of a client, a WAF operates in similar fashion but acting as a reverse proxy intermediary that protects the web app server from a potentially malicious client.

its core capabilities include:

⚡️ Screenshots

Get Live Demo

🔥 FEATURES

List of the main features as follows:

🧩 Showcases

Legitimate User Malicious User
Block Web Attacks
Rate Limiting
Anti-Bot Challenge
Auth Challenge
HTML Dynamic Protection
JS Dynamic Protection

🚀 Quickstart

[!WARNING] 中国大陆用户安装国际版可能会导致无法连接云服务,请查看 中文版安装文档

📦 Installing

Information on how to install SafeLine can be found in the Install Guide

⚙️ Protecting Web Apps

to see Configuration

📋 More Informations

Effect Evaluation

Metric ModSecurity, Level 1 CloudFlare, Free SafeLine, Balance SafeLine, Strict
Total Samples 33669 33669 33669 33669
Detection 69.74% 10.70% 71.65% 76.17%
False Positive 17.58% 0.07% 0.07% 0.22%
Accuracy 82.20% 98.40% 99.45% 99.38%

Is SafeLine Production-Ready?

Yes, SafeLine is production-ready.

🌟 Community Recognition

🔌 Ecosystem Integrations

🙋‍♂️ Community

Join our Discord to get community support, the core team members are identified by the STAFF role in Discord.

Several contact options exist for our community, the primary one being Discord. These are in addition to GitHub issues for creating a new issue.

   

💪 PRO Edition

SafeLine PRO is now available! Explore plans and pricing or start a 7-day trial.

📝 License

See LICENSE for details.

SafeLine (chaitin/SafeLine)

Searching Database…

22.8K ·GitHub
What is this?SafeLine is a self-hosted web application firewall (WAF) and reverse proxy that protects your web apps from attacks and exploits by filtering and monitoring HTTP traffic.
Does it run inside my app, or in front of it?In front: it works as a reverse proxy, so client traffic passes through SafeLine before reaching your server, and it filters, monitors and blocks malicious HTTP/S requests on the way in.
Do I need to modify my application's code?No. SafeLine acts as a shield between the Internet and your app and enforces its policies on the passing traffic, so the app itself stays untouched.
Are there any setup gotchas?Mainland-China users should install with the Chinese-edition docs: the international edition can fail to connect to SafeLine's cloud services.
Where does it run?On your own infrastructure: it is self-hosted software you deploy in front of the web apps you want to protect, managed from its own web console.
Which attacks does it block?The usual web attack surface: SQL injection, XSS, code and OS command injection, CRLF, LDAP and XPath injection, RCE, XXE, SSRF, path traversal, backdoors, plus brute force, HTTP floods and bot abuse.
What can it do besides blocking attacks?Rate limiting against DoS, brute force and traffic surges, anti-bot challenges that let humans in while blocking crawlers, an authentication challenge that gates visitors behind a password, and dynamic protection that re-encrypts your pages' HTML and JS on every visit.
How does its detection compare to ModSecurity or Cloudflare?On SafeLine's 33,669-sample benchmark, Balance mode detected 71.65% of attacks with 0.07% false positives (99.45% accuracy) and Strict mode 76.17%, versus 69.74% with 17.58% false positives for ModSecurity Level 1 and 10.70% detection for Cloudflare Free.
Is it battle-tested?Yes — the README calls it production-ready, with over 400,000 installations worldwide, more than 1,000,000 websites protected, and over 30 billion HTTP requests handled daily.
What are similar projects?crowdsec, bunkerweb, anubis, DVWA, hacker101, xray, tyk, goproxy
Creator
chaitin
Size
78.3 MB
Stars
22.8K
Age
3y
Commits · 90 Days