luci-app-ssr-plus: bump to 180-6

This commit is contained in:
CN_SZTL 2020-08-27 03:24:54 +08:00
parent 7ec42fee31
commit b322a0575d
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
8 changed files with 54 additions and 18 deletions

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ssr-plus
PKG_VERSION:=180
PKG_RELEASE:=5
PKG_RELEASE:=6
include $(INCLUDE_DIR)/package.mk

View File

@ -50,6 +50,7 @@ o.rmempty = false
o = s:option(Value, "adblock_url", translate("adblock_url"))
o:value("https://anti-ad.net/anti-ad-for-dnsmasq.conf", translate("anti-AD"))
o:value("https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt", translate("Easylist China"))
o.default = "https://anti-ad.net/anti-ad-for-dnsmasq.conf"
o:depends("adblock", "1")
o.description = translate("Support AdGuardHome and DNSMASQ format list")

View File

@ -700,10 +700,6 @@ start() {
cat <<-EOF >/tmp/dnsmasq.d/dnsmasq-ssr.conf
conf-dir=/tmp/dnsmasq.ssr
EOF
if [ "$(uci_get_by_type global adblock 0)" == "1" ]; then
cp -rf /etc/ssr/ad.conf /tmp/dnsmasq.ssr/
awk '!/^$/&&!/^#/{printf("address=/%s/''\n",$0)}' /etc/ssr/deny.list >/tmp/dnsmasq.ssr/denylist.conf
fi
if rules; then
if start_redir_tcp; then
start_redir_udp

View File

@ -3902,7 +3902,6 @@
103.139.212.0/23
103.140.8.0/23
103.140.14.0/23
103.140.46.0/23
103.140.70.0/23
103.140.126.0/23
103.140.140.0/23
@ -4074,6 +4073,12 @@
103.154.32.0/23
103.154.40.0/23
103.154.66.0/23
103.154.162.0/23
103.154.164.0/23
103.154.168.0/23
103.154.242.0/23
103.155.14.0/23
103.155.16.0/23
103.192.0.0/22
103.192.4.0/22
103.192.8.0/22

View File

@ -1816,6 +1816,8 @@ server=/community.windy.com/127.0.0.1#5335
ipset=/community.windy.com/gfwlist
server=/communitychoicecu.com/127.0.0.1#5335
ipset=/communitychoicecu.com/gfwlist
server=/comparitech.com/127.0.0.1#5335
ipset=/comparitech.com/gfwlist
server=/compileheart.com/127.0.0.1#5335
ipset=/compileheart.com/gfwlist
server=/compress.to/127.0.0.1#5335
@ -1910,6 +1912,8 @@ server=/ctao.org/127.0.0.1#5335
ipset=/ctao.org/gfwlist
server=/ctfriend.net/127.0.0.1#5335
ipset=/ctfriend.net/gfwlist
server=/cthlo.github.io/127.0.0.1#5335
ipset=/cthlo.github.io/gfwlist
server=/ctitv.com.tw/127.0.0.1#5335
ipset=/ctitv.com.tw/gfwlist
server=/cts.com.tw/127.0.0.1#5335
@ -1984,6 +1988,8 @@ server=/daidostup.ru/127.0.0.1#5335
ipset=/daidostup.ru/gfwlist
server=/dailidaili.com/127.0.0.1#5335
ipset=/dailidaili.com/gfwlist
server=/dailymail.co.uk/127.0.0.1#5335
ipset=/dailymail.co.uk/gfwlist
server=/dailymotion.com/127.0.0.1#5335
ipset=/dailymotion.com/gfwlist
server=/dailyview.tw/127.0.0.1#5335
@ -3666,6 +3672,8 @@ server=/googlebot.com/127.0.0.1#5335
ipset=/googlebot.com/gfwlist
server=/googlechinawebmaster.com/127.0.0.1#5335
ipset=/googlechinawebmaster.com/gfwlist
server=/googlechrome.github.io/127.0.0.1#5335
ipset=/googlechrome.github.io/gfwlist
server=/googlecode.com/127.0.0.1#5335
ipset=/googlecode.com/gfwlist
server=/googlecommerce.com/127.0.0.1#5335
@ -6130,6 +6138,8 @@ server=/nylon-angel.com/127.0.0.1#5335
ipset=/nylon-angel.com/gfwlist
server=/nylonstockingsonline.com/127.0.0.1#5335
ipset=/nylonstockingsonline.com/gfwlist
server=/nypost.com/127.0.0.1#5335
ipset=/nypost.com/gfwlist
server=/nyt.com/127.0.0.1#5335
ipset=/nyt.com/gfwlist
server=/nytchina.com/127.0.0.1#5335
@ -7062,6 +7072,8 @@ server=/robustnessiskey.com/127.0.0.1#5335
ipset=/robustnessiskey.com/gfwlist
server=/rocket-inc.net/127.0.0.1#5335
ipset=/rocket-inc.net/gfwlist
server=/rocketcdn.me/127.0.0.1#5335
ipset=/rocketcdn.me/gfwlist
server=/rocksdb.org/127.0.0.1#5335
ipset=/rocksdb.org/gfwlist
server=/rojo.com/127.0.0.1#5335
@ -8102,6 +8114,8 @@ server=/themoviedb.org/127.0.0.1#5335
ipset=/themoviedb.org/gfwlist
server=/thenewslens.com/127.0.0.1#5335
ipset=/thenewslens.com/gfwlist
server=/thepiratebay.ee/127.0.0.1#5335
ipset=/thepiratebay.ee/gfwlist
server=/thepiratebay.org/127.0.0.1#5335
ipset=/thepiratebay.org/gfwlist
server=/theporndude.com/127.0.0.1#5335
@ -9996,6 +10010,8 @@ server=/youdontcare.com/127.0.0.1#5335
ipset=/youdontcare.com/gfwlist
server=/youjizz.com/127.0.0.1#5335
ipset=/youjizz.com/gfwlist
server=/youlucky.com/127.0.0.1#5335
ipset=/youlucky.com/gfwlist
server=/youmaker.com/127.0.0.1#5335
ipset=/youmaker.com/gfwlist
server=/youngpornvideos.com/127.0.0.1#5335

View File

@ -1,9 +1,10 @@
#!/bin/sh -e
if [ -f /tmp/adnew.conf ]; then
if (grep -wq "address=" /tmp/adnew.conf); then
cp /tmp/adnew.conf /tmp/ssr-update.$1
if [ -f /tmp/ssr-update.$1 ]; then
if (grep -wq "address=" /tmp/ssr-update.$1); then
return $?
else
cp /tmp/ssr-update.$1 /tmp/adnew.conf
cat /tmp/adnew.conf | grep ^\|\|[^\*]*\^$ | sed -e 's:||:address\=\/:' -e 's:\^:/0\.0\.0\.0:' >/tmp/ssr-update.$1
rm -f /tmp/adnew.conf
fi
fi
rm -f /tmp/adnew.conf

View File

@ -126,7 +126,7 @@ ipset_r() {
$IPT -I SS_SPEC_WAN_AC -m set --match-set blacklist dst -j SS_SPEC_WAN_FW
$IPT -I SS_SPEC_WAN_AC -m set --match-set whitelist dst -j RETURN
if [ $(ipset list music -name -quiet | grep music) ]; then
$IPT -I SS_SPEC_WAN_AC -m set --match-set music dst -j RETURN 2>/dev/null
$IPT -I SS_SPEC_WAN_AC -m set --match-set music dst -j RETURN 2>/dev/null
fi
for ip in $WAN_BP_IP; do ipset -! add whitelist $ip; done
for ip in $WAN_FW_IP; do ipset -! add blacklist $ip; done
@ -143,7 +143,9 @@ ipset_r() {
ipset -! add whitelist $NETFLIX_IP
fi
;;
2) $IPT -I SS_SPEC_WAN_AC -p tcp -m set --match-set netflix dst -j REDIRECT --to-ports $local_port ;;
2)
$IPT -I SS_SPEC_WAN_AC -p tcp -m set --match-set netflix dst -j REDIRECT --to-ports $local_port
;;
esac
return $?
}

