Skip to content

Commit

Permalink
v4.4.4
Browse files Browse the repository at this point in the history
1.优化代码。
2.更新运营商 IP 地址数据文件。
  • Loading branch information
larsonzh committed Jun 12, 2024
1 parent 68f7d7b commit a5ede44
Show file tree
Hide file tree
Showing 16 changed files with 29 additions and 27 deletions.
4 changes: 2 additions & 2 deletions source_codes/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# install.sh v4.4.3
# install.sh v4.4.4
# By LZ 妙妙呜 ([email protected])

# LZ RULE script for Asuswrt-Merlin Router
Expand All @@ -11,7 +11,7 @@

#BEGIN

LZ_VERSION=v4.4.3
LZ_VERSION=v4.4.4
TIMEOUT=10
CURRENT_PATH="${0%/*}"
[ "${CURRENT_PATH:0:1}" != '/' ] && CURRENT_PATH="$( pwd )${CURRENT_PATH#*.}"
Expand Down
4 changes: 4 additions & 0 deletions source_codes/lz/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v4.4.4 (2024/6/12)
1.优化代码。
2.更新运营商 IP 地址数据文件。

v4.4.3 (2024/6/10)
1.优化代码。
2.更新运营商 IP 地址数据文件。
Expand Down
2 changes: 1 addition & 1 deletion source_codes/lz/configs/lz_rule_config.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# lz_rule_config.sh v4.4.3
# lz_rule_config.sh v4.4.4
# By LZ 妙妙呜 ([email protected])

# 本软件采用CIDR(无类别域间路由,Classless Inter-Domain Routing)技术,是一个在Internet上创建附加地
Expand Down
1 change: 0 additions & 1 deletion source_codes/lz/data/lz_all_cn_cidr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,6 @@
103.138.156.0/23
103.138.208.0/23
103.138.220.0/23
103.138.246.0/23
103.138.248.0/23
103.139.0.0/22
103.139.22.0/23
Expand Down
1 change: 0 additions & 1 deletion source_codes/lz/data/lz_othernet_cidr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,6 @@
103.138.156.0/23
103.138.208.0/23
103.138.220.0/23
103.138.246.0/23
103.138.248.0/23
103.139.0.0/22
103.139.22.0/23
Expand Down
2 changes: 1 addition & 1 deletion source_codes/lz/func/lz_clear_custom_scripts_data.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# lz_clear_custom_scripts_data.sh v4.4.3
# lz_clear_custom_scripts_data.sh v4.4.4
# By LZ 妙妙呜 ([email protected])

## 清除用户自定义脚本数据
Expand Down
2 changes: 1 addition & 1 deletion source_codes/lz/func/lz_define_global_variables.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# lz_define_global_variables.sh v4.4.3
# lz_define_global_variables.sh v4.4.4
# By LZ 妙妙呜 ([email protected])
# QnkgTFog5aaZ5aaZ5ZGc77yI6Juk6J+G5aKp5YS/77yJ(首次运行标识,切勿修改)

Expand Down
18 changes: 9 additions & 9 deletions source_codes/lz/func/lz_initialize_config.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# lz_initialize_config.sh v4.4.3
# lz_initialize_config.sh v4.4.4
# By LZ 妙妙呜 ([email protected])

