-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d61a17
commit 49ea2fb
Showing
3 changed files
with
150 additions
and
35 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# 基本概念 | ||
|
||
Rabbit Digger Pro 的配置主要由两部分组成: | ||
|
||
- `net`: 虚拟网络层,可以是: | ||
|
||
- 本地网络 | ||
- 代理网络 | ||
- 规则路由 | ||
- 其他特殊类型 | ||
|
||
- `server`: 代理服务器,支持: | ||
- HTTP 服务器 | ||
- SOCKS5 服务器 | ||
- 混合模式服务器 | ||
|
||
## 工作原理 | ||
|
||
```mermaid | ||
graph LR; | ||
Server(代理服务器) -->|使用| Rule(规则路由) | ||
Rule -->|分流| Proxy1(代理1) | ||
Rule -->|分流| Proxy2(代理2) | ||
Rule -->|分流| Direct(直连) | ||
Proxy1 --> Internet(互联网) | ||
Proxy2 --> Internet | ||
Direct --> Internet | ||
``` | ||
|
||
要点: | ||
|
||
1. 每个 net 都有唯一的名字和类型 | ||
2. 大多数 net 可以链式组合 | ||
3. server 可以同时部署多个 | ||
4. 支持灵活的规则分流 | ||
|
||
详细配置示例请参考[配置指南](format)。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# 配置文件格式 | ||
|
||
`rabbit-digger-pro` 使用 YAML 格式的配置文件。配置文件由三个主要的根级字段组成: | ||
|
||
## net | ||
|
||
`net` 字段用于配置代理节点和链路。每个代理节点都是一个键值对,其中键是节点名称,值是节点配置。 | ||
|
||
```yaml | ||
net: | ||
# Shadowsocks 代理节点 | ||
my_ss: | ||
type: shadowsocks | ||
server: example.com:1234 | ||
cipher: aes-256-cfb | ||
password: password | ||
|
||
# HTTP 代理节点 | ||
http_proxy: | ||
type: http | ||
server: 127.0.0.1 | ||
port: 8080 | ||
``` | ||
## server | ||
`server` 字段用于配置本地服务器,比如 HTTP/SOCKS5 代理服务器。 | ||
|
||
```yaml | ||
server: | ||
# 混合模式代理服务器 | ||
mixed: | ||
type: http+socks5 | ||
bind: 127.0.0.1:1080 | ||
net: my_ss # 使用上面定义的 my_ss 节点 | ||
# HTTP 代理服务器 | ||
http: | ||
type: http | ||
bind: 127.0.0.1:8080 | ||
net: local # 使用直连节点 | ||
``` | ||
|
||
## import | ||
|
||
`import` 字段用于导入其他配置文件或 Clash 配置。rabbit-digger-pro 会根据 `import` 的顺序依次导入配置文件。 | ||
|
||
```yaml | ||
import: | ||
# 导入本地配置文件,合并到当前配置 | ||
- type: merge | ||
source: | ||
path: ./local-config.yaml | ||
# 导入 Clash 配置 | ||
- type: clash | ||
source: | ||
poll: | ||
url: "https://example.com/clash-config.yaml" | ||
interval: 86400 | ||
``` | ||
|
||
### 完整示例 | ||
|
||
```yaml | ||
net: | ||
# Shadowsocks 代理节点 | ||
my_ss: | ||
type: shadowsocks | ||
server: example.com:1234 | ||
cipher: aes-256-cfb | ||
password: password | ||
# HTTP 代理节点 | ||
http_proxy: | ||
type: http | ||
server: 127.0.0.1 | ||
port: 8080 | ||
server: | ||
# 混合模式代理服务器 | ||
mixed: | ||
type: http+socks5 | ||
bind: 127.0.0.1:1080 | ||
net: my_ss # 使用上面定义的 my_ss 节点 | ||
# HTTP 代理服务器 | ||
http: | ||
type: http | ||
bind: 127.0.0.1:8080 | ||
net: local # 使用直连节点 | ||
import: | ||
# 导入本地配置文件,合并到当前配置 | ||
- type: merge | ||
source: | ||
path: ./local-config.yaml | ||
# 导入 Clash 配置 | ||
- type: clash | ||
source: | ||
poll: | ||
url: "https://example.com/clash-config.yaml" | ||
interval: 86400 | ||
``` |