From 0dc110dacb00f138fecd618388969fd2029ed739 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 5 Jun 2023 23:36:02 +0800 Subject: [PATCH] update 2023-06-05 23:36:02 --- luci-app-passwall2/Makefile | 2 +- .../luasrc/passwall2/util_xray.lua | 19 +++++++++++++------ .../root/usr/share/passwall2/app.sh | 5 ++--- .../root/etc/uci-defaults/luci-wechatpush | 9 ++++----- v2ray-geodata/Makefile | 4 ++-- 5 files changed, 22 insertions(+), 17 deletions(-) diff --git a/luci-app-passwall2/Makefile b/luci-app-passwall2/Makefile index 73c9f0e66..8461ba082 100644 --- a/luci-app-passwall2/Makefile +++ b/luci-app-passwall2/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall2 -PKG_VERSION:=1.16-1 +PKG_VERSION:=1.16-3 PKG_RELEASE:= PKG_CONFIG_DEPENDS:= \ diff --git a/luci-app-passwall2/luasrc/passwall2/util_xray.lua b/luci-app-passwall2/luasrc/passwall2/util_xray.lua index 0bd37ab35..ae053d301 100644 --- a/luci-app-passwall2/luasrc/passwall2/util_xray.lua +++ b/luci-app-passwall2/luasrc/passwall2/util_xray.lua @@ -517,6 +517,7 @@ function gen_config(var) local remote_dns_port = var["-remote_dns_port"] local remote_dns_udp_server = var["-remote_dns_udp_server"] local remote_dns_fake = var["-remote_dns_fake"] + local remote_dns_fake_strategy = var["-remote_dns_fake_strategy"] local dns_cache = var["-dns_cache"] local dns_direct_domains = {} @@ -1032,15 +1033,21 @@ function gen_config(var) end if remote_dns_fake then fakedns = {} - fakedns[#fakedns + 1] = { + local fakedns4 = { ipPool = "198.18.0.0/16", poolSize = 65535 } - if dns_query_strategy == "UseIP" then - fakedns[#fakedns + 1] = { - ipPool = "fc00::/18", - poolSize = 65535 - } + local fakedns6 = { + ipPool = "fc00::/18", + poolSize = 65535 + } + if remote_dns_fake_strategy == "UseIP" then + table.insert(fakedns, fakedns4) + table.insert(fakedns, fakedns6) + elseif remote_dns_fake_strategy == "UseIPv4" then + table.insert(fakedns, fakedns4) + elseif remote_dns_fake_strategy == "UseIPv6" then + table.insert(fakedns, fakedns6) end local _remote_dns = { _flag = "remote_fakedns", diff --git a/luci-app-passwall2/root/usr/share/passwall2/app.sh b/luci-app-passwall2/root/usr/share/passwall2/app.sh index d20acbf51..35635cb4c 100755 --- a/luci-app-passwall2/root/usr/share/passwall2/app.sh +++ b/luci-app-passwall2/root/usr/share/passwall2/app.sh @@ -403,7 +403,7 @@ run_v2ray() { _extra_param="${_extra_param} -dns_query_strategy UseIP" _extra_param="${_extra_param} -direct_dns_port ${direct_dnsmasq_listen_port} -direct_dns_udp_server 127.0.0.1" _extra_param="${_extra_param} -remote_dns_port ${dns_remote_listen_port} -remote_dns_udp_server 127.0.0.1" - [ "$remote_fakedns" = "1" ] && _extra_param="${_extra_param} -remote_dns_fake 1" + [ "$remote_fakedns" = "1" ] && _extra_param="${_extra_param} -remote_dns_fake 1 -remote_dns_fake_strategy ${remote_dns_query_strategy}" } lua $UTIL_XRAY gen_config -node $node -redir_port $redir_port -tcp_proxy_way $tcp_proxy_way -loglevel $loglevel ${_extra_param} > $config_file @@ -995,8 +995,7 @@ start() { stop() { clean_log [ -n "$($(source $APP_PATH/iptables.sh get_ipt_bin) -t mangle -t nat -L -nv 2>/dev/null | grep "PSW2")" ] && source $APP_PATH/iptables.sh stop - [ -n "$(nft list chains 2>/dev/null | grep "PSW2")" ] && source $APP_PATH/nftables.sh stop - source $APP_PATH/iptables.sh stop + [ -n "$(nft list sets 2>/dev/null | grep "${CONFIG}_")" ] && source $APP_PATH/nftables.sh stop delete_ip2route kill_all v2ray-plugin obfs-local pgrep -f "sleep.*(6s|9s|58s)" | xargs kill -9 >/dev/null 2>&1 diff --git a/luci-app-serverchan/root/etc/uci-defaults/luci-wechatpush b/luci-app-serverchan/root/etc/uci-defaults/luci-wechatpush index 3499290af..99537c719 100755 --- a/luci-app-serverchan/root/etc/uci-defaults/luci-wechatpush +++ b/luci-app-serverchan/root/etc/uci-defaults/luci-wechatpush @@ -13,7 +13,7 @@ function get_config_serverchan(){ while [[ "$*" != "" ]]; do eval ${1}='`uci get serverchan.serverchan.$1`' 2>/dev/null uci del serverchan.serverchan.$1 2>/dev/null - uci commit serverchan + uci commit serverchan 2>/dev/null shift done } @@ -23,7 +23,7 @@ function serverchan_to_wechatpush_list(){ config_list=`uci get serverchan.serverchan.$1` 2>/dev/null [ -z "$config_list" ] && return uci del serverchan.serverchan.$1 2>/dev/null - uci commit serverchan + uci commit serverchan 2>/dev/null for config in $config_list ;do uci add_list wechatpush.config.$config_name="$config" done @@ -34,7 +34,7 @@ function serverchan_to_wechatpush_change(){ config=`uci get serverchan.serverchan.$1` 2>/dev/null [ -z "$config" ] && return uci del serverchan.serverchan.$1 2>/dev/null - uci commit serverchan + uci commit serverchan 2>/dev/null uci set wechatpush.config.$2=$config uci commit wechatpush } @@ -44,7 +44,7 @@ function serverchan_to_wechatpush_get(){ config=`uci get serverchan.serverchan.$1` 2>/dev/null [ -z "$config" ] && shift && continue uci del serverchan.serverchan.$1 2>/dev/null - uci commit serverchan + uci commit serverchan 2>/dev/null uci set wechatpush.config.${1}=${config} uci commit wechatpush shift @@ -171,4 +171,3 @@ serverchan_to_wechatpush_get \ uci commit wechatpush rm -rf "$serverchan_config" 2>/dev/null nohup sh -c 'while [ -f /var/lock/opkg.lock ]; do sleep 1; done; opkg remove luci-app-serverchan; rm -rf /tmp/luci-*' >/dev/null 2>&1 & - diff --git a/v2ray-geodata/Makefile b/v2ray-geodata/Makefile index 08d7f48c0..f6ef78a79 100644 --- a/v2ray-geodata/Makefile +++ b/v2ray-geodata/Makefile @@ -21,13 +21,13 @@ define Download/geoip HASH:=033864e77e40f8b9c1a5254bf85881515c51340d3d11e142a4e01594eb151914 endef -GEOSITE_VER:=20230601044045 +GEOSITE_VER:=20230605082026 GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER) define Download/geosite URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/ URL_FILE:=dlc.dat FILE:=$(GEOSITE_FILE) - HASH:=d20bcd23c185dd3102a2106ad5370bc615cfb33d9a818daaadefe7a2068fb9ef + HASH:=307d3bad2a232f12d370bcc357d86805f9aafc4bc9ea1efb18b50affbe28085b endef define Package/v2ray-geodata/template