gofirewall/README.md

63 lines
1015 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# GoFirewall
基于Go语言开发的高性能防火墙系统支持自定义规则、流量过滤、日志记录和网络转发功能。
## 功能特性
- 支持TCP/UDP/ICMP协议过滤
- 自定义防火墙规则管理
- 实时网络流量监控
- 数据包转发(NAT)功能
- 多级别日志记录
- 配置文件管理
## 安装指南
1. 确保已安装Go 1.16+环境
2. 克隆项目仓库:
```
git clone https://github.com/yourusername/gofirewall.git
```
3. 安装依赖:
```
go mod download
```
4. 编译项目:
```
go build
```
## 快速开始
1. 配置防火墙规则(编辑`firewall.json`
2. 启动防火墙:
```
./gofirewall
```
3. 查看日志:
```
tail -f firewall.log
```
## 配置文件
配置文件示例(`firewall.json`)
```json
{
"log_level": "info",
"capture_interface": "eth0",
"forward_enabled": false,
"max_packet_size": 65536
}
```
## 开发指南
运行测试:
```
go test ./...
```
## 许可证
MIT License