OSDN Git Service

luci-app-unblockneteasemusic: clean scripts & refresh debug func
authorZiMing Mo <msylgj@immortalwrt.org>
Thu, 17 Mar 2022 16:26:04 +0000 (00:26 +0800)
committerZiMing Mo <msylgj@immortalwrt.org>
Thu, 17 Mar 2022 16:26:04 +0000 (00:26 +0800)
applications/luci-app-unblockneteasemusic/root/etc/uci-defaults/luci-unblockneteasemusic
applications/luci-app-unblockneteasemusic/root/usr/share/unblockneteasemusic/debugging.sh

index 1e5c082..e866dd5 100755 (executable)
@@ -5,12 +5,6 @@ uci -q batch <<-EOF >/dev/null
        add ucitrack unblockneteasemusic
        set ucitrack.@unblockneteasemusic[-1].init=unblockneteasemusic
        commit ucitrack
-       delete firewall.unblockneteasemusic
-       set firewall.unblockneteasemusic=include
-       set firewall.unblockneteasemusic.type=script
-       set firewall.unblockneteasemusic.path=/var/etc/unblockneteasemusic.include
-       set firewall.unblockneteasemusic.reload=1
-       commit firewall
 EOF
 
 rm -f /tmp/luci-indexcache
index 5cee023..417b63e 100755 (executable)
@@ -64,13 +64,7 @@ echo -e "\n"
 
 [ "$procd_running_status" != "running" ] || {
        echo -e "Firewall info:"
-       iptables -t "nat" -L "netease_cloud_music" 2>"/dev/null" || echo -e 'Chain "netease_cloud_music" not found.'
-       echo -e ""
-       ipset list "neteasemusic" 2>"/dev/null" || echo -e 'Table "neteasemusic" not found.'
-       echo -e ""
-       ipset list "acl_neteasemusic_http" 2>"/dev/null" || echo -e 'Table "acl_neteasemusic_http" not found.'
-       echo -e ""
-       ipset list "acl_neteasemusic_https" 2>"/dev/null" || echo -e 'Table "acl_neteasemusic_https" not found.'
+       [ -e "/etc/nftables.d/90-unblockneteasemusic-rules.nft" ] && cat "/etc/nftables.d/90-unblockneteasemusic-rules.nft" || echo -e 'netease_cloud_music nft rule file not found.'
        echo -e ""
        cat "/tmp/dnsmasq.d/dnsmasq-unblockneteasemusic.conf"
        echo -e "\n"