Skip to content

Commit

Permalink
v4.4.6
Browse files Browse the repository at this point in the history
1.优化代码。
  • Loading branch information
larsonzh committed Jun 26, 2024
1 parent 0335b8a commit dcba2ea
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 24 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.5
# install.sh v4.4.6
# By LZ 妙妙呜 ([email protected])

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

#BEGIN

LZ_VERSION=v4.4.5
LZ_VERSION=v4.4.6
TIMEOUT=10
CURRENT_PATH="${0%/*}"
[ "${CURRENT_PATH:0:1}" != '/' ] && CURRENT_PATH="$( pwd )${CURRENT_PATH#*.}"
Expand Down
3 changes: 3 additions & 0 deletions source_codes/lz/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v4.4.6 (2024/6/26)
1.优化代码。

v4.4.5 (2024/6/25)
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.5
# lz_rule_config.sh v4.4.6
# By LZ 妙妙呜 ([email protected])

# 本软件采用CIDR(无类别域间路由,Classless Inter-Domain Routing)技术,是一个在Internet上创建附加地
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.5
# lz_clear_custom_scripts_data.sh v4.4.6
# 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.5
# lz_define_global_variables.sh v4.4.6
# By LZ 妙妙呜 ([email protected])
# QnkgTFog5aaZ5aaZ5ZGc77yI6Juk6J+G5aKp5YS/77yJ(首次运行标识,切勿修改)

Expand Down
23 changes: 16 additions & 7 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.5
# lz_initialize_config.sh v4.4.6
# By LZ 妙妙呜 ([email protected])

## 初始化脚本配置
Expand Down Expand Up @@ -31,7 +31,7 @@ lz_variable_initialize() {
## 返回值:无
lz_variable_uninitialize() {
eval "$( echo "${param_list}" | sed "s/^[[:alnum:]_][[:alnum:]_]*$/unset local_& local_ini_& local_&_changed local_&_flag/g" )"
unset local_default local_changed local_reinstall dnsmasq_enable
unset local_default local_changed local_reinstall dnsmasq_enable param_list
}

## 初始化配置参数函数
Expand Down Expand Up @@ -137,15 +137,16 @@ lz_init_cfg_data() {
/^[[:space:]]*local_ini_[[:alnum:]_][[:alnum:]_]*[=].*$/!d;
s/^[[:space:]]*local_ini_\([[:alnum:]_][[:alnum:]_]*\)[=].*$/\1/g;
p
}" "${PATH_FUNC}/lz_initialize_config.sh" 2> /dev/null )"
}" "${PATH_FUNC}/lz_initialize_config.sh" 2> /dev/null \
| awk '!i[$1]++ {print $1}' )"
eval "$( echo "${param_list}" | sed "s/^[[:alnum:]_][[:alnum:]_]*$/local_&=\"\${local_ini_&}\"/" )"
}

## 获取配置缺省参数列表函数
## 获取配置参数缺省值列表函数
## 输入项:
## 全局变量
## 返回值:
## 配置缺省参数列表
## 配置参数缺省值列表
lz_get_param_default_list() {
eval "$( echo "${param_list}" \
| sed -n "/^all_foreign_wan_port$/,/^custom_dualwan_scripts_filename$/{
Expand All @@ -154,11 +155,11 @@ lz_get_param_default_list() {
}" )" | sed 's/\"//g'
}

## 获取备份配置缺省参数列表函数
## 获取备份配置参数缺省值列表函数
## 输入项:
## 全局变量
## 返回值:
## 备份配置缺省参数列表
## 备份配置参数缺省值列表
lz_get_ini_param_default_list() {
eval "$( echo "${param_list}" \
| sed "s/^[[:alnum:]_][[:alnum:]_]*$/echo &=\"\${local_ini_&}\"/" )" \
Expand Down Expand Up @@ -1662,6 +1663,7 @@ lz_restore_config() {
| awk -v fname="${PATH_CONFIGS}/lz_rule_config.sh" 'NF != "0" {print "sed -i"$0" "fname}' )"
[ "${local_udpxy_used_changed}" = "1" ] \
&& sed -i "s|^[[:space:]]*udpxy_used=${local_udpxy_used}|udpxy_used=${local_ini_udpxy_used}|" "${PATH_FUNC}/lz_define_global_variables.sh"
eval "$( echo "${param_list}" | sed "s/^[[:alnum:]_][[:alnum:]_]*$/local_&=\"\${local_ini_&}\"/" )"
}

## 将当前配置优化至IPTV配置函数
Expand Down Expand Up @@ -2055,6 +2057,13 @@ if [ "${local_reinstall}" -gt "0" ]; then
sed -i "/QnkgTFog5aaZ5aaZ5ZGc77yI6Juk6J+G5aKp5YS\/77yJ/d" "${PATH_FUNC}/lz_define_global_variables.sh" > /dev/null 2>&1
fi

## 生成并传递软件的配置参数
eval "$( eval "$( echo "${param_list}" \
| sed -n "/^all_foreign_wan_port$/,/^custom_dualwan_scripts_filename$/{
s/^[[:alnum:]_][[:alnum:]_]*$/echo &=\"\${local_&}\"/;
p
}" )" )"

## 卸载变量
## 输入项:无
## 返回值:无
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.5
# lz_rule_address_query.sh v4.4.6
# 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.5
# lz_rule_func.sh v4.4.6
# 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.5
# lz_rule_status.sh v4.4.6
# 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.5
# lz_vpn_daemon.sh v4.4.6
# By LZ 妙妙呜 ([email protected])

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

## 版本号
LZ_VERSION=v4.4.5
LZ_VERSION=v4.4.6

## 项目接口文件部署路径
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.5
# lz_rule_service.sh v4.4.6
# 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.5
# lz_policy_routing.js v4.4.6
# By LZ 妙妙呜 ([email protected])
# LZ JavaScript for Asuswrt-Merlin Router
Expand Down
6 changes: 3 additions & 3 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.5
# lz_rule.sh v4.4.6
# By LZ 妙妙呜 ([email protected])

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

## 版本号
LZ_VERSION=v4.4.5
LZ_VERSION=v4.4.6

## 运行状态查询命令
SHOW_STATUS="status"
Expand Down Expand Up @@ -927,7 +927,7 @@ __lz_main() {
## 载入脚本配置参数
## 策略分流的用户自定义配置在/jffs/scripts/lz/configs/目录下的lz_rule_config.sh
## 和lz_rule_func_config.sh文件中
eval "${CALL_CONFIG_SUBROUTINE}/lz_rule_config.sh"
## eval "${CALL_CONFIG_SUBROUTINE}/lz_rule_config.sh"

## 全局常量、变量定义及初始化
## 输入项:
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.5
# uninstall.sh v4.4.6
# By LZ ([email protected])

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

#BEGIN

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

0 comments on commit dcba2ea

Please sign in to comment.