Skip to content

Commit 4e4ec79

Browse files
committed
Update docs
1 parent a44fbdc commit 4e4ec79

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

community/01-add-proxies-and-rulesets.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
若选择`编辑节点`,则再点击右上角的`添加代理`按扭,填入 mihomo 的 `proxies` 段配置,一次填入一个节点,如
1616

17-
```
17+
```yaml
1818
name: "vless-reality-vision"
1919
type: vless
2020
server: server
@@ -33,7 +33,7 @@ client-fingerprint: chrome
3333
3434
若选择`编辑节点(源文件)`,可直接填入 mihomo 的 `proxies` 所有节点配置,如
3535

36-
```
36+
```yaml
3737
proxies:
3838
- name: "vless-reality-vision"
3939
type: vless
@@ -69,7 +69,7 @@ proxies:
6969

7070
若选择`编辑节点`,则再点击右上角的`添加代理`按扭,填入 sing-box 的 `outbounds` 段配置,一次填入一个节点,如
7171

72-
```
72+
```json
7373
{
7474
"type": "vless",
7575
"tag": "vless-out",
@@ -142,19 +142,19 @@ proxies:
142142

143143
若选择`编辑规则`,则按照以下格式先填入规则并点击`添加`按扭
144144

145-
```
145+
```yaml
146146
DOMAIN-SUFFIX,example.com
147147
```
148148

149149
若需要一次性填入多个规则时, `DOMAIN-SUFFIX` 不可省略,多个规则之间使用 `|` 分隔,如
150150

151-
```
151+
```yaml
152152
DOMAIN-SUFFIX,example.com|DOMAIN-SUFFIX,example2.com
153153
```
154154

155155
若选择`打开文件`,按照以下格式填入规则并保存
156156

157-
```
157+
```yaml
158158
payload:
159159
- DOMAIN-SUFFIX,example.com
160160
- DOMAIN-SUFFIX,example2.com
@@ -169,21 +169,21 @@ payload:
169169

170170
保存新建规则集后,右键点击此规则集并选择`编辑规则集文件`,则按照以下格式先填入规则并点击`保存`按扭
171171

172-
```
172+
```json
173173
{
174174
"version": 1,
175175
"rules": [
176176
{
177-
"domain_suffix": [
178-
"example.com",
179-
"example2.com"
180-
],
181-
"process_name": [
182-
"test.exe"
183-
]
177+
"domain_suffix": ["example.com", "example2.com"]
178+
},
179+
{
180+
"process_name": "test.exe"
184181
}
185182
]
186183
}
187184
```
188185

189186
其余规则如 `process_path` 等的配置方式相同,详情请自行参考 sing-box 手册
187+
188+
各键值之间 "AND" 与 "OR" 的匹配关系请参见
189+
https://sing-box.sagernet.org/configuration/rule-set/headless-rule/#default-fields

community/02-run-tun-mode-without-password.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@ sudo systemctl enable --now polkit
2424
- 文件名可自定义
2525

2626
```bash
27-
sudo vi /etc/polkit-1/rules.d/99-nopassword.ruIes
27+
sudo vi /etc/polkit-1/rules.d/99-nopassword.rules
2828
```
2929

3030
- 添加以下内容并保存退出
3131

3232
```javascript
3333
polkit.addRule(function (action, subject) {
3434
if (
35-
(action.id == 'org.freedesktop.resolve1.set-domains' ||
36-
action.id == 'org.freedesktop.resolve1.set-default-route' ||
37-
action.id == 'org.freedesktop.resolve1.set-dns-servers') &&
35+
(action.id == "org.freedesktop.resolve1.set-domains" ||
36+
action.id == "org.freedesktop.resolve1.set-default-route" ||
37+
action.id == "org.freedesktop.resolve1.set-dns-servers") &&
3838
subject.local &&
3939
subject.active &&
40-
subject.isInGroup('wheel')
40+
subject.isInGroup("wheel")
4141
) {
4242
return polkit.Result.YES;
4343
}

0 commit comments

Comments
 (0)