Skip to content

Commit 1d6a025

Browse files
committed
精简 sing-boxr 内核 http_clients 配置
1 parent ad281ca commit 1d6a025

4 files changed

Lines changed: 6 additions & 6 deletions

_posts/2024-08-21-share-android-singboxr-ruleset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ tags: [sing-box, sing-boxr, Android, ruleset, rule_set, 分享]
8484
"optimistic": true,
8585
"reverse_mapping": true
8686
},
87-
"http_clients": [ { "tag": "detour_proxy", "version": 3, "detour": "GLOBAL" } ],
87+
"http_clients": [ { "tag": "detour_proxy", "detour": "GLOBAL" } ],
8888
"inbounds": [
8989
// 启动服务时如果出现 `tun-in` 报错,可新增 `"stack": "system"` 配置项
9090
{ "tag": "tun-in", "type": "tun", "interface_name": "sing-box", "address": [ "172.18.0.1/30", "fdfe:dcba:9876::1/126" ], "auto_route": true, "strict_route": true }

_posts/2024-08-22-share-shellcrash-singboxr-ruleset.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ sc
359359
连接 SSH 后执行命令 `vi $CRASHDIR/jsons/http_clients.json`,按一下 Ins 键(Insert 键),粘贴如下内容:
360360

361361
```json
362-
{ "http_clients": [ { "tag": "detour_proxy", "version": 3, "detour": "GLOBAL" } ] }
362+
{ "http_clients": [ { "tag": "detour_proxy", "detour": "GLOBAL" } ] }
363363
```
364364

365365
## 五、 编辑 experimental.json 文件
@@ -396,7 +396,7 @@ sc
396396

397397
3. 连接 SSH 后执行如下命令:
398398
```shell
399-
sed -i ':a;N;$!ba;s/{[[:space:]]*"ip_accept_any": true,[[:space:]]*"server": "hosts"[[:space:]]*}/{ "preferred_by": [ "hosts" ], "server": "hosts" }/' "$CRASHDIR/starts/singbox_modify.sh"
399+
sed -i '/"ip_accept_any": true,/"preferred_by": [ "hosts" ],/' "$CRASHDIR/starts/singbox_modify.sh"
400400
sed -i '/#生成experimental.json/i\
401401
#生成http_clients.json\
402402
cat >"$TMPDIR"/jsons/http_clients.json <<EOF\

_posts/2024-08-22-share-shellcrashadguardhome-singboxr-ruleset.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ sc
364364
连接 SSH 后执行命令 `vi $CRASHDIR/jsons/http_clients.json`,按一下 Ins 键(Insert 键),粘贴如下内容:
365365

366366
```json
367-
{ "http_clients": [ { "tag": "detour_proxy", "version": 3, "detour": "GLOBAL" } ] }
367+
{ "http_clients": [ { "tag": "detour_proxy", "detour": "GLOBAL" } ] }
368368
```
369369

370370
## 五、 编辑 experimental.json 文件
@@ -406,7 +406,7 @@ sc
406406

407407
4. 连接 SSH 后执行如下命令:
408408
```shell
409-
sed -i ':a;N;$!ba;s/{[[:space:]]*"ip_accept_any": true,[[:space:]]*"server": "hosts"[[:space:]]*}/{ "preferred_by": [ "hosts" ], "server": "hosts" }/' "$CRASHDIR/starts/singbox_modify.sh"
409+
sed -i '/"ip_accept_any": true,/"preferred_by": [ "hosts" ],/' "$CRASHDIR/starts/singbox_modify.sh"
410410
sed -i '/#生成experimental.json/i\
411411
#生成http_clients.json\
412412
cat >"$TMPDIR"/jsons/http_clients.json <<EOF\

_posts/2024-08-22-share-windows-singboxr-ruleset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ tags: [sing-box, sing-boxr, Windows, ruleset, rule_set, 分享]
8585
"optimistic": true,
8686
"reverse_mapping": true
8787
},
88-
"http_clients": [ { "tag": "detour_proxy", "version": 3, "detour": "GLOBAL" } ],
88+
"http_clients": [ { "tag": "detour_proxy", "detour": "GLOBAL" } ],
8989
"inbounds": [
9090
{ "tag": "tun-in", "type": "tun", "interface_name": "sing-box", "address": [ "172.18.0.1/30", "fdfe:dcba:9876::1/126" ], "auto_route": true, "strict_route": true }
9191
],

0 commit comments

Comments
 (0)