Files
OpenFlare/README.md
T

100 lines
3.2 KiB
Markdown

<p align="right">
<a href="./README.md">中文</a> | <strong>English</strong>
</p>
[//]: # (<p align="center">)
[//]: # ( <a href="https://github.com/Rain-kl/ATSFlare"><img src="https://raw.githubusercontent.com/Rain-kl/ATSFlare/main/atsf_server/web/public/logo.png" width="150" height="150" alt="ATSFlare logo"></a>)
[//]: # (</p>)
<div align="center">
# ATSFlare
_✨ control plane for reverse proxy management ✨_
</div>
<p align="center">
<a href="https://raw.githubusercontent.com/Rain-kl/ATSFlare/main/LICENSE">
<img src="https://img.shields.io/github/license/Rain-kl/ATSFlare?color=brightgreen" alt="license">
</a>
<a href="https://github.com/Rain-kl/ATSFlare/releases/latest">
<img src="https://img.shields.io/github/v/release/Rain-kl/ATSFlare?color=brightgreen&include_prereleases" alt="release">
</a>
<a href="https://github.com/Rain-kl/ATSFlare/releases/latest">
<img src="https://img.shields.io/github/downloads/Rain-kl/ATSFlare/total?color=brightgreen&include_prereleases" alt="release">
</a>
<a href="https://goreportcard.com/report/github.com/Rain-kl/ATSFlare">
<img src="https://goreportcard.com/badge/github.com/Rain-kl/ATSFlare" alt="GoReportCard">
</a>
</p>
[//]: # (<p align="center">)
[//]: # ( <a href="https://github.com/Rain-kl/ATSFlare/releases">Download</a>)
[//]: # ( ·)
[//]: # ( <a href="https://github.com/Rain-kl/ATSFlare/blob/main/README.en.md#deployment">Tutorial</a>)
[//]: # ( ·)
[//]: # ( <a href="https://github.com/Rain-kl/ATSFlare/issues">Feedback</a>)
[//]: # (</p>)
## 仓库结构
- `atsf_server`: Gin + GORM + SQLite 的控制中心,包含管理端 API、Agent API 和 Web 管理台
- `atsf_agent`: Go 单体 Agent,负责注册、心跳、同步配置、写入 Nginx 路由文件并 reload
- `docs`: 设计、开发规范、开发计划和部署联调文档
## 快速开始
### 1. 启动 Server
先按部署文档启动控制面,默认访问地址为 `http://localhost:3000`。
- [docs/deployment.md](./docs/deployment.md)
### 2. 使用 Discovery Token 一键部署 Agent
适用于新节点首次接入,Agent 会使用全局 `discovery_token` 自动注册并换取节点专属 `agent_token`。
```bash
curl -fsSL https://raw.githubusercontent.com/Rain-kl/ATSFlare/main/scripts/install-agent.sh | bash -s -- \
--server-url http://your-server:3000 \
--discovery-token YOUR_DISCOVERY_TOKEN
```
### 3. 使用 Agent Token 一键部署 Agent
适用于已经在管理端预创建节点、并拿到节点专属 `agent_token` 的场景。
```bash
curl -fsSL https://raw.githubusercontent.com/Rain-kl/ATSFlare/main/scripts/install-agent.sh | bash -s -- \
--server-url http://your-server:3000 \
--agent-token YOUR_AGENT_TOKEN
```
说明:
* `--server-url` 替换为实际控制面地址,例如 `http://192.168.1.10:3000`
* Linux 默认安装到 `/opt/atsflare-agent`,并创建 `atsflare-agent` systemd 服务
* 重复执行相同命令可用于升级 Agent 到最新 Release
## 贡献
参与开发请先阅读:
1. [docs/design.md](./docs/design.md)
2. [docs/development-guidelines.md](./docs/development-guidelines.md)
3. [docs/development-plan.md](./docs/development-plan.md)