chaitin/SafeLine

SafeLine

SafeLine ยืนอยู่หน้าไซต์ที่คุณดูแล หน้านี้เขียนบทบาทนั้น ไม่เขียนวิธีเลี่ยงไฟร์วอลล์

22,754·15 ตุลาคม 2026GoGPL-3.0

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:

  • Defenses for web attacks
  • Proactive bot abused defense
  • HTML & JS code encryption
  • IP-based rate limiting
  • Web Access Control List

⚡️ Screenshots

Get Live Demo

🔥 FEATURES

List of the main features as follows:

  • Block Web Attacks
    • It defenses for all of web attacks, such as SQL injection, XSS, code injection, os command injection, CRLF injection, XXE, SSRF, path traversal and so on.
  • Rate Limiting
    • Defend your web apps against DoS attacks, bruteforce attempts, traffic surges, and other types of abuse by throttling traffic that exceeds defined limits.
  • Anti-Bot Challenge
    • Anti-Bot challenges to protect your website from bot attacks, human users will be allowed, crawlers and bots will be blocked.
  • Authentication Challenge
    • When authentication challenge turned on, visitors need to enter the password, otherwise they will be blocked.
  • Dynamic Protection
    • When dynamic protection turned on, html and js codes in your web server will be dynamically encrypted by each time you visit.

🧩 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 Information

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.

  • channel #feedback: for new features discussion.
  • channel #FAQ: for FAQ.
  • channel #general: for any other questions.

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 — GitHub Trending 第一名 chaitin/SafeLine — Go 项目日榜第一名

chaitin/SafeLine — Go 项目周榜第一名 chaitin/SafeLine — Go 项目月榜第九名

👋 项目介绍

SafeLine,中文名 "雷池",是一款简单好用, 效果突出的 Web 应用防火墙(WAF),可以保护 Web 服务不受黑客攻击。

雷池通过过滤和监控 Web 应用与互联网之间的 HTTP 流量来保护 Web 服务。可以保护 Web 服务免受 SQL 注入、XSS、 代码注入、命令注入、CRLF 注入、ldap 注入、xpath 注入、RCE、XXE、SSRF、路径遍历、后门、暴力破解、CC、爬虫 等攻击。

💡 工作原理

雷池通过阻断流向 Web 服务的恶意 HTTP 流量来保护 Web 服务。雷池作为反向代理接入网络,通过在 Web 服务前部署雷池,可在 Web 服务和互联网之间设置一道屏障。

雷池的核心功能如下:

  • 防护 Web 攻击
  • 防爬虫, 防扫描
  • 前端代码动态加密
  • 基于源 IP 的访问速率限制
  • HTTP 访问控制

⚡️ 项目截图

查看 演示环境

🔥 核心能力

对于你的网站而言, 雷池可以实现如下效果:

  • 阻断 Web 攻击
    • 可以防御所有的 Web 攻击,例如 SQL 注入、XSS、代码注入、操作系统命令注入、CRLF 注入、XXE、SSRF、路径遍历 等等。
  • 限制访问频率
    • 限制用户的访问速率,让 Web 服务免遭 CC 攻击、暴力破解、流量激增 和其他类型的滥用。
  • 人机验证
    • 互联网上有来自真人用户的流量,但更多的是由爬虫, 漏洞扫描器, 蠕虫病毒, 漏洞利用程序等自动化程序发起的流量,开启雷池的人机验证功能后真人用户会被放行,恶意爬虫将会被阻断。
  • 身份认证
    • 雷池的 "身份认证" 功能可以很好的解决 "未授权访问" 漏洞,当用户访问您的网站时,需要输入您配置的用户名和密码信息,不持有认证信息的用户将被拒之门外。
  • 动态防护
    • 在用户浏览到的网页内容不变的情况下,将网页赋予动态特性,对 HTML 和 JavaScript 代码进行动态加密,确保每次访问时这些代码都以随机且独特的形态呈现。

🧩 核心能力展示

Legitimate User Malicious User
阻断 Web 攻击
限制访问频率
人机验证
身份认证
HTML 动态防护
JS 动态防护

🚀 上手指南

📦 安装

查看 安装雷池

⚙️ 配置防护站点

查看 快速配置

📋 更多信息

防护效果测试

Metric ModSecurity, Level 1 CloudFlare 雷池, 平衡 雷池, 严格
样本数量 33669 33669 33669 33669
检出率 69.74% 10.70% 71.65% 76.17%
误报率 17.58% 0.07% 0.07% 0.22%
准确率 82.20% 98.40% 99.45% 99.38%

雷池可以投入生产使用吗

是的,已经有不少用户将雷池投入生产使用,截至目前

🌟 社区认可

🔌 生态集成

🙋‍♂️ 用户社区

欢迎加入雷池 社区微信群 进行技术交流。

也可以加入雷池 Discord 来获取更多社区支持。

   

💪 专业版

雷池专业版现已发布!查看 社区版 vs 专业版,选择适合你的版本。

อ่านต้นฉบับ · README · README 中文

คลัง

https://github.com/chaitin/SafeLine · ห้องสมุด