Skip to content

Commit 22d418d

Browse files
committed
feat: 01-add-proxies-and-rulesets.md
1 parent c5faf0f commit 22d418d

File tree

2 files changed

+190
-0
lines changed

2 files changed

+190
-0
lines changed

.vitepress/config.mts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ export default defineConfig({
3939
{ text: "社区版教程", link: "/gfs/community.md" },
4040
],
4141
},
42+
{
43+
text: "社区教程",
44+
items: [
45+
{ text: "添加节点和规则集", link: "/community/01-add-proxies-and-rulesets.md" },
46+
],
47+
},
4248
],
4349

4450
footer: {
Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
# 导入自建节点
2+
3+
下面介绍如何导入非订阅链接提供的节点。
4+
5+
## 1、创建配置
6+
7+
`订阅`页面点击`添加`按扭,订阅类型选择`手动管理`,(没有`手动管理`则选择订阅类型为`本地``远程链接``保存路径`填写一致即可)填入名称,保存路径可保留默认或自定义
8+
9+
## 2、添加节点
10+
11+
保存新建配置后,右键点击此配置并选择`编辑节点`,或选择`编辑节点(源文件)`
12+
13+
### 2.1、GUI.for.Clash
14+
15+
若选择`编辑节点`,则再点击右上角的`添加代理`按扭,填入 mihomo 的 `proxies` 段配置,一次填入一个节点,如
16+
17+
```
18+
name: "vless-reality-vision"
19+
type: vless
20+
server: server
21+
port: 443
22+
uuid: uuid
23+
network: tcp
24+
tls: true
25+
udp: true
26+
flow: xtls-rprx-vision
27+
servername: www.microsoft.com
28+
reality-opts:
29+
public-key: xxx
30+
short-id: xxx
31+
client-fingerprint: chrome
32+
```
33+
34+
若选择`编辑节点(源文件)`,可直接填入 mihomo 的 `proxies` 所有节点配置,如
35+
36+
```
37+
proxies:
38+
- name: "vless-reality-vision"
39+
type: vless
40+
server: server
41+
port: 443
42+
uuid: uuid
43+
network: tcp
44+
tls: true
45+
udp: true
46+
flow: xtls-rprx-vision
47+
servername: www.microsoft.com
48+
reality-opts:
49+
public-key: xxx
50+
short-id: xxx
51+
client-fingerprint: chrome
52+
53+
- name: tuic
54+
server: www.example.com
55+
port: 10443
56+
type: tuic
57+
token: TOKEN
58+
uuid: 00000000-0000-0000-0000-000000000001
59+
password: PASSWORD_1
60+
disable-sni: true
61+
reduce-rtt: true
62+
request-timeout: 8000
63+
udp-relay-mode: native
64+
```
65+
66+
### 2.2、GUI.for.SingBox
67+
68+
其余与 2.1 相同,但填入内容应为 sing-box `outbounds` 段中的节点,且应为 json 格式
69+
70+
若选择`编辑节点`,则再点击右上角的`添加代理`按扭,填入 sing-box 的 `outbounds` 段配置,一次填入一个节点,如
71+
72+
```
73+
{
74+
"type": "vless",
75+
"tag": "vless-out",
76+
"server": "127.0.0.1",
77+
"server_port": 1080,
78+
"uuid": "bf000d23-0752-40b4-affe-68f7707a9661",
79+
"flow": "xtls-rprx-vision",
80+
"network": "tcp",
81+
"tls": {},
82+
"packet_encoding": "",
83+
"multiplex": {},
84+
"transport": {},
85+
86+
... // Dial Fields
87+
}
88+
```
89+
90+
若选择`编辑节点(源文件)`,可直接填入 sing-box 的 `outbounds` 段所有节点配置,如
91+
92+
```json
93+
[
94+
{
95+
"type": "vless",
96+
"tag": "vless-out",
97+
"server": "127.0.0.1",
98+
"server_port": 1080,
99+
"uuid": "bf000d23-0752-40b4-affe-68f7707a9661",
100+
"flow": "xtls-rprx-vision",
101+
"network": "tcp",
102+
"tls": {},
103+
"packet_encoding": "",
104+
"multiplex": {},
105+
"transport": {},
106+
107+
... // Dial Fields
108+
},
109+
{
110+
"type": "tuic",
111+
"tag": "tuic-out",
112+
"server": "127.0.0.1",
113+
"server_port": 1080,
114+
"uuid": "2DD61D93-75D8-4DA4-AC0E-6AECE7EAC365",
115+
"password": "hello",
116+
"congestion_control": "cubic",
117+
"udp_relay_mode": "native",
118+
"udp_over_stream": false,
119+
"zero_rtt_handshake": false,
120+
"heartbeat": "10s",
121+
"network": "tcp",
122+
"tls": {},
123+
124+
... // Dial Fields
125+
}
126+
]
127+
```
128+
129+
# 添加自定义规则集
130+
131+
下面介绍如何创建自定义规则集。
132+
133+
## 1、创建新规则集
134+
135+
`规则集`页面点击`添加`按扭,订阅类型选择`手动管理`,填入名称,保存路径可保留默认或自定义
136+
137+
## 2、添加规则
138+
139+
保存新建规则集后,右键点击此规则集并选择`编辑规则`,或选择`打开文件`
140+
141+
### 2.1 GUI.for.Clash
142+
143+
若选择`编辑规则`,则按照以下格式先填入规则并点击`添加`按扭
144+
145+
```
146+
DOMAIN-SUFFIX,example.com
147+
```
148+
149+
若需要一次性填入多个规则时, `DOMAIN-SUFFIX` 不可省略,多个规则之间使用 `|` 分隔,如
150+
151+
```
152+
DOMAIN-SUFFIX,example.com|DOMAIN-SUFFIX,example2.com
153+
```
154+
155+
若选择`打开文件`,按照以下格式填入规则并保存
156+
157+
```
158+
payload:
159+
- DOMAIN-SUFFIX,example.com
160+
- DOMAIN-SUFFIX,example2.com
161+
- PROCESS-NAME,test.exe
162+
```
163+
164+
其余规则如 `PROCESS-PATH` 等的配置方式相同,详情请自行参考 mihomo 手册
165+
166+
### 2.2、GUI.for.SingBox
167+
168+
`规则集`页面点击`添加`按扭,订阅类型选择`手动管理`,填入名称,保存路径可保留默认或自定义
169+
170+
保存新建规则集后,右键点击此规则集并选择`编辑规则集文件`,则按照以下格式先填入规则并点击`保存`按扭
171+
172+
```
173+
{
174+
"domain_suffix": [
175+
"example.com",
176+
"example2.com"
177+
],
178+
"process_name": [
179+
"test.exe"
180+
]
181+
}
182+
```
183+
184+
其余规则如 `process_path` 等的配置方式相同,详情请自行参考 sing-box 手册

0 commit comments

Comments
 (0)