Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/menus/override.sh
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ EOF
# s自定义singbox配置文件
set_singbox_adv() {
comp_box "\033[33m$OVR_SING_TITLE1\033[0m" \
"\033[36mlog dns ntp certificate experimental\033[0m" \
"\033[36mlog dns ntp certificate http_clients experimental\033[0m" \
"\033[33m$OVR_SING_TITLE2\033[0m" \
"\033[36mendpoints inbounds outbounds providers route services\033[0m" \
"$OVR_SING_TITLE3" \
Expand Down
28 changes: 21 additions & 7 deletions scripts/starts/singbox_modify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,10 @@ EOF
}
],
"rules": [
{
"ip_accept_any": true,
"server": "hosts"
}
]}
{ "action": "evaluate", "server": "hosts" },
{ "match_response": true, "ip_accept_any": true, "action": "respond" }
]
}
}
EOF
fi
Expand Down Expand Up @@ -153,7 +152,7 @@ generate_dns_related_jsons() {
"format": "binary",
$srs_path
"url": "https://testingcf.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box-ruleset/cn.srs",
"download_detour": "DIRECT"
"http_client": "detour_direct"
}
]
}
Expand Down Expand Up @@ -324,6 +323,21 @@ generate_outbounds_and_experimental_jsons() {
$add_global
]
}
EOF
#生成http_clients.json
cat >"$TMPDIR"/jsons/http_clients.json <<EOF
{
"http_clients": [
{
"tag": "detour_proxy",
"detour": "GLOBAL"
},
{
"tag": "detour_direct",
"detour": "DIRECT"
}
]
}
EOF
#生成experimental.json
[ "$crashcore" = "singboxr" ] && urltest_unified_delay=',"urltest_unified_delay": true'
Expand Down Expand Up @@ -394,7 +408,7 @@ link_custom_jsons() {
#加载自定义配置文件
mkdir -p "$TMPDIR"/jsons_base
#以下为覆盖脚本的自定义文件
for char in log dns ntp certificate experimental; do
for char in log dns ntp certificate http_clients experimental; do
[ -s "$CRASHDIR"/jsons/${char}.json ] && {
ln -sf "$CRASHDIR"/jsons/${char}.json "$TMPDIR"/jsons/cust_${char}.json
mv -f "$TMPDIR"/jsons/${char}.json "$TMPDIR"/jsons_base #如果重复则临时备份
Expand Down