mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-29 05:56:38 +08:00
[优化] go 引用调整
This commit is contained in:
@@ -126,7 +126,7 @@ journalctl -u openflare-agent -f
|
||||
源码运行:
|
||||
|
||||
```bash
|
||||
cd openflare_agent
|
||||
cd openflare-agent
|
||||
export LOG_LEVEL='info'
|
||||
go run ./cmd/agent -config /path/to/agent.json
|
||||
```
|
||||
@@ -134,7 +134,7 @@ go run ./cmd/agent -config /path/to/agent.json
|
||||
编译后二进制运行:
|
||||
|
||||
```bash
|
||||
cd openflare_agent
|
||||
cd openflare-agent
|
||||
go build -o openflare-agent ./cmd/agent
|
||||
export LOG_LEVEL='info'
|
||||
./openflare-agent -config /path/to/agent.json
|
||||
|
||||
@@ -134,7 +134,7 @@ docker compose logs -f openflare
|
||||
先构建管理端前端:
|
||||
|
||||
```bash
|
||||
cd openflare_server/web
|
||||
cd openflare-server/web
|
||||
corepack enable
|
||||
pnpm install
|
||||
pnpm build
|
||||
@@ -143,7 +143,7 @@ pnpm build
|
||||
再启动 Server:
|
||||
|
||||
```bash
|
||||
cd openflare_server
|
||||
cd openflare-server
|
||||
export JWT_SECRET='replace-with-a-long-random-string'
|
||||
export SQLITE_PATH='./openflare.db'
|
||||
export LOG_LEVEL='info'
|
||||
@@ -230,7 +230,7 @@ journalctl -u openflare-agent -f
|
||||
源码运行:
|
||||
|
||||
```bash
|
||||
cd openflare_agent
|
||||
cd openflare-agent
|
||||
export LOG_LEVEL='info'
|
||||
go run ./cmd/agent -config /path/to/agent.json
|
||||
```
|
||||
@@ -238,7 +238,7 @@ go run ./cmd/agent -config /path/to/agent.json
|
||||
编译后二进制运行:
|
||||
|
||||
```bash
|
||||
cd openflare_agent
|
||||
cd openflare-agent
|
||||
go build -o openflare-agent ./cmd/agent
|
||||
export LOG_LEVEL='info'
|
||||
./openflare-agent -config /path/to/agent.json
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 部署 Relay (Tunnel 中继)
|
||||
|
||||
你会学到:TunnelRelay 节点的职责、`openflare_relay` 的配置项与环境变量、使用 Docker 运行 Relay 的方法,以及如何通过源码手动构建并部署 Relay。
|
||||
你会学到:TunnelRelay 节点的职责、`openflare-relay` 的配置项与环境变量、使用 Docker 运行 Relay 的方法,以及如何通过源码手动构建并部署 Relay。
|
||||
|
||||
在 OpenFlare 的内网穿透体系中,**TunnelRelay 节点** 扮演着关键的角色。它与普通的边缘节点(Edge Node)不同,除了运行传统的 Agent(托管 OpenResty 进行 HTTPS/WAF 处理)外,还同机运行了 **Relay (frps 隧道管理器)** 服务,负责监听内网客户端(OpenFlared)的隧道连接并进行流量中继。
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
## 配置文件与环境变量
|
||||
|
||||
`openflare_relay` 启动时默认会读取当前目录下的 `relay.json`。同时也完全支持通过环境变量进行覆盖。
|
||||
`openflare-relay` 启动时默认会读取当前目录下的 `relay.json`。同时也完全支持通过环境变量进行覆盖。
|
||||
|
||||
### 配置字段详情
|
||||
|
||||
@@ -68,7 +68,7 @@ docker run -d --name openflare-relay --restart unless-stopped \
|
||||
### 1. 编译二进制
|
||||
|
||||
```bash
|
||||
cd openflare_relay
|
||||
cd openflare-relay
|
||||
go build -o openflare-relay ./cmd/relay
|
||||
```
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@ OpenFlare Server 是 Gin + GORM 单体控制面,负责管理端 UI、管理 AP
|
||||
|
||||
## 构建管理端前端
|
||||
|
||||
Go Server 会托管 `openflare_server/web/build` 中的静态产物。源码启动前先构建前端:
|
||||
Go Server 会托管 `openflare-server/web/build` 中的静态产物。源码启动前先构建前端:
|
||||
|
||||
```bash
|
||||
cd openflare_server/web
|
||||
cd openflare-server/web
|
||||
corepack enable
|
||||
pnpm install
|
||||
pnpm build
|
||||
@@ -37,7 +37,7 @@ pnpm test
|
||||
## 使用 SQLite 启动
|
||||
|
||||
```bash
|
||||
cd openflare_server
|
||||
cd openflare-server
|
||||
export JWT_SECRET='replace-with-a-long-random-string'
|
||||
export SQLITE_PATH='./openflare.db'
|
||||
export LOG_LEVEL='info'
|
||||
@@ -53,7 +53,7 @@ http://localhost:3000
|
||||
## 使用 PostgreSQL 启动
|
||||
|
||||
```bash
|
||||
cd openflare_server
|
||||
cd openflare-server
|
||||
export JWT_SECRET='replace-with-a-long-random-string'
|
||||
export DSN='postgres://openflare:secret@127.0.0.1:5432/openflare?sslmode=disable'
|
||||
export LOG_LEVEL='info'
|
||||
|
||||
Reference in New Issue
Block a user