View File

@ -11,9 +11,10 @@ if [ "$NETFLIX_SERVER" != "nil" ]; then
netflix() {
if [ -f "/tmp/dnsmasq.ssr/gfw_list.conf" ]; then
for line in $(cat /etc/ssr/netflix.list); do sed -i "/$line/d" /tmp/dnsmasq.ssr/gfw_list.conf; done
for line in $(cat /etc/ssr/netflix.list); do sed -i "/$line/d" /tmp/dnsmasq.ssr/gfw_base.conf; done
fi
awk '!/^$/&&!/^#/{printf("ipset=/.%s/'"netflix"'\n",$0)}' /etc/ssr/netflix.list >/tmp/dnsmasq.ssr/netflix_forward.conf
awk '!/^$/&&!/^#/{printf("server=/.%s/'"127.0.0.1#$1"'\n",$0)}' /etc/ssr/netflix.list >>/tmp/dnsmasq.ssr/netflix_forward.conf
awk '!/^$/&&!/^#/{printf("ipset=/%s/'"netflix"'\n",$0)}' /etc/ssr/netflix.list >/tmp/dnsmasq.ssr/netflix_forward.conf
awk '!/^$/&&!/^#/{printf("server=/%s/'"127.0.0.1#$1"'\n",$0)}' /etc/ssr/netflix.list >>/tmp/dnsmasq.ssr/netflix_forward.conf
}
if [ "$NETFLIX_SERVER" != "$GLOBAL_SERVER" ]; then
netflix 5555
@ -23,8 +24,22 @@ if [ "$NETFLIX_SERVER" != "nil" ]; then
else
rm -f /tmp/dnsmasq.ssr/netflix_forward.conf
fi
if [ "$1" == "" ]; then
awk '!/^$/&&!/^#/{printf("ipset=/.%s/'"blacklist"'\n",$0)}' /etc/ssr/black.list >/tmp/dnsmasq.ssr/blacklist_forward.conf
awk '!/^$/&&!/^#/{printf("server=/.%s/'"127.0.0.1#5335"'\n",$0)}' /etc/ssr/black.list >>/tmp/dnsmasq.ssr/blacklist_forward.conf
awk '!/^$/&&!/^#/{printf("ipset=/.%s/'"whitelist"'\n",$0)}' /etc/ssr/white.list >/tmp/dnsmasq.ssr/whitelist_forward.conf
for line in $(cat /etc/ssr/black.list); do sed -i "/$line/d" /tmp/dnsmasq.ssr/gfw_list.conf; done
for line in $(cat /etc/ssr/black.list); do sed -i "/$line/d" /tmp/dnsmasq.ssr/gfw_base.conf; done
for line in $(cat /etc/ssr/white.list); do sed -i "/$line/d" /tmp/dnsmasq.ssr/gfw_list.conf; done
for line in $(cat /etc/ssr/white.list); do sed -i "/$line/d" /tmp/dnsmasq.ssr/gfw_base.conf; done
for line in $(cat /etc/ssr/deny.list); do sed -i "/$line/d" /tmp/dnsmasq.ssr/gfw_list.conf; done
for line in $(cat /etc/ssr/deny.list); do sed -i "/$line/d" /tmp/dnsmasq.ssr/gfw_base.conf; done
awk '!/^$/&&!/^#/{printf("ipset=/%s/'"blacklist"'\n",$0)}' /etc/ssr/black.list >/tmp/dnsmasq.ssr/blacklist_forward.conf
awk '!/^$/&&!/^#/{printf("server=/%s/'"127.0.0.1#5335"'\n",$0)}' /etc/ssr/black.list >>/tmp/dnsmasq.ssr/blacklist_forward.conf
awk '!/^$/&&!/^#/{printf("ipset=/%s/'"whitelist"'\n",$0)}' /etc/ssr/white.list >/tmp/dnsmasq.ssr/whitelist_forward.conf
awk '!/^$/&&!/^#/{printf("address=/%s/''\n",$0)}' /etc/ssr/deny.list >/tmp/dnsmasq.ssr/denylist.conf
if [ "$(uci_get_by_type global adblock 0)" == "1" ]; then
[ "$1" == "" ] && cp -f /etc/ssr/ad.conf /tmp/dnsmasq.ssr/
if [ -f "/tmp/dnsmasq.ssr/ad.conf" ]; then
for line in $(cat /etc/ssr/black.list); do sed -i "/$line/d" /tmp/dnsmasq.ssr/ad.conf; done
for line in $(cat /etc/ssr/white.list); do sed -i "/$line/d" /tmp/dnsmasq.ssr/ad.conf; done
for line in $(cat /etc/ssr/deny.list); do sed -i "/$line/d" /tmp/dnsmasq.ssr/ad.conf; done
for line in $(cat /etc/ssr/netflix.list); do sed -i "/$line/d" /tmp/dnsmasq.ssr/ad.conf; done
fi
fi