-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.优化静态分流模式控制流程,改善该模式下的数据传 输品质,及 wireguard 客户端接通率。 2.修复「IPTV 机顶盒访问 IPTV 线路方式」设置为 「按服务地址访问」后,IPTV 连接失败的 bug。 3.优化 Web UI 服务事件触发接口,提高扩展能力。 4.更新运营商 IP 地址数据文件。
- Loading branch information
Showing
15 changed files
with
237 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# install.sh v4.2.1 | ||
# install.sh v4.2.2 | ||
# By LZ 妙妙呜 ([email protected]) | ||
|
||
# LZ RULE script for Asuswrt-Merlin Router | ||
|
@@ -11,7 +11,7 @@ | |
|
||
#BEIGIN | ||
|
||
LZ_VERSION=v4.2.1 | ||
LZ_VERSION=v4.2.2 | ||
TIMEOUT=10 | ||
CURRENT_PATH="${0%/*}" | ||
[ "${CURRENT_PATH:0:1}" != '/' ] && CURRENT_PATH="$( pwd )${CURRENT_PATH#*.}" | ||
|
@@ -248,9 +248,9 @@ lz_create_service_event_interface() { | |
/$( lz_get_delete_row_regular_expression_string "lz_rule_service.sh" )/d; | ||
/^[[:space:]]*$/d; | ||
}" "/jffs/scripts/service-event" | ||
sed -i "1a ${PATH_INTERFACE}/lz_rule_service.sh \$\{@\} \& # Added by LZRule" "/jffs/scripts/service-event" | ||
sed -i "1a ${PATH_INTERFACE}/lz_rule_service.sh \$\{@\} # Added by LZRule" "/jffs/scripts/service-event" | ||
chmod +x "/jffs/scripts/service-event" | ||
! grep -q "^${PATH_INTERFACE}/lz_rule_service[\.]sh \$[\{]@[\}] [\&]" "/jffs/scripts/service-event" && return "1" | ||
! grep -q "^${PATH_INTERFACE}/lz_rule_service[\.]sh \$[\{]@[\}] # Added by LZRule" "/jffs/scripts/service-event" && return "1" | ||
return "0" | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# lz_rule_config.sh v4.2.1 | ||
# lz_rule_config.sh v4.2.2 | ||
# By LZ 妙妙呜 ([email protected]) | ||
|
||
# 本软件采用CIDR(无类别域间路由,Classless Inter-Domain Routing)技术,是一个在Internet上创建附加地 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# lz_clear_custom_scripts_data.sh v4.2.1 | ||
# lz_clear_custom_scripts_data.sh v4.2.2 | ||
# By LZ 妙妙呜 ([email protected]) | ||
|
||
## 清除用户自定义脚本数据 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# lz_define_global_variables.sh v4.2.1 | ||
# lz_define_global_variables.sh v4.2.2 | ||
# By LZ 妙妙呜 ([email protected]) | ||
# QnkgTFog5aaZ5aaZ5ZGc77yI6Juk6J+G5aKp5YS/77yJ(首次运行标识,切勿修改) | ||
|
||
|
@@ -420,11 +420,16 @@ route_hardware_type="$( uname -m )" | |
## 路由器操作系统名称 | ||
route_os_name="$( uname -o )" | ||
|
||
## 路由器本地静态子网 | ||
route_static_subnet="$( ip -o -4 address list | awk '$2 == "br0" {print $4}' | grep -Eo '([0-9]{1,3}[\.]){3}[0-9]{1,3}([\/][0-9]{1,3}){0,1}' )" | ||
|
||
## 路由器本地IP地址 | ||
route_local_ip= | ||
route_local_ip="${route_static_subnet%/*}" | ||
|
||
## 路由器本地子网 | ||
route_local_subnet= | ||
route_local_subnet="" | ||
[ -n "${route_static_subnet}" ] && route_local_subnet="${route_static_subnet%.*}.0" | ||
[ "${route_static_subnet}" != "${route_static_subnet##*/}" ] && route_local_subnet="${route_local_subnet}/${route_static_subnet##*/}" | ||
|
||
## 静态分流模式整体通道推送命令是否执行(0--未执行;1--已执行) | ||
command_from_all_executed="0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# lz_initialize_config.sh v4.2.1 | ||
# lz_initialize_config.sh v4.2.2 | ||
# By LZ 妙妙呜 ([email protected]) | ||
|
||
## 初始化脚本配置 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# lz_rule_address_query.sh v4.2.1 | ||
# lz_rule_address_query.sh v4.2.2 | ||
# By LZ 妙妙呜 ([email protected]) | ||
|
||
## 网址信息查询脚本 | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# lz_rule_status.sh v4.2.1 | ||
# lz_rule_status.sh v4.2.2 | ||
# By LZ 妙妙呜 ([email protected]) | ||
|
||
## 显示脚本运行状态脚本 | ||
|
@@ -212,7 +212,7 @@ lz_get_domain_data_file_item_total_status() { | |
lz_get_unkonwn_ipv4_src_addr_data_file_item_status() { | ||
local retval="1" | ||
[ -f "${1}" ] && { | ||
retval="$( awk '($1 == "0.0.0.0/0" || $1 == "0.0.0.0") && NF >= "1" {print "0"; exit}' "${1}" )" | ||
retval="$( awk '($1 == "0.0.0.0/0" || $1 == "0.0.0.0" || $1 == "'"${status_route_local_subnet}"'") && NF >= "1" {print "0"; exit}' "${1}" )" | ||
[ -z "${retval}" ] && retval="1" | ||
} | ||
return "${retval}" | ||
|
@@ -227,7 +227,7 @@ lz_get_unkonwn_ipv4_src_addr_data_file_item_status() { | |
lz_get_unkonwn_ipv4_src_dst_addr_data_file_item_status() { | ||
local retval="1" | ||
[ -f "${1}" ] && { | ||
retval="$( awk '($1 == "0.0.0.0/0" || $1 == "0.0.0.0") && ($2 == "0.0.0.0/0" || $2 == "0.0.0.0") && NF >= "2" {print "0"; exit}' "${1}" )" | ||
retval="$( awk '($1 == "0.0.0.0/0" || $1 == "0.0.0.0" || $1 == "'"${status_route_local_subnet}"'") && ($2 == "0.0.0.0/0" || $2 == "0.0.0.0") && NF >= "2" {print "0"; exit}' "${1}" )" | ||
[ -z "${retval}" ] && retval="1" | ||
} | ||
return "${retval}" | ||
|
@@ -242,7 +242,7 @@ lz_get_unkonwn_ipv4_src_dst_addr_data_file_item_status() { | |
lz_get_unkonwn_ipv4_src_dst_addr_port_data_file_item_status() { | ||
local retval="1" | ||
[ -f "${1}" ] && { | ||
retval="$( awk '($1 == "0.0.0.0/0" || $1 == "0.0.0.0") && ($2 == "0.0.0.0/0" || $2 == "0.0.0.0") && NF == "2" {print "0"; exit}' "${1}" )" | ||
retval="$( awk '($1 == "0.0.0.0/0" || $1 == "0.0.0.0" || $1 == "'"${status_route_local_subnet}"'") && ($2 == "0.0.0.0/0" || $2 == "0.0.0.0") && NF == "2" {print "0"; exit}' "${1}" )" | ||
[ -z "${retval}" ] && retval="1" | ||
} | ||
return "${retval}" | ||
|
@@ -341,7 +341,11 @@ lz_set_parameter_status_variable() { | |
status_policy_mode= | ||
status_route_hardware_type= | ||
status_route_os_name= | ||
status_route_local_ip= | ||
status_route_static_subnet="$( ip -o -4 address list | awk '$2 == "br0" {print $4}' | grep -Eo '([0-9]{1,3}[\.]){3}[0-9]{1,3}([\/][0-9]{1,3}){0,1}' )" | ||
status_route_local_ip="${status_route_static_subnet%/*}" | ||
status_route_local_subnet="" | ||
[ -n "${status_route_static_subnet}" ] && status_route_local_subnet="${status_route_static_subnet%.*}.0" | ||
[ "${status_route_static_subnet}" != "${status_route_static_subnet##*/}" ] && status_route_local_subnet="${status_route_local_subnet}/${status_route_static_subnet##*/}" | ||
status_ip_rule_exist=0 | ||
status_adjust_traffic_policy="5" | ||
} | ||
|
@@ -417,7 +421,9 @@ lz_unset_parameter_status_variable() { | |
unset status_policy_mode | ||
unset status_route_hardware_type | ||
unset status_route_os_name | ||
unset status_route_static_subnet | ||
unset status_route_local_ip | ||
unset status_route_local_subnet | ||
unset status_ip_rule_exist | ||
unset status_adjust_traffic_policy | ||
} | ||
|
@@ -1083,7 +1089,6 @@ lz_get_policy_mode_status() { | |
## 返回值: | ||
## status_route_hardware_type--路由器硬件类型,全局常量 | ||
## status_route_os_name--路由器操作系统名称,全局常量 | ||
## status_route_local_ip--路由器本地IP地址,全局变量 | ||
lz_get_route_status_info() { | ||
echo "$(lzdate)" [$$]: --------------------------------------------- | tee -ai "${STATUS_LOG}" 2> /dev/null | ||
## 路由器硬件类型 | ||
|
@@ -1277,7 +1282,6 @@ lz_get_route_status_info() { | |
local local_route_local_link_status="Unknown" | ||
local local_route_local_encap="Unknown" | ||
local local_route_local_mac="Unknown" | ||
status_route_local_ip="Unknown" | ||
local local_route_local_bcast_ip="Unknown" | ||
local local_route_local_ip_mask="Unknown" | ||
|
||
|
@@ -1295,7 +1299,6 @@ lz_get_route_status_info() { | |
[ -z "${local_route_local_mac}" ] && local_route_local_mac="Unknown" | ||
|
||
## 获取路由器本地网络地址 | ||
status_route_local_ip="$( echo "${local_route_local_info}" | awk 'NR==2 {print $2}' | awk -F: '{print $2}' )" | ||
[ -z "${status_route_local_ip}" ] && status_route_local_ip="Unknown" | ||
|
||
## 获取路由器本地广播地址 | ||
|
@@ -1415,7 +1418,7 @@ lz_ss_support_status() { | |
## 1--未注册 | ||
lz_get_service_event_interface_status() { | ||
if [ ! -f "${1}" ] || [ ! -f "${2}" ]; then return "1"; fi; | ||
! grep -q "^[[:space:]]*$( lz_format_filename_regular_expression_string "${2}" )[[:space:]]\+\$[\{]@[\}][[:space:]]\+[\&]" "${1}" && return "1" | ||
! grep -q "^[[:space:]]*$( lz_format_filename_regular_expression_string "${2}" )[[:space:]]\+\$[\{]@[\}][[:space:]]\+" "${1}" && return "1" | ||
return "0" | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
# lz_vpn_daemon.sh v4.2.1 | ||
# lz_vpn_daemon.sh v4.2.2 | ||
# By LZ 妙妙呜 ([email protected]) | ||
|
||
## 虚拟专网客户端路由刷新处理后台守护进程脚本 | ||
|
@@ -9,7 +9,7 @@ | |
|
||
#BEIGIN | ||
## 版本号 | ||
LZ_VERSION=v4.2.1 | ||
LZ_VERSION=v4.2.2 | ||
|
||
## 项目接口文件部署路径 | ||
PATH_INTERFACE="${0%/*}" | ||
|
Oops, something went wrong.