~增加对自定义保留地址段的输入校验机制

~尝试修复部分情况下安装时未正确初始化的bug
~修复nftables-redir模式下会错误运行tproxy模式的bug
This commit is contained in:
juewuy
2024-10-20 10:52:27 +08:00
parent 530c0c4ce6
commit d8a9ce9ec3
3 changed files with 10 additions and 8 deletions

View File

@@ -61,8 +61,8 @@ gettar(){
echo 开始解压文件!
mkdir -p $CRASHDIR > /dev/null
tar -zxf '/tmp/ShellCrash.tar.gz' -C $CRASHDIR/ || tar -zxf '/tmp/ShellCrash.tar.gz' --no-same-owner -C $CRASHDIR/
if [ -f $CRASHDIR/init.sh ];then
. $CRASHDIR/init.sh >/dev/null
if [ -s $CRASHDIR/init.sh ];then
. $CRASHDIR/init.sh >/dev/null || $echo "\033[33m初始化失败请尝试本地安装\033[0m"
else
rm -rf /tmp/ShellCrash.tar.gz
$echo "\033[33m文件解压失败\033[0m"
@@ -203,8 +203,8 @@ echo -----------------------------------------------
gettar
echo -----------------------------------------------
echo ShellCrash 已经安装成功!
[ "$profile" = "~/.bashrc" ] && echo "请执行【source ~/.bashrc &> /dev/null】命令以加载环境变量"
[ -n "$(ls -l /bin/sh|grep -oE 'zsh')" ] && echo "请执行【source ~/.zshrc &> /dev/null】命令以加载环境变量"
[ "$profile" = "~/.bashrc" ] && echo "请执行【. ~/.bashrc &> /dev/null】命令以加载环境变量"
[ -n "$(ls -l /bin/sh|grep -oE 'zsh')" ] && echo "请执行【. ~/.zshrc &> /dev/null】命令以加载环境变量"
echo -----------------------------------------------
$echo "\033[33m输入\033[30;47m crash \033[0;33m命令即可管理\033[0m"
echo -----------------------------------------------