update 2023-04-19 16:21:38

This commit is contained in:
github-actions[bot] 2023-04-19 16:21:38 +08:00
parent ac325b8fea
commit b6b46b4f31
8 changed files with 35 additions and 26 deletions

View File

@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall PKG_NAME:=luci-app-passwall
PKG_VERSION:=4.64-5 PKG_VERSION:=4.64-6
PKG_RELEASE:= PKG_RELEASE:=
PKG_CONFIG_DEPENDS:= \ PKG_CONFIG_DEPENDS:= \

View File

@ -1389,7 +1389,7 @@ acl_app() {
lua $APP_PATH/helper_dnsmasq_add.lua -FLAG ${sid} -TMP_DNSMASQ_PATH $TMP_ACL_PATH/$sid/dnsmasq.d \ lua $APP_PATH/helper_dnsmasq_add.lua -FLAG ${sid} -TMP_DNSMASQ_PATH $TMP_ACL_PATH/$sid/dnsmasq.d \
-DNSMASQ_CONF_FILE $TMP_ACL_PATH/$sid/dnsmasq.conf -DEFAULT_DNS $DEFAULT_DNS -LOCAL_DNS $LOCAL_DNS \ -DNSMASQ_CONF_FILE $TMP_ACL_PATH/$sid/dnsmasq.conf -DEFAULT_DNS $DEFAULT_DNS -LOCAL_DNS $LOCAL_DNS \
-TUN_DNS "127.0.0.1#${_dns_port}" -REMOTE_FAKEDNS 0 -CHNROUTE_MODE_DEFAULT_DNS "${when_chnroute_default_dns:-direct}" -CHINADNS_DNS ${_china_ng_listen:-0} \ -TUN_DNS "127.0.0.1#${_dns_port}" -REMOTE_FAKEDNS 0 -CHNROUTE_MODE_DEFAULT_DNS "${when_chnroute_default_dns:-direct}" -CHINADNS_DNS ${_china_ng_listen:-0} \
-TCP_NODE $tcp_node -PROXY_MODE ${tcp_proxy_mode} -NO_PROXY_IPV6 ${_dnsmasq_filter_ipv6:-0} -NFTFLAG 0 \ -TCP_NODE $tcp_node -PROXY_MODE ${tcp_proxy_mode} -NO_PROXY_IPV6 ${_dnsmasq_filter_ipv6:-0} -NFTFLAG ${nftflag:-0} \
-NO_LOGIC_LOG 1 -NO_LOGIC_LOG 1
ln_run "$(first_type dnsmasq)" "dnsmasq_${sid}" "/dev/null" -C $TMP_ACL_PATH/$sid/dnsmasq.conf -x $TMP_ACL_PATH/$sid/dnsmasq.pid ln_run "$(first_type dnsmasq)" "dnsmasq_${sid}" "/dev/null" -C $TMP_ACL_PATH/$sid/dnsmasq.conf -x $TMP_ACL_PATH/$sid/dnsmasq.pid
eval node_${tcp_node}_$(echo -n "${tcp_proxy_mode}${remote_dns}" | md5sum | cut -d " " -f1)=${dnsmasq_port} eval node_${tcp_node}_$(echo -n "${tcp_proxy_mode}${remote_dns}" | md5sum | cut -d " " -f1)=${dnsmasq_port}
@ -1415,25 +1415,25 @@ acl_app() {
redir_port=$(get_new_port $(expr $redir_port + 1)) redir_port=$(get_new_port $(expr $redir_port + 1))
eval node_${tcp_node}_redir_port=$redir_port eval node_${tcp_node}_redir_port=$redir_port
tcp_port=$redir_port tcp_port=$redir_port
config_file="acl/${tcp_node}_SOCKS_${socks_port}.json"
local type=$(echo $(config_n_get $tcp_node type) | tr 'A-Z' 'a-z') local type=$(echo $(config_n_get $tcp_node type) | tr 'A-Z' 'a-z')
if [ -n "${type}" ] && ([ "${type}" = "v2ray" ] || [ "${type}" = "xray" ]); then if [ -n "${type}" ] && ([ "${type}" = "v2ray" ] || [ "${type}" = "xray" ]); then
config_file=$(echo $config_file | sed "s/SOCKS/TCP_SOCKS/g") config_file="acl/${tcp_node}_TCP_${redir_port}.json"
_extra_param="socks_address=127.0.0.1 socks_port=$socks_port" _extra_param="socks_address=127.0.0.1 socks_port=$socks_port"
if [ "$dns_mode" = "v2ray" -o "$dns_mode" = "xray" ]; then if [ "$dns_mode" = "v2ray" -o "$dns_mode" = "xray" ]; then
config_file=$(echo $config_file | sed "s/TCP_/DNS_TCP_/g")
dns_port=$(get_new_port $(expr $dns_port + 1)) dns_port=$(get_new_port $(expr $dns_port + 1))
_dns_port=$dns_port _dns_port=$dns_port
config_file=$(echo $config_file | sed "s/TCP_/DNS_${_dns_port}_TCP_/g")
_extra_param="dns_listen_port=${_dns_port} remote_dns_protocol=${v2ray_dns_mode} remote_dns_tcp_server=${remote_dns} remote_dns_doh=${remote_dns} dns_client_ip=${dns_client_ip} dns_query_strategy=${DNS_QUERY_STRATEGY}" _extra_param="dns_listen_port=${_dns_port} remote_dns_protocol=${v2ray_dns_mode} remote_dns_tcp_server=${remote_dns} remote_dns_doh=${remote_dns} dns_client_ip=${dns_client_ip} dns_query_strategy=${DNS_QUERY_STRATEGY}"
fi fi
[ "$udp_node" != "nil" ] && [ "$udp_node" = "tcp" ] && { [ "$udp_node" != "nil" ] && ([ "$udp_node" = "tcp" ] || [ "$udp_node" = "$tcp_node" ]) && {
config_file=$(echo $config_file | sed "s/TCP_/TCP_UDP_/g") config_file=$(echo $config_file | sed "s/TCP_/TCP_UDP_/g")
_extra_param="${_extra_param} udp_redir_port=$redir_port" _extra_param="${_extra_param} udp_redir_port=$redir_port"
} }
config_file="$TMP_PATH/$config_file" config_file="$TMP_PATH/$config_file"
run_v2ray flag=$tcp_node node=$tcp_node tcp_redir_port=$redir_port ${_extra_param} config_file=$config_file run_v2ray flag=$tcp_node node=$tcp_node tcp_redir_port=$redir_port ${_extra_param} config_file=$config_file
else else
config_file="acl/${tcp_node}_SOCKS_${socks_port}.json"
run_socks flag=$tcp_node node=$tcp_node bind=127.0.0.1 socks_port=$socks_port config_file=$config_file run_socks flag=$tcp_node node=$tcp_node bind=127.0.0.1 socks_port=$socks_port config_file=$config_file
local log_file=$TMP_ACL_PATH/ipt2socks_${tcp_node}_${redir_port}.log local log_file=$TMP_ACL_PATH/ipt2socks_${tcp_node}_${redir_port}.log
log_file="/dev/null" log_file="/dev/null"
@ -1460,6 +1460,9 @@ acl_app() {
udp_node=$UDP_NODE udp_node=$UDP_NODE
udp_port=$UDP_REDIR_PORT udp_port=$UDP_REDIR_PORT
fi fi
elif [ "$udp_node" = "$tcp_node" ]; then
udp_node=$tcp_node
udp_port=$tcp_port
else else
[ "$(config_get_type $udp_node nil)" = "nodes" ] && { [ "$(config_get_type $udp_node nil)" = "nodes" ] && {
if [ "$udp_node" = "$UDP_NODE" ]; then if [ "$udp_node" = "$UDP_NODE" ]; then
@ -1476,14 +1479,14 @@ acl_app() {
redir_port=$(get_new_port $(expr $redir_port + 1)) redir_port=$(get_new_port $(expr $redir_port + 1))
eval node_${udp_node}_redir_port=$redir_port eval node_${udp_node}_redir_port=$redir_port
udp_port=$redir_port udp_port=$redir_port
config_file="acl/${udp_node}_SOCKS_${socks_port}.json"
local type=$(echo $(config_n_get $udp_node type) | tr 'A-Z' 'a-z') local type=$(echo $(config_n_get $udp_node type) | tr 'A-Z' 'a-z')
if [ -n "${type}" ] && ([ "${type}" = "v2ray" ] || [ "${type}" = "xray" ]); then if [ -n "${type}" ] && ([ "${type}" = "v2ray" ] || [ "${type}" = "xray" ]); then
config_file=$(echo $config_file | sed "s/SOCKS/TCP_UDP_SOCKS/g") config_file="acl/${udp_node}_UDP_${redir_port}.json"
config_file="$TMP_PATH/$config_file" config_file="$TMP_PATH/$config_file"
run_v2ray flag=$udp_node node=$udp_node udp_redir_port=$redir_port config_file=$config_file run_v2ray flag=$udp_node node=$udp_node udp_redir_port=$redir_port config_file=$config_file
else else
config_file="acl/${udp_node}_SOCKS_${socks_port}.json"
run_socks flag=$udp_node node=$udp_node bind=127.0.0.1 socks_port=$socks_port config_file=$config_file run_socks flag=$udp_node node=$udp_node bind=127.0.0.1 socks_port=$socks_port config_file=$config_file
local log_file=$TMP_ACL_PATH/ipt2socks_${udp_node}_${redir_port}.log local log_file=$TMP_ACL_PATH/ipt2socks_${udp_node}_${redir_port}.log
log_file="/dev/null" log_file="/dev/null"

View File

@ -1018,12 +1018,17 @@ local function select_node(nodes, config)
end end
-- 还不行 随便找一个 -- 还不行 随便找一个
if not server then if not server then
server = uci:get_all(appname, '@' .. "nodes" .. '[0]') local nodes_table = {}
if server then for k, e in ipairs(api.get_valid_nodes()) do
if config.log == nil or config.log == true then if e.node_type == "normal" then
log('' .. config.remarks .. '' .. '无法找到最匹配的节点,当前已更换为:' .. server.remarks) nodes_table[#nodes_table + 1] = e
end end
server = server[".name"] end
if #nodes_table > 0 then
if config.log == nil or config.log == true then
log('' .. config.remarks .. '' .. '无法找到最匹配的节点,当前已更换为:' .. nodes_table[1].remarks)
end
server = nodes_table[1][".name"]
end end
end end
if server then if server then
@ -1037,15 +1042,15 @@ local function update_node(manual)
return return
end end
local group = "" local group = {}
for _, v in ipairs(nodeResult) do for _, v in ipairs(nodeResult) do
group = group .. v["remark"] group[v["remark"]] = true
end end
if manual == 0 and #group > 0 then if manual == 0 and next(group) then
uci:foreach(appname, "nodes", function(node) uci:foreach(appname, "nodes", function(node)
-- 如果未发现新节点或手动导入的节点就不要删除了... -- 如果未发现新节点或手动导入的节点就不要删除了...
if (node.add_from and group:find(node.add_from, 1, true)) and node.add_mode == "2" then if node.add_mode == "2" and (node.add_from and group[node.add_from] == true) then
uci:delete(appname, node['.name']) uci:delete(appname, node['.name'])
end end
end) end)
@ -1246,7 +1251,7 @@ local execute = function()
if #fail_list > 0 then if #fail_list > 0 then
for index, value in ipairs(fail_list) do for index, value in ipairs(fail_list) do
log(value.remark .. '订阅失败,可能是订阅地址失效,或是网络问题,请诊断!') log(string.format('【%s】订阅失败,可能是订阅地址失效,或是网络问题,请诊断!', value.remark))
end end
end end
update_node(0) update_node(0)

View File

@ -226,7 +226,8 @@ gen_service_file() {
if [ $1 == "ssr" ]; then if [ $1 == "ssr" ]; then
cat <<-EOF >$3 cat <<-EOF >$3
{ {
"server": ["[::0]", "0.0.0.0"], "server": "0.0.0.0",
"server_ipv6": "::",
"server_port": $(uci_get_by_name $2 server_port), "server_port": $(uci_get_by_name $2 server_port),
"mode": "tcp_and_udp", "mode": "tcp_and_udp",
"password": "$(uci_get_by_name $2 password)", "password": "$(uci_get_by_name $2 password)",
@ -242,7 +243,8 @@ gen_service_file() {
else else
cat <<-EOF >$3 cat <<-EOF >$3
{ {
"server": ["[::0]", "0.0.0.0"], "server": "0.0.0.0",
"server_ipv6": "::",
"server_port": $(uci_get_by_name $2 server_port), "server_port": $(uci_get_by_name $2 server_port),
"mode": "tcp_and_udp", "mode": "tcp_and_udp",
"password": "$(uci_get_by_name $2 password)", "password": "$(uci_get_by_name $2 password)",

View File

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:=Design Theme LUCI_TITLE:=Design Theme
LUCI_DEPENDS:= LUCI_DEPENDS:=
PKG_VERSION:=5.7.5-20230418 PKG_VERSION:=5.7.6-20230419
include $(TOPDIR)/feeds/luci/luci.mk include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -142,9 +142,6 @@
$("body").addClass(mainNodeName); $("body").addClass(mainNodeName);
} }
$(".cbi-button-up").val("");
$(".cbi-button-down").val("");
/** /**
* hook other "A Label" and add hash to it. * hook other "A Label" and add hash to it.
*/ */

View File

@ -7,7 +7,7 @@ $(".main > .main-left > .nav > .slide > .menu").click(function(){var ul=$(this).
return false;}});$(".main > .main-left > .nav > .slide > .slide-menu > li > a").click(function(){if(lastNode!=undefined) return false;}});$(".main > .main-left > .nav > .slide > .slide-menu > li > a").click(function(){if(lastNode!=undefined)
lastNode.removeClass("active");$(this).parent().addClass("active");$(".main > .loading").fadeIn("fast");return true;});$(".main > .main-left > .nav > .slide > .slide-menu > li").click(function(){if(lastNode!=undefined) lastNode.removeClass("active");$(this).parent().addClass("active");$(".main > .loading").fadeIn("fast");return true;});$(".main > .main-left > .nav > .slide > .slide-menu > li").click(function(){if(lastNode!=undefined)
lastNode.removeClass("active");$(this).addClass("active");$(".main > .loading").fadeIn("fast");window.location=$($(this).find("a")[0]).attr("href");return false;});if(getCurrentNodeByUrl()){mainNodeName="node-"+luciLocation[0]+"-"+luciLocation[1];mainNodeName=mainNodeName.replace(/[ \t\n\r\/]+/g,"_").toLowerCase();$("body").addClass(mainNodeName);} lastNode.removeClass("active");$(this).addClass("active");$(".main > .loading").fadeIn("fast");window.location=$($(this).find("a")[0]).attr("href");return false;});if(getCurrentNodeByUrl()){mainNodeName="node-"+luciLocation[0]+"-"+luciLocation[1];mainNodeName=mainNodeName.replace(/[ \t\n\r\/]+/g,"_").toLowerCase();$("body").addClass(mainNodeName);}
$(".cbi-button-up").val("");$(".cbi-button-down").val("");$("#maincontent > .container").find("a").each(function(){var that=$(this);var onclick=that.attr("onclick");if(onclick==undefined||onclick==""){that.click(function(){var href=that.attr("href");if(href.indexOf("#")==-1){$(".main > .loading").fadeIn("fast");return true;}});}});var showSide=false;$(".showSide").click(function(){if(showSide){$(".darkMask").stop(true).fadeOut("fast");$(".main-left").stop(true).animate({width:"0"},"fast");$(".main-right").css("overflow-y","auto");$("header>.container>.brand").css("padding","0 4.5rem") $("#maincontent > .container").find("a").each(function(){var that=$(this);var onclick=that.attr("onclick");if(onclick==undefined||onclick==""){that.click(function(){var href=that.attr("href");if(href.indexOf("#")==-1){$(".main > .loading").fadeIn("fast");return true;}});}});var showSide=false;$(".showSide").click(function(){if(showSide){$(".darkMask").stop(true).fadeOut("fast");$(".main-left").stop(true).animate({width:"0"},"fast");$(".main-right").css("overflow-y","auto");$("header>.container>.brand").css("padding","0 4.5rem")
showSide=false;}else{$(".darkMask").stop(true).fadeIn("fast");$(".main-left").stop(true).animate({width:"18rem"},"fast");$(".main-right").css("overflow-y","hidden");$(".showSide").css("display","none");$("header").css("box-shadow","18rem 2px 4px rgb(0 0 0 / 8%)") showSide=false;}else{$(".darkMask").stop(true).fadeIn("fast");$(".main-left").stop(true).animate({width:"18rem"},"fast");$(".main-right").css("overflow-y","hidden");$(".showSide").css("display","none");$("header").css("box-shadow","18rem 2px 4px rgb(0 0 0 / 8%)")
$("header>.container>.brand").css("padding",'0rem') $("header>.container>.brand").css("padding",'0rem')
showSide=true;}});$(".darkMask").click(function(){if(showSide){$(".darkMask").stop(true).fadeOut("fast");$(".main-left").stop(true).animate({width:"0"},"fast");$(".main-right").css("overflow-y","auto");$(".showSide").css("display","");$("header").css("box-shadow","0 2px 4px rgb(0 0 0 / 8%)") showSide=true;}});$(".darkMask").click(function(){if(showSide){$(".darkMask").stop(true).fadeOut("fast");$(".main-left").stop(true).animate({width:"0"},"fast");$(".main-right").css("overflow-y","auto");$(".showSide").css("display","");$("header").css("box-shadow","0 2px 4px rgb(0 0 0 / 8%)")

View File

@ -50,6 +50,8 @@
</div> </div>
<script> <script>
$(".cbi-button-up").val("");
$(".cbi-button-down").val("");
// fix legend position // fix legend position
$("legend").each(function () { $("legend").each(function () {
var that = $(this); var that = $(this);