## 初始化脚本配置
Expand Down Expand Up @@ -1357,7 +1357,7 @@ lz_get_config_data() {
## 返回值:无
lz_full_data_backup() {
eval "$( echo "${param_list}" | awk '/^[[:alnum:]_][[:alnum:]_]*$/ {print "echo lz_config_"$1"=\$\{local_"$1"\}"}' )" > "${PATH_CONFIGS}/lz_rule_config.box"
chmod +x "${PATH_CONFIGS}/lz_rule_config.box" > /dev/null 2>&1
chmod 775 "${PATH_CONFIGS}/lz_rule_config.box" > /dev/null 2>&1
}

## 备份已改变的配置参数函数
Expand All @@ -1380,7 +1380,7 @@ lz_backup_data_changed() {
## 返回值:无
lz_restore_box_data() {
eval "$( echo "${param_list}" | awk '/^[[:alnum:]_][[:alnum:]_]*$/ {print "echo lz_config_"$1"=\$\{local_ini_"$1"\}"}' )" > "${PATH_CONFIGS}/lz_rule_config.box"
chmod +x "${PATH_CONFIGS}/lz_rule_config.box" > /dev/null 2>&1
chmod 775 "${PATH_CONFIGS}/lz_rule_config.box" > /dev/null 2>&1
}

## 获取备份参数函数
Expand Down Expand Up @@ -1775,7 +1775,7 @@ lz_restore_to_rn() {
## 全局常量及变量
## 返回值:无
lz_get_web_data_to_config() {
{ [ ! -f "${SETTINGSFILE}" ] || [ ! -f "${1}" ]; } && return
{ [ ! -s "${SETTINGSFILE}" ] || [ ! -s "${1}" ]; } && return
awk -v key="" -v value="" -v str_buffer="" -v fname="${1}" -v prefix="${2}" '$1 ~ /^lz_rule_/ {
key=$1;
sub(/^lz_rule_/, "", key);
Expand Down Expand Up @@ -1845,10 +1845,10 @@ local_reinstall="$( grep -c 'QnkgTFog5aaZ5aaZ5ZGc77yI6Juk6J[\+]G5aKp5YS[\/]77yJ'
## 新安装的脚本,更新主运行脚本和脚本配置文件中初始缺省的路径数据
if [ "${local_reinstall}" -gt "0" ] && [ "${PATH_LZ}" != "/jffs/scripts/lz" ]; then
sed -i "s:/jffs/scripts/lz/:${PATH_LZ}/:g" "${PATH_LZ}/lz_rule.sh" > /dev/null 2>&1
[ -f "${PATH_CONFIGS}/lz_rule_config.sh" ] && sed -i "s:/jffs/scripts/lz/:${PATH_LZ}/:g" "${PATH_CONFIGS}/lz_rule_config.sh" > /dev/null 2>&1
[ -s "${PATH_CONFIGS}/lz_rule_config.sh" ] && sed -i "s:/jffs/scripts/lz/:${PATH_LZ}/:g" "${PATH_CONFIGS}/lz_rule_config.sh" > /dev/null 2>&1
fi

if [ -f "${PATH_CONFIGS}/lz_rule_config.box" ]; then
if [ -s "${PATH_CONFIGS}/lz_rule_config.box" ]; then
## 清除lz_rule_config.box内的错误字符内容及参数赋值等式中等号两端的非法空格
sed -i -e 's/^[[:space:]][[:space:]]*//' -e 's/[=][=][=]*/=/g' \
-e 's/^\(lz_config_[[:alnum:]_][[:alnum:]_]*\)[[:space:]][[:space:]]*\([=].*\)$/\1\2/' \
Expand All @@ -1865,8 +1865,8 @@ fi
## 输入项:
## 全局常量
## 返回值:无
if [ ! -f "${PATH_CONFIGS}/lz_rule_config.sh" ]; then
if [ ! -f "${PATH_CONFIGS}/lz_rule_config.box" ]; then
if [ ! -s "${PATH_CONFIGS}/lz_rule_config.sh" ]; then
if [ ! -s "${PATH_CONFIGS}/lz_rule_config.box" ]; then
## 创建新的备份文件
## 完整备份配置参数
## 输入项:
Expand Down Expand Up @@ -1924,7 +1924,7 @@ fi
## 返回值:无
[ "${local_reinstall}" = "0" ] && lz_get_web_data_to_config "${PATH_CONFIGS}/lz_rule_config.sh" ""

if [ ! -f "${PATH_CONFIGS}/lz_rule_config.box" ]; then
if [ ! -s "${PATH_CONFIGS}/lz_rule_config.box" ]; then
## lz_rule_config.box不存在,属新安装脚本
## 直接创建并填入lz_rule_config.sh中的配置参数
## 获取配置参数函数
Expand Down
2 changes: 1 addition & 1 deletion source_codes/lz/func/lz_rule_address_query.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# lz_rule_address_query.sh v4.4.3
# lz_rule_address_query.sh v4.4.4
# By LZ 妙妙呜 ([email protected])

## 网址信息查询脚本
Expand Down
2 changes: 1 addition & 1 deletion source_codes/lz/func/lz_rule_func.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# lz_rule_func.sh v4.4.3
# lz_rule_func.sh v4.4.4
# By LZ 妙妙呜 ([email protected])

#BEGIN
Expand Down
2 changes: 1 addition & 1 deletion source_codes/lz/func/lz_rule_status.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# lz_rule_status.sh v4.4.3
# lz_rule_status.sh v4.4.4
# By LZ 妙妙呜 ([email protected])

## 显示脚本运行状态脚本
Expand Down
4 changes: 2 additions & 2 deletions source_codes/lz/func/lz_vpn_daemon.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# lz_vpn_daemon.sh v4.4.3
# lz_vpn_daemon.sh v4.4.4
# By LZ 妙妙呜 ([email protected])

## 虚拟专网客户端路由刷新处理后台守护进程脚本
Expand All @@ -10,7 +10,7 @@
#BEGIN

## 版本号
LZ_VERSION=v4.4.3
LZ_VERSION=v4.4.4

## 项目接口文件部署路径
PATH_INTERFACE="${0%/*}"
Expand Down
2 changes: 1 addition & 1 deletion source_codes/lz/interface/lz_rule_service.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# lz_rule_service.sh v4.4.3
# lz_rule_service.sh v4.4.4
# By LZ 妙妙呜 ([email protected])

## 服务接口脚本
Expand Down
2 changes: 1 addition & 1 deletion source_codes/lz/js/lz_policy_routing.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
# lz_policy_routing.js v4.4.3
# lz_policy_routing.js v4.4.4
# By LZ 妙妙呜 ([email protected])
# LZ JavaScript for Asuswrt-Merlin Router
Expand Down
4 changes: 2 additions & 2 deletions source_codes/lz/lz_rule.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# lz_rule.sh v4.4.3
# lz_rule.sh v4.4.4
# By LZ 妙妙呜 ([email protected])

# 本软件采用CIDR(无类别域间路由,Classless Inter-Domain Routing)技术,是一个在Internet上创建附加地
Expand Down Expand Up @@ -80,7 +80,7 @@
## -------------全局数据定义及初始化-------------------

## 版本号
LZ_VERSION=v4.4.3
LZ_VERSION=v4.4.4

## 运行状态查询命令
SHOW_STATUS="status"
Expand Down
4 changes: 2 additions & 2 deletions source_codes/lz/uninstall.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# uninstall.sh v4.4.3
# uninstall.sh v4.4.4
# By LZ ([email protected])

# LZ RULE script for Asuswrt-Merlin Router
Expand All @@ -8,7 +8,7 @@

#BEGIN

LZ_VERSION=v4.4.3
LZ_VERSION=v4.4.4
TIMEOUT=10
CURRENT_PATH="${0%/*}"
[ "${CURRENT_PATH:0:1}" != '/' ] && CURRENT_PATH="$( pwd )${CURRENT_PATH#*.}"
Expand Down

0 comments on commit a5ede44

Please sign in to comment.