mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-10 23:41:22 +00:00
~1.9.5a6.2 pkg
~优化启动提示及配置文件管理部分说明 ~修复singboxr本地生成配置文件无法正确拉取在线订阅文件的bug
This commit is contained in:
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
meta_v=v1.19.17
|
meta_v=v1.19.17
|
||||||
singboxr_v=1.13.0-alpha.27
|
singboxr_v=1.13.0-alpha.27
|
||||||
versionsh=1.9.5alpha6.1
|
versionsh=1.9.5alpha6.2
|
||||||
GeoIP_v=20251205
|
GeoIP_v=20251205
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# ===== 启动完成 =====
|
# ===== 启动完成 =====
|
||||||
START_SERVICE_OK="服务已启动!"
|
START_SERVICE_OK="服务已启动!"
|
||||||
START_WEB_HINT="请前往"
|
START_WEB_HINT="管理面板:"
|
||||||
START_WEB_HINT2="管理内置规则"
|
|
||||||
START_PAC_HINT="其他设备可使用 PAC 配置:"
|
START_PAC_HINT="其他设备可使用 PAC 配置:"
|
||||||
START_PROXY_HINT="或使用 HTTP / SOCKS5 方式连接:"
|
START_PROXY_HINT="或使用 HTTP / SOCKS5 方式连接:"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# ===== Startup =====
|
# ===== Startup =====
|
||||||
START_SERVICE_OK="Service started successfully!"
|
START_SERVICE_OK="Service started successfully!"
|
||||||
START_WEB_HINT="Please use"
|
START_WEB_HINT="Dashboard:"
|
||||||
START_WEB_HINT2="manage built-in rules"
|
|
||||||
START_PAC_HINT="Other devices can connect using PAC configuration:"
|
START_PAC_HINT="Other devices can connect using PAC configuration:"
|
||||||
START_PROXY_HINT="Or connect using HTTP / SOCKS5:"
|
START_PROXY_HINT="Or connect using HTTP / SOCKS5:"
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ startover() {
|
|||||||
line_break
|
line_break
|
||||||
separator_line "="
|
separator_line "="
|
||||||
content_line "\033[32m$START_SERVICE_OK\033[0m"
|
content_line "\033[32m$START_SERVICE_OK\033[0m"
|
||||||
content_line "$START_WEB_HINT \033[4;36mhttp://$host$hostdir\033[0m $START_WEB_HINT2"
|
content_line "$START_WEB_HINT \033[4;36mhttp://$host$hostdir\033[0m"
|
||||||
|
|
||||||
if [ "$firewall_area" = 4 ]; then
|
if [ "$firewall_area" = 4 ]; then
|
||||||
content_line ""
|
content_line ""
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ set_core_config() {
|
|||||||
f1 = $1
|
f1 = $1
|
||||||
f2 = $2
|
f2 = $2
|
||||||
if (length(f1) > 12)
|
if (length(f1) > 12)
|
||||||
f1 = substr(f1, 1, 9) ".."
|
f1 = substr(f1, 1, 8) ".."
|
||||||
if (length(f2) > 39)
|
if (length(f2) > 30)
|
||||||
f2 = substr(f2, 1, 36) "..."
|
f2 = substr(f2, 1, 30) "..."
|
||||||
printf "%-10s\t%-30s\n", f1, f2
|
printf "%-7s \t%-28s\n", f1, f2
|
||||||
}')
|
}')
|
||||||
comp_box "\033[30;47m配置文件管理\033[0m"
|
comp_box "\033[30;47m配置文件管理\033[0m"
|
||||||
[ -n "$list" ] && {
|
[ -n "$list" ] && {
|
||||||
@@ -150,11 +150,11 @@ setproviders() {
|
|||||||
;;
|
;;
|
||||||
1)
|
1)
|
||||||
separator_line "="
|
separator_line "="
|
||||||
content_line "注意:名称或代号不可重复,且不支持纯数字!"
|
content_line "注意:不可重复,不支持纯数字,且不要超过4个汉字!"
|
||||||
separator_line "-"
|
separator_line "-"
|
||||||
read -p "请输入具体名称或代号 > " text
|
read -r -p "请输入具体名称或代号 > " text
|
||||||
text=$(echo $text | sed 's/ //g') #去空格
|
text=$(printf "%.12s" "$text" | sed 's/ //g' ) #去空格
|
||||||
if [ -n "$text" ] && [ -z "$(echo "$text" | grep -E '^[0-9]+$')" ] && ! grep -q "$text" "$CRASHDIR"/configs/providers.cfg; then
|
if [ -n "$text" ] && [ -z "$(echo "$text" | grep -E '^[0-9]+$')" ] && ! grep -q "^$text " "$CRASHDIR"/configs/providers.cfg; then
|
||||||
name="$text"
|
name="$text"
|
||||||
else
|
else
|
||||||
error_input
|
error_input
|
||||||
|
|||||||
@@ -89,6 +89,8 @@ gen_providers_txt(){
|
|||||||
ua=${5:-clash.meta}
|
ua=${5:-clash.meta}
|
||||||
exclude=${6#\#}
|
exclude=${6#\#}
|
||||||
include=${7#\#}
|
include=${7#\#}
|
||||||
|
[ -n "$exclude" ] && exclude_ele="\"exclude\": \"$exclude\","
|
||||||
|
[ -n "$include" ] && include_ele="\"include\": \"$include\","
|
||||||
if [ -n "$(echo $2|grep -E '^./')" ];then
|
if [ -n "$(echo $2|grep -E '^./')" ];then
|
||||||
cat >> "$TMPDIR"/providers/providers.json <<EOF
|
cat >> "$TMPDIR"/providers/providers.json <<EOF
|
||||||
{
|
{
|
||||||
@@ -105,8 +107,8 @@ EOF
|
|||||||
"path": "./providers/$tag.yaml",
|
"path": "./providers/$tag.yaml",
|
||||||
"user_agent": "$ua",
|
"user_agent": "$ua",
|
||||||
"update_interval": "${interval2}h",
|
"update_interval": "${interval2}h",
|
||||||
"exclude": "$exclude",
|
$exclude_ele
|
||||||
"include": "$include",
|
$include_ele
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
#通用部分生成
|
#通用部分生成
|
||||||
|
|||||||
Reference in New Issue
Block a user