mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-30 14:26:36 +08:00
[优化] go 引用调整
This commit is contained in:
@@ -127,7 +127,7 @@ Manual execution:
|
||||
Running from source:
|
||||
|
||||
```bash
|
||||
cd openflare_agent
|
||||
cd openflare-agent
|
||||
export LOG_LEVEL='info'
|
||||
go run ./cmd/agent -config /path/to/agent.json
|
||||
```
|
||||
@@ -135,7 +135,7 @@ go run ./cmd/agent -config /path/to/agent.json
|
||||
Running compiled binary:
|
||||
|
||||
```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 @@ Access `http://localhost:3000` for the first time, using the default credentials
|
||||
First, build the admin frontend:
|
||||
|
||||
```bash
|
||||
cd openflare_server/web
|
||||
cd openflare-server/web
|
||||
corepack enable
|
||||
pnpm install
|
||||
pnpm build
|
||||
@@ -143,7 +143,7 @@ pnpm build
|
||||
Then, launch the Server:
|
||||
|
||||
```bash
|
||||
cd openflare_server
|
||||
cd openflare-server
|
||||
export SESSION_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
|
||||
Running from source:
|
||||
|
||||
```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
|
||||
Running compiled binary:
|
||||
|
||||
```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 @@
|
||||
# Deploy Relay (Tunnel Relay)
|
||||
|
||||
You will learn: The responsibilities of a TunnelRelay node, `openflare_relay` configuration parameters and environment variables, how to run the Relay via Docker, and how to build and deploy the Relay from source manually.
|
||||
You will learn: The responsibilities of a TunnelRelay node, `openflare-relay` configuration parameters and environment variables, how to run the Relay via Docker, and how to build and deploy the Relay from source manually.
|
||||
|
||||
In the OpenFlare intranet penetration architecture, the **TunnelRelay node** plays a key role. Unlike standard Edge Nodes, in addition to running the traditional Agent (managing OpenResty for HTTPS/WAF processing), it co-locates the **Relay (frps tunnel manager)** service, responsible for listening to intranet client (OpenFlared) tunnel connections and relaying traffic.
|
||||
|
||||
@@ -21,7 +21,7 @@ Before deploying a TunnelRelay node, ensure:
|
||||
|
||||
## Configuration & Environment Variables
|
||||
|
||||
`openflare_relay` reads `relay.json` in the working directory by default on startup. Overriding options via environment variables is fully supported.
|
||||
`openflare-relay` reads `relay.json` in the working directory by default on startup. Overriding options via environment variables is fully supported.
|
||||
|
||||
### Configuration Fields Details
|
||||
|
||||
@@ -68,7 +68,7 @@ If you prefer to run the Relay directly on a physical host or VM:
|
||||
### 1. Compile the Binary
|
||||
|
||||
```bash
|
||||
cd openflare_relay
|
||||
cd openflare-relay
|
||||
go build -o openflare-relay ./cmd/relay
|
||||
```
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@ In production environments, we highly recommend explicitly configuring `SESSION_
|
||||
|
||||
## Build the Admin Frontend
|
||||
|
||||
The Go Server hosts static assets located in `openflare_server/web/build`. Before starting the Server from source, build the frontend:
|
||||
The Go Server hosts static assets located in `openflare-server/web/build`. Before starting the Server from source, build the frontend:
|
||||
|
||||
```bash
|
||||
cd openflare_server/web
|
||||
cd openflare-server/web
|
||||
corepack enable
|
||||
pnpm install
|
||||
pnpm build
|
||||
@@ -37,7 +37,7 @@ pnpm test
|
||||
## Start with SQLite
|
||||
|
||||
```bash
|
||||
cd openflare_server
|
||||
cd openflare-server
|
||||
export SESSION_SECRET='replace-with-a-long-random-string'
|
||||
export SQLITE_PATH='./openflare.db'
|
||||
export LOG_LEVEL='info'
|
||||
@@ -53,7 +53,7 @@ http://localhost:3000
|
||||
## Start with PostgreSQL
|
||||
|
||||
```bash
|
||||
cd openflare_server
|
||||
cd openflare-server
|
||||
export SESSION_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