Merge Lean's source
This commit is contained in:
commit
a4804b29c1
11
package/kernel/mwlwifi/patches/001-disable-AMSDU.patch
Normal file
11
package/kernel/mwlwifi/patches/001-disable-AMSDU.patch
Normal file
@ -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);
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -30,6 +30,9 @@ Valid options are:
|
||||
-p <fp_lan_ips> lan ip of will be global proxy
|
||||
-G <gm_lan_ips> lan ip of will be game mode proxy
|
||||
-D <proxy_ports> proxy ports
|
||||
-F netflix mode
|
||||
-N netflix server IP
|
||||
-M netflix proxy mode
|
||||
-e <extra_options> 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
|
||||
;;
|
||||
|
||||
@ -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")
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user