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); diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index 4be156283c..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:=8 +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/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 f5bb524423..7deeddde99 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 @@ -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" @@ -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 @@ -605,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 @@ -626,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/ @@ -651,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 @@ -751,5 +748,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..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 @@ -13,8 +13,14 @@ 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 + rm -rf /tmp/luci-modulecache/* rm -f /tmp/luci-indexcache exit 0 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 ;; 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") diff --git a/package/lean/npc/Makefile b/package/lean/npc/Makefile index bb97ff1f91..75aaad684a 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)