~在线sub增加hysteria协议支持
~尝试适配nft基础模式ipv6支持
~增加ipv6本地地址过滤
~尝试修复延迟启动
~优化内置下载功能
~优化在线配置生成功能
This commit is contained in:
juewuy
2022-11-25 21:47:03 +08:00
parent 85d13e2483
commit 155fb8c970
3 changed files with 84 additions and 32 deletions

View File

@@ -14,7 +14,7 @@ getconfig(){
#检查重复行并去除
[ -n "$(awk 'a[$0]++' $ccfg)" ] && awk '!a[$0]++' $ccfg > $ccfg
#检查时间戳
touch /tmp/clash_$USER/start_time
touch /tmp/clash_start_time
#使用source加载配置文件
source $ccfg
#设置默认核心资源目录
@@ -59,8 +59,8 @@ getconfig(){
run="\033[32m正在运行$redir_mod\033[0m"
VmRSS=`cat /proc/$PID/status|grep -w VmRSS|awk '{print $2,$3}'`
#获取运行时长
touch /tmp/clash_$USER/start_time #用于延迟启动的校验
start_time=$(cat /tmp/clash_$USER/start_time)
touch /tmp/clash_start_time #用于延迟启动的校验
start_time=$(cat /tmp/clash_start_time)
if [ -n "$start_time" ]; then
time=$((`date +%s`-start_time))
day=$((time/86400))
@@ -100,6 +100,7 @@ errornum(){
echo -e "\033[31m请输入正确的数字\033[0m"
}
startover(){
source $ccfg
echo -e "\033[32mclash服务已启动\033[0m"
if [ -n "$hostdir" ];then
echo -e "请使用 \033[4;32mhttp://$host$hostdir\033[0m 管理内置规则"