Skip to content

Commit

Permalink
v4.2.8
Browse files Browse the repository at this point in the history
1.在「客户端至预设目标 IP 地址静态直通策略 - 客
  户端 IP 地址至目标 IP 地址列表」的页面帮助和
  脚本配置文件的相应功能注释内容中添加 NAS 设备
  远程访问接入示例及说明。
2.更新运营商 IP 地址数据文件。
  • Loading branch information
larsonzh authored Oct 24, 2023
1 parent 300739e commit c684117
Show file tree
Hide file tree
Showing 17 changed files with 83 additions and 22 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.2.7
# install.sh v4.2.8
# By LZ 妙妙呜 ([email protected])

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

#BEIGIN

LZ_VERSION=v4.2.7
LZ_VERSION=v4.2.8
TIMEOUT=10
CURRENT_PATH="${0%/*}"
[ "${CURRENT_PATH:0:1}" != '/' ] && CURRENT_PATH="$( pwd )${CURRENT_PATH#*.}"
Expand Down
7 changes: 7 additions & 0 deletions source_codes/lz/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
v4.2.8 (2023/10/24)
1.在「客户端至预设目标 IP 地址静态直通策略 - 客
户端 IP 地址至目标 IP 地址列表」的页面帮助和
脚本配置文件的相应功能注释内容中添加 NAS 设备
远程访问接入示例及说明。
2.更新运营商 IP 地址数据文件。

v4.2.7 (2023/10/21)
1.完善「负载均衡」相关的页面帮助和代码注释内容。
2.完善「查询路由器出口」命令功能代码。
Expand Down
20 changes: 19 additions & 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.2.7
# lz_rule_config.sh v4.2.8
# By LZ 妙妙呜 ([email protected])

