From 8022677a1010a2f21db166bfb3ee33e21aec30e6 Mon Sep 17 00:00:00 2001 From: manyeechen <36399844+manyeechen@users.noreply.github.com> Date: Thu, 26 Mar 2020 18:32:09 +0800 Subject: [PATCH 1/7] npc:bump to 0.26.6 (#4033) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: web重新显示id #453 #461 #475 客户端首次添加时限速问题 mux计算长度重复赋值 服务端启动可能卡住的问题 #470 web中丢失的服务器ip项 --- package/lean/npc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/lean/npc/Makefile b/package/lean/npc/Makefile index 06f69cdb15..e311a246d4 100644 --- a/package/lean/npc/Makefile +++ b/package/lean/npc/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=npc -PKG_VERSION:=0.26.5 +PKG_VERSION:=0.26.6 PKG_RELEASE:=2 ifeq ($(ARCH),mipsel) From 5b588615d50d8bc8f3b70fca0b6319ffce7bd159 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Thu, 26 Mar 2020 18:32:43 +0800 Subject: [PATCH 2/7] mwlwifi: disable A-MSDU (#4030) Co-authored-by: LGA1150 --- .../kernel/mwlwifi/patches/001-disable-AMSDU.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 package/kernel/mwlwifi/patches/001-disable-AMSDU.patch diff --git a/package/kernel/mwlwifi/patches/001-disable-AMSDU.patch b/package/kernel/mwlwifi/patches/001-disable-AMSDU.patch new file mode 100644 index 0000000000..3fd48ca57e --- /dev/null +++ b/package/kernel/mwlwifi/patches/001-disable-AMSDU.patch @@ -0,0 +1,11 @@ +--- a/core.c ++++ b/core.c +@@ -982,7 +982,7 @@ struct ieee80211_hw *mwl_alloc_hw(int bu + priv->use_short_preamble = false; + priv->disable_2g = false; + priv->disable_5g = false; +- priv->tx_amsdu = true; ++ priv->tx_amsdu = false; + priv->hif.bus = bus_type; + priv->hif.ops = ops; + priv->hif.priv = (char *)priv + ALIGN(sizeof(*priv), NETDEV_ALIGN); From 791d2a171c03f087ae4154ca02ef84a872328959 Mon Sep 17 00:00:00 2001 From: R3pl4c3r <30682790+R3pl4c3r@users.noreply.github.com> Date: Thu, 26 Mar 2020 18:33:06 +0800 Subject: [PATCH 3/7] luci-app-ssr-plus: fix gfwlist update error (#4043) * luci-app-ssr-plus: fix gfwlist update error * Update Makefile --- package/lean/luci-app-ssr-plus/Makefile | 2 +- .../luci-app-ssr-plus/root/usr/share/shadowsocksr/update.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index 4be156283c..d71fe40f51 100644 --- a/package/lean/luci-app-ssr-plus/Makefile +++ b/package/lean/luci-app-ssr-plus/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-ssr-plus PKG_VERSION:=174 -PKG_RELEASE:=8 +PKG_RELEASE:=9 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) diff --git a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/update.lua b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/update.lua index a7c6394f76..634220c5b5 100644 --- a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/update.lua +++ b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/update.lua @@ -15,7 +15,7 @@ local log = function(...) end log('正在更新【GFW列表】数据库') -refresh_cmd = "wget-ssl --no-check-certificate -O- " .. uci:get_first('shadowsocksr', 'global', 'gfwlist_url', 'https://cdn.jsdelivr.net/gh/gfwlist/gfwlist/gfwlist.txt') .. " > /tmp/gfw.b64" +refresh_cmd = "wget-ssl --no-check-certificate -O - " .. uci:get_first('shadowsocksr', 'global', 'gfwlist_url', 'https://cdn.jsdelivr.net/gh/gfwlist/gfwlist/gfwlist.txt') .. " > /tmp/gfw.b64" sret = luci.sys.call(refresh_cmd .. " 2>/dev/null") if sret == 0 then luci.sys.call("/usr/bin/ssr-gfw") From 8d4027f17f6c14fcbfdf5767b02773f120c16bb9 Mon Sep 17 00:00:00 2001 From: lonwern Date: Thu, 26 Mar 2020 18:39:07 +0800 Subject: [PATCH 4/7] luci-app-ssr-plus: add "same" mode for global socks5 server (#4039) --- .../luasrc/model/cbi/shadowsocksr/advanced.lua | 1 + package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua index 353b6282f2..d7908e5e6e 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua @@ -75,6 +75,7 @@ s.anonymous = true o = s:option(ListValue, "server", translate("Server")) o:value("nil", translate("Disable")) +o:value("same", translate("Same as Global Server")) for _,key in pairs(key_table) do o:value(key,server_table[key]) end o.default = "nil" o.rmempty = false diff --git a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index e2eef3d428..2fb5238ffc 100755 --- a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -577,7 +577,8 @@ start_server() { start_local() { local local_server=$(uci_get_by_type socks5_proxy server nil) - [ "$local_server" = "nil" ] && return 1 + [ "$local_server" == "same" ] && local_server=$GLOBAL_SERVER + [ "$local_server" == "nil" ] && return 1 local local_type=$(uci_get_by_name $local_server type) mkdir -p /var/run /var/etc From e2b1d478602794a25601cdb782ec4d4f76027812 Mon Sep 17 00:00:00 2001 From: Mattraks <16359027+Mattraks@users.noreply.github.com> Date: Thu, 26 Mar 2020 19:14:15 +0800 Subject: [PATCH 5/7] luci-app-ssr-plus:Adjust uci-defaults (#4010) --- .../root/etc/init.d/shadowsocksr | 32 ++++++++----------- .../root/etc/uci-defaults/luci-ssr-plus | 13 ++++++-- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index 2fb5238ffc..02e7338a8a 100755 --- a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -373,7 +373,7 @@ start_redir() { else threads=$(uci_get_by_type global threads) fi - + if [ "$stype" == "ss" -o "$stype" == "ssr" ]; then local last_config_file=$CONFIG_FILE local pid_file="/var/run/ssr-retcp.pid" @@ -606,7 +606,7 @@ start_local() { rules() { if [ "$GLOBAL_SERVER" == "nil" ]; then return 1 - else + else redir_tcp=1 fi mkdir -p /var/run /var/etc @@ -627,12 +627,12 @@ start() { GLOBAL_SERVER=$switch_server switch_enable=1 fi - + NETFLIX_SERVER=$(uci_get_by_type global netflix_server nil) if [ "$NETFLIX_SERVER" == "same" ]; then NETFLIX_SERVER=$GLOBAL_SERVER fi - + if rules; then start_redir mkdir -p /tmp/dnsmasq.d && cp -a /etc/dnsmasq.ssr /tmp/ && cp -a /etc/dnsmasq.oversea /tmp/ @@ -652,35 +652,31 @@ start() { if [ "$NETFLIX_SERVER" != "nil" ]; then if [ "$NETFLIX_SERVER" != "$GLOBAL_SERVER" ]; then - cat /etc/config/netflix.list | while read line || [ -n "$line" ]; - do + cat /etc/config/netflix.list | while read line || [ -n "$line" ]; do sed -i "/$line/d" /tmp/dnsmasq.ssr/gfw_list.conf done - awk '!/^$/&&!/^#/{printf("ipset=/.%s/'"netflix"'\n",$0)}' /etc/config/netflix.list > /tmp/dnsmasq.ssr/netflix_forward.conf - awk '!/^$/&&!/^#/{printf("server=/.%s/'"127.0.0.1#5555"'\n",$0)}' /etc/config/netflix.list >> /tmp/dnsmasq.ssr/netflix_forward.conf + awk '!/^$/&&!/^#/{printf("ipset=/.%s/'"netflix"'\n",$0)}' /etc/config/netflix.list >/tmp/dnsmasq.ssr/netflix_forward.conf + awk '!/^$/&&!/^#/{printf("server=/.%s/'"127.0.0.1#5555"'\n",$0)}' /etc/config/netflix.list >>/tmp/dnsmasq.ssr/netflix_forward.conf ipset -N netflix hash:net 2>/dev/null - cat /etc/config/netflixip.list | while read nip || [ -n "$nip" ]; - do + cat /etc/config/netflixip.list | while read nip || [ -n "$nip" ]; do ipset add netflix $nip 2>/dev/null done else - cat /etc/config/netflix.list | while read line || [ -n "$line" ]; - do + cat /etc/config/netflix.list | while read line || [ -n "$line" ]; do sed -i "/$line/d" /tmp/dnsmasq.ssr/gfw_list.conf done - awk '!/^$/&&!/^#/{printf("ipset=/.%s/'"netflix"'\n",$0)}' /etc/config/netflix.list > /tmp/dnsmasq.ssr/netflix_forward.conf - awk '!/^$/&&!/^#/{printf("server=/.%s/'"127.0.0.1#5335"'\n",$0)}' /etc/config/netflix.list >> /tmp/dnsmasq.ssr/netflix_forward.conf + awk '!/^$/&&!/^#/{printf("ipset=/.%s/'"netflix"'\n",$0)}' /etc/config/netflix.list >/tmp/dnsmasq.ssr/netflix_forward.conf + awk '!/^$/&&!/^#/{printf("server=/.%s/'"127.0.0.1#5335"'\n",$0)}' /etc/config/netflix.list >>/tmp/dnsmasq.ssr/netflix_forward.conf ipset -N netflix hash:net 2>/dev/null - cat /etc/config/netflixip.list | while read nip || [ -n "$nip" ]; - do + cat /etc/config/netflixip.list | while read nip || [ -n "$nip" ]; do ipset add netflix $nip 2>/dev/null done fi else rm -f /tmp/dnsmasq.ssr/netflix_forward.conf fi - + /etc/init.d/dnsmasq restart >/dev/null 2>&1 fi start_server @@ -756,5 +752,3 @@ stop() { fi del_cron } - - diff --git a/package/lean/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus b/package/lean/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus index 563154cb7c..562c7c1bf4 100755 --- a/package/lean/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus +++ b/package/lean/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus @@ -13,8 +13,17 @@ uci -q batch <<-EOF >/dev/null commit firewall EOF -killall -q -9 ssr-monitor ss-redir ssr-redir ss-local ssr-local obfs-local v2ray-plugin v2ray trojan ipt2socks ssr-server kcptun-client dns2socks microsocks redsocks2 -/usr/share/shadowsocksr/gfw2ipset.sh +touch /etc/china_ssr.txt +touch /etc/config/white.list +touch /etc/config/black.list +touch /etc/config/netflix.list +touch /etc/config/netflixip.list +touch /etc/dnsmasq.ssr/ad.conf +touch /etc/dnsmasq.ssr/gfw_list.conf + +/etc/init.d/shadowsocksr enable +/etc/init.d/shadowsocksr stop + rm -rf /tmp/luci-modulecache/* rm -f /tmp/luci-indexcache exit 0 From 6d53bc90c6d474caa4de1e66fd5cdd75585a1c99 Mon Sep 17 00:00:00 2001 From: lean Date: Thu, 26 Mar 2020 19:19:02 +0800 Subject: [PATCH 6/7] luci-app-ssr-plus: revert /etc/ssr_ip --- package/lean/luci-app-ssr-plus/Makefile | 3 ++- package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr | 6 +++--- .../luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus | 3 --- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index d71fe40f51..9f54245d4d 100644 --- a/package/lean/luci-app-ssr-plus/Makefile +++ b/package/lean/luci-app-ssr-plus/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-ssr-plus PKG_VERSION:=174 -PKG_RELEASE:=9 +PKG_RELEASE:=10 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) @@ -58,6 +58,7 @@ define Build/Compile endef define Package/$(PKG_NAME)/conffiles +/etc/ssr_ip /etc/china_ssr.txt /etc/config/shadowsocksr /etc/config/white.list diff --git a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index 02e7338a8a..9df2187bab 100755 --- a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -91,7 +91,7 @@ gen_config_file() { if echo $hostip | grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" >/dev/null; then hostip=$hostip else - hostip=$(cat /tmp/ssr_ip) + hostip=$(cat /etc/ssr_ip) fi fi [ "$2" == "0" -a "$kcp_flag" == "1" ] && hostip="127.0.0.1" @@ -179,9 +179,9 @@ start_rules() { else server=$(ping $server -W 1 -s 1 -c 1 | grep PING | cut -d'(' -f 2 | cut -d')' -f1) if echo $server | grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" >/dev/null; then - echo $server >/tmp/ssr_ip + echo $server >/etc/ssr_ip else - server=$(cat /tmp/ssr_ip) + server=$(cat /etc/ssr_ip) fi fi kcp_server=$server diff --git a/package/lean/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus b/package/lean/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus index 562c7c1bf4..bd8d02a512 100755 --- a/package/lean/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus +++ b/package/lean/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus @@ -21,9 +21,6 @@ touch /etc/config/netflixip.list touch /etc/dnsmasq.ssr/ad.conf touch /etc/dnsmasq.ssr/gfw_list.conf -/etc/init.d/shadowsocksr enable -/etc/init.d/shadowsocksr stop - rm -rf /tmp/luci-modulecache/* rm -f /tmp/luci-indexcache exit 0 From 335ed370de742eea7292c396e53a232f06de0d12 Mon Sep 17 00:00:00 2001 From: Mattraks <16359027+Mattraks@users.noreply.github.com> Date: Thu, 26 Mar 2020 19:21:04 +0800 Subject: [PATCH 7/7] luci-app-ssr-plus:Maintenance Usage ssr-rules (#4016) --- package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules index 9719b82999..b752c58ac3 100755 --- a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules +++ b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules @@ -30,6 +30,9 @@ Valid options are: -p lan ip of will be global proxy -G lan ip of will be game mode proxy -D proxy ports + -F netflix mode + -N netflix server IP + -M netflix proxy mode -e extra options for iptables -o apply the rules to the OUTPUT chain -O apply the global rules to the OUTPUT chain @@ -71,6 +74,8 @@ flush_r() { ipset -X oversea 2>/dev/null ipset -X whitelist 2>/dev/null ipset -X blacklist 2>/dev/null + ipset -X netflix 2>/dev/null + ipset -X china 2>/dev/null [ -n "$FWI" ] && echo '#!/bin/sh' >$FWI return 0 } @@ -354,7 +359,7 @@ while getopts ":s:l:S:L:i:e:a:B:b:w:p:G:D:F:N:M:oOuUfgrczh" arg; do ;; M) NETFLIX_PROXY=$OPTARG - ;; + ;; o) OUTPUT=1 ;;