mirror of
https://github.com/juewuy/ShellCrash.git
synced 2024-11-16 11:42:18 +08:00
~修复仅设置ip地址过滤时局域网过滤功能依然显示未启用的bug
~修复使用自定义ip规则时,singbox内核启动报错的问题 ~修复删除自定义ip规则时的报错问题
This commit is contained in:
parent
4d84fdaaff
commit
f481248a18
|
@ -1504,7 +1504,7 @@ normal_set() { #基础设置
|
|||
[ -z "$cn_ip_route" ] && cn_ip_route=未开启
|
||||
[ -z "$local_proxy" ] && local_proxy=未开启
|
||||
[ -z "$quic_rj" ] && quic_rj=未开启
|
||||
[ -z "$(cat ${CRASHDIR}/configs/mac)" ] && mac_return=未开启 || mac_return=已启用
|
||||
[ -z "$(cat ${CRASHDIR}/configs/mac ${CRASHDIR}/configs/ip_filter 2>/dev/null)" ] && mac_return=未开启 || mac_return=已启用
|
||||
#
|
||||
echo -----------------------------------------------
|
||||
echo -e "\033[30;47m欢迎使用功能设置菜单:\033[0m"
|
||||
|
|
|
@ -793,6 +793,7 @@ EOF
|
|||
[ -n "$(grep -Ev ^# "$CRASHDIR"/yamls/rules.yaml 2>/dev/null)" ] && {
|
||||
cat "$CRASHDIR"/yamls/rules.yaml |
|
||||
sed '/#.*/d' |
|
||||
sed 's/,no-resolve//g' |
|
||||
grep -oE '\-.*,.*,.*' |
|
||||
sed 's/- DOMAIN-SUFFIX,/{ "domain_suffix": [ "/g' |
|
||||
sed 's/- DOMAIN-KEYWORD,/{ "domain_keyword": [ "/g' |
|
||||
|
|
|
@ -65,7 +65,7 @@ setrules(){ #自定义规则
|
|||
}
|
||||
del_rule_type(){
|
||||
echo -e "输入对应数字即可移除相应规则:"
|
||||
sed -i '/^ *$/d' $YAMLSDIR/rules.yaml
|
||||
sed -i '/^ *$/d; /^#/d' $YAMLSDIR/rules.yaml
|
||||
cat $YAMLSDIR/rules.yaml | grep -Ev '^#' | awk -F "#" '{print " "NR" "$1$2$3}'
|
||||
echo -----------------------------------------------
|
||||
echo -e " 0 返回上级菜单"
|
||||
|
@ -74,9 +74,8 @@ setrules(){ #自定义规则
|
|||
0) ;;
|
||||
'') ;;
|
||||
*)
|
||||
text=$(cat $YAMLSDIR/rules.yaml | grep -Ev '^#' | sed -n "$num p" | awk '{print $2}')
|
||||
if [ -n "$text" ];then
|
||||
sed -i "/$text/d" $YAMLSDIR/rules.yaml
|
||||
if [ "$num" -le "$(wc -l < $YAMLSDIR/rules.yaml)" ];then
|
||||
sed -i "${num}d" $YAMLSDIR/rules.yaml
|
||||
sleep 1
|
||||
del_rule_type
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user