# 本软件采用CIDR(无类别域间路由,Classless Inter-Domain Routing)技术,是一个在Internet上创建附加地
Expand Down Expand Up @@ -399,6 +399,12 @@ wan_1_src_to_dst_addr=5
## 例如:
## 192.168.50.101 103.10.4.108
## 可以用0.0.0.0/0表示所有未知IP地址。
## NAS设备远程访问接入示例:
## 假设NAS设备本地地址为 192.168.50.123,通过本WAN口远程访问,需填写如下两个条目:
## 192.168.50.123 0.0.0.0/0
## 0.0.0.0/0 192.168.50.123
## 若有多个NAS设备通过本WAN口远程访问,可按地址依次填写条目对。
## 同时要求“外网访问路由器主机入口”和路由器系统的DDNS出口必须也设置为本WAN口。
## 建议列表条目数量不要多于512条,否则易导致脚本启动时系统策略路由库加载数据时间过长。
## 为避免脚本升级更新或重新安装导致配置重置为缺省状态,建议更改文件名或文件存储路径。
wan_1_src_to_dst_addr_file="/jffs/scripts/lz/data/wan_1_src_to_dst_addr.txt"
Expand All @@ -417,6 +423,12 @@ wan_2_src_to_dst_addr=5
## 例如:
## 192.168.50.102 210.74.192.0/18
## 可以用0.0.0.0/0表示所有未知IP地址。
## NAS设备远程访问接入示例:
## 假设NAS设备本地地址为 192.168.50.123,通过本WAN口远程访问,需填写如下两个条目:
## 192.168.50.123 0.0.0.0/0
## 0.0.0.0/0 192.168.50.123
## 若有多个NAS设备通过本WAN口远程访问,可按地址依次填写条目对。
## 同时要求“外网访问路由器主机入口”和路由器系统的DDNS出口必须也设置为本WAN口。
## 建议列表条目数量不要多于512条,否则易导致脚本启动时系统策略路由库加载数据时间过长。
## 为避免脚本升级更新或重新安装导致配置重置为缺省状态,建议更改文件名或文件存储路径。
wan_2_src_to_dst_addr_file="/jffs/scripts/lz/data/wan_2_src_to_dst_addr.txt"
Expand All @@ -435,6 +447,12 @@ high_wan_1_src_to_dst_addr=5
## 例如:
## 192.168.50.0/27 0.0.0.0/0
## 可以用0.0.0.0/0表示所有未知IP地址。
## NAS设备远程访问接入示例:
## 假设NAS设备本地地址为 192.168.50.123,通过本WAN口远程访问,需填写如下两个条目:
## 192.168.50.123 0.0.0.0/0
## 0.0.0.0/0 192.168.50.123
## 若有多个NAS设备通过本WAN口远程访问,可按地址依次填写条目对。
## 同时要求“外网访问路由器主机入口”和路由器系统的DDNS出口必须也设置为本WAN口。
## 建议列表条目数量不要多于512条,否则易导致脚本启动时系统策略路由库加载数据时间过长。
## 为避免脚本升级更新或重新安装导致配置重置为缺省状态,建议更改文件名或文件存储路径。
high_wan_1_src_to_dst_addr_file="/jffs/scripts/lz/data/high_wan_1_src_to_dst_addr.txt"
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 @@ -5421,7 +5421,6 @@
223.116.0.0/15
223.120.128.0/17
223.121.128.0/17
223.122.128.0/17
223.123.128.0/17
223.124.0.0/14
223.128.0.0/15
Expand Down
1 change: 0 additions & 1 deletion source_codes/lz/data/lz_cmcc_cidr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,5 @@
223.116.0.0/15
223.120.128.0/17
223.121.128.0/17
223.122.128.0/17
223.123.128.0/17
223.124.0.0/14
4 changes: 3 additions & 1 deletion source_codes/lz/data/lz_hk_cidr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
36.255.56.0/22
36.255.192.0/22
36.255.204.0/22
37.139.131.0/24
39.109.0.0/17
42.2.0.0/15
42.98.0.0/16
Expand Down Expand Up @@ -1745,6 +1746,7 @@
192.207.91.0/24
192.245.196.0/24
192.245.208.0/24
193.47.63.0/24
194.26.72.0/22
198.59.162.0/23
198.99.173.0/24
Expand Down Expand Up @@ -2244,7 +2246,7 @@
223.118.0.0/15
223.120.0.0/17
223.121.0.0/17
223.122.0.0/17
223.122.0.0/16
223.130.32.0/19
223.197.0.0/16
223.223.216.0/22
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.2.7
# lz_clear_custom_scripts_data.sh v4.2.8
# 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.2.7
# lz_define_global_variables.sh v4.2.8
# By LZ 妙妙呜 ([email protected])
# QnkgTFog5aaZ5aaZ5ZGc77yI6Juk6J+G5aKp5YS/77yJ(首次运行标识,切勿修改)

Expand Down
20 changes: 19 additions & 1 deletion 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.2.7
# lz_initialize_config.sh v4.2.8
# By LZ 妙妙呜 ([email protected])

## 初始化脚本配置
Expand Down Expand Up @@ -816,6 +816,12 @@ wan_1_src_to_dst_addr=${local_wan_1_src_to_dst_addr}
## 例如:
## 192.168.50.101 103.10.4.108
## 可以用0.0.0.0/0表示所有未知IP地址。
## NAS设备远程访问接入示例:
## 假设NAS设备本地地址为 192.168.50.123,通过本WAN口远程访问,需填写如下两个条目:
## 192.168.50.123 0.0.0.0/0
## 0.0.0.0/0 192.168.50.123
## 若有多个NAS设备通过本WAN口远程访问,可按地址依次填写条目对。
## 同时要求“外网访问路由器主机入口”和路由器系统的DDNS出口必须也设置为本WAN口。
## 建议列表条目数量不要多于512条,否则易导致脚本启动时系统策略路由库加载数据时间过长。
## 为避免脚本升级更新或重新安装导致配置重置为缺省状态,建议更改文件名或文件存储路径。
wan_1_src_to_dst_addr_file=${local_wan_1_src_to_dst_addr_file}
Expand All @@ -834,6 +840,12 @@ wan_2_src_to_dst_addr=${local_wan_2_src_to_dst_addr}
## 例如:
## 192.168.50.102 210.74.192.0/18
## 可以用0.0.0.0/0表示所有未知IP地址。
## NAS设备远程访问接入示例:
## 假设NAS设备本地地址为 192.168.50.123,通过本WAN口远程访问,需填写如下两个条目:
## 192.168.50.123 0.0.0.0/0
## 0.0.0.0/0 192.168.50.123
## 若有多个NAS设备通过本WAN口远程访问,可按地址依次填写条目对。
## 同时要求“外网访问路由器主机入口”和路由器系统的DDNS出口必须也设置为本WAN口。
## 建议列表条目数量不要多于512条,否则易导致脚本启动时系统策略路由库加载数据时间过长。
## 为避免脚本升级更新或重新安装导致配置重置为缺省状态,建议更改文件名或文件存储路径。
wan_2_src_to_dst_addr_file=${local_wan_2_src_to_dst_addr_file}
Expand All @@ -852,6 +864,12 @@ high_wan_1_src_to_dst_addr=${local_high_wan_1_src_to_dst_addr}
## 例如:
## 192.168.50.0/27 0.0.0.0/0
## 可以用0.0.0.0/0表示所有未知IP地址。
## NAS设备远程访问接入示例:
## 假设NAS设备本地地址为 192.168.50.123,通过本WAN口远程访问,需填写如下两个条目:
## 192.168.50.123 0.0.0.0/0
## 0.0.0.0/0 192.168.50.123
## 若有多个NAS设备通过本WAN口远程访问,可按地址依次填写条目对。
## 同时要求“外网访问路由器主机入口”和路由器系统的DDNS出口必须也设置为本WAN口。
## 建议列表条目数量不要多于512条,否则易导致脚本启动时系统策略路由库加载数据时间过长。
## 为避免脚本升级更新或重新安装导致配置重置为缺省状态,建议更改文件名或文件存储路径。
high_wan_1_src_to_dst_addr_file=${local_high_wan_1_src_to_dst_addr_file}
Expand Down
6 changes: 3 additions & 3 deletions 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.2.7
# lz_rule_address_query.sh v4.2.8
# By LZ 妙妙呜 ([email protected])

## 网址信息查询脚本
Expand Down Expand Up @@ -1015,12 +1015,12 @@ lz_aq_resolve_ip() {
| sed 's/[\.]$//g' | tr '[:A-Z:]' '[:a-z:]' )"
[ -z "${local_ip}" ] && {
local_ip="$( echo "${1}" | sed -e 's/^[[:space:]]*\([^[:space:]].*$\)/\1/g' -e 's/[[:space:]]\+/ /g' -e 's/\(^.*[^ ]\)[ ]*$/\1/g' \
| sed -n 1p| tr '[:A-Z:]' '[:a-z:]' )"
| sed -n 1p | tr '[:A-Z:]' '[:a-z:]' )"
local_domain_name=""
}
else
local_ip="$( echo "${1}" | sed -e 's/^[[:space:]]*\([^[:space:]].*$\)/\1/g' -e 's/[[:space:]]\+/ /g' -e 's/\(^.*[^ ]\)[ ]*$/\1/g' \
| sed -n 1p| tr '[:A-Z:]' '[:a-z:]' )"
| sed -n 1p | tr '[:A-Z:]' '[:a-z:]' )"
local_domain_name=""
fi
fi
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.2.7
# lz_rule_func.sh v4.2.8
# By LZ 妙妙呜 ([email protected])

#BEIGIN
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.2.7
# lz_rule_status.sh v4.2.8
# 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.2.7
# lz_vpn_daemon.sh v4.2.8
# By LZ 妙妙呜 ([email protected])

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

#BEIGIN
## 版本号
LZ_VERSION=v4.2.7
LZ_VERSION=v4.2.8

## 项目接口文件部署路径
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.2.7
# lz_rule_service.sh v4.2.8
# By LZ 妙妙呜 ([email protected])

## 服务接口脚本
Expand Down
20 changes: 19 additions & 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.2.7
# lz_policy_routing.js v4.2.8
# By LZ 妙妙呜 ([email protected])
# LZ JavaScript for Asuswrt-Merlin Router
Expand Down Expand Up @@ -794,6 +794,12 @@ function openOverHint(itemNum) {
content += "192.168.50.101&nbsp;103.10.4.108<br />";
content += "0.0.0.0/0&nbsp;202.89.233.100<br />";
content += "<br />可以用 <b>0.0.0.0/0</b> 表示所有未知IP地址。<br />";
content += "<br /><b>NAS 设备</b>远程访问接入示例:<br />";
content += "假设 NAS 设备本地地址为 192.168.50.123,通过本 WAN 口远程访问,需填写如下两个条目:<br />";
content += "192.168.50.123&nbsp;0.0.0.0/0<br />";
content += "0.0.0.0/0&nbsp;192.168.50.123<br />";
content += "若有多个 NAS 设备通过本 WAN 口远程访问,可按地址依次填写条目对。<br />";
content += "同时要求<b>外部网络(WAN) - 策略路由(IPv4) - 高级 - 远程连接策略 - 远程接入口</b>和路由器系统的 <b>DDNS</b> 出口必须也设置为本 WAN 口。<br />";
content += "<br />建议列表条目数量不要多于512条,否则易导致软件启动时系统<b>策略路由</b>库加载数据时间过长。<br />";
content += "<br />为避免软件升级更新或重新安装导致配置重置为缺省状态,建议更改文件名或文件存储路径。</div>";
} else if (itemNum == 31) {
Expand All @@ -804,6 +810,12 @@ function openOverHint(itemNum) {
content += "<br />例如:<br />";
content += "192.168.50.102&nbsp;210.74.0.0/16<br />";
content += "<br />可以用 <b>0.0.0.0/0</b> 表示所有未知IP地址。<br />";
content += "<br /><b>NAS 设备</b>远程访问接入示例:<br />";
content += "假设 NAS 设备本地地址为 192.168.50.123,通过本 WAN 口远程访问,需填写如下两个条目:<br />";
content += "192.168.50.123&nbsp;0.0.0.0/0<br />";
content += "0.0.0.0/0&nbsp;192.168.50.123<br />";
content += "若有多个 NAS 设备通过本 WAN 口远程访问,可按地址依次填写条目对。<br />";
content += "同时要求<b>外部网络(WAN) - 策略路由(IPv4) - 高级 - 远程连接策略 - 远程接入口</b>和路由器系统的 <b>DDNS</b> 出口必须也设置为本 WAN 口。<br />";
content += "<br />建议列表条目数量不要多于512条,否则易导致软件启动时系统<b>策略路由</b>库加载数据时间过长。<br />";
content += "<br />为避免软件升级更新或重新安装导致配置重置为缺省状态,建议更改文件名或文件存储路径。</div>";
} else if (itemNum == 32) {
Expand All @@ -817,6 +829,12 @@ function openOverHint(itemNum) {
content += "<br />例如:<br />";
content += "192.168.50.0/27&nbsp;0.0.0.0/0<br />";
content += "<br />可以用 <b>0.0.0.0/0</b> 表示所有未知IP地址。<br />";
content += "<br /><b>NAS 设备</b>远程访问接入示例:<br />";
content += "假设 NAS 设备本地地址为 192.168.50.123,通过本 WAN 口远程访问,需填写如下两个条目:<br />";
content += "192.168.50.123&nbsp;0.0.0.0/0<br />";
content += "0.0.0.0/0&nbsp;192.168.50.123<br />";
content += "若有多个 NAS 设备通过本 WAN 口远程访问,可按地址依次填写条目对。<br />";
content += "同时要求<b>外部网络(WAN) - 策略路由(IPv4) - 高级 - 远程连接策略 - 远程接入口</b>和路由器系统的 <b>DDNS</b> 出口必须也设置为本 WAN 口。<br />";
content += "<br />建议列表条目数量不要多于512条,否则易导致软件启动时系统<b>策略路由</b>库加载数据时间过长。<br />";
content += "<br />为避免软件升级更新或重新安装导致配置重置为缺省状态,建议更改文件名或文件存储路径。</div>";
} else if (itemNum == 34) {
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.2.7
# lz_rule.sh v4.2.8
# By LZ 妙妙呜 ([email protected])

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

## 版本号
LZ_VERSION=v4.2.7
LZ_VERSION=v4.2.8

## 运行状态查询命令
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.2.7
# uninstall.sh v4.2.8
# By LZ ([email protected])

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

# BEIGIN

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

0 comments on commit c684117

Please sign in to comment.