diff --git a/package/ctcgfw/luci-app-ssr-plus-Jo/Makefile b/package/ctcgfw/luci-app-ssr-plus-Jo/Makefile index c024a04e0f..a599a9d1b6 100644 --- a/package/ctcgfw/luci-app-ssr-plus-Jo/Makefile +++ b/package/ctcgfw/luci-app-ssr-plus-Jo/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-ssr-plus-Jo -PKG_VERSION:=149 -PKG_RELEASE:=20200229-5 +PKG_VERSION:=150 +PKG_RELEASE:=20200301-5 PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_V2ray \ CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Trojan \ diff --git a/package/ctcgfw/luci-app-ssr-plus-Jo/luasrc/model/cbi/shadowsocksr/status.lua b/package/ctcgfw/luci-app-ssr-plus-Jo/luasrc/model/cbi/shadowsocksr/status.lua index 1f6dba6007..d84c0cca01 100644 --- a/package/ctcgfw/luci-app-ssr-plus-Jo/luasrc/model/cbi/shadowsocksr/status.lua +++ b/package/ctcgfw/luci-app-ssr-plus-Jo/luasrc/model/cbi/shadowsocksr/status.lua @@ -1,7 +1,7 @@ -- Copyright (C) 2017 yushi studio -- Licensed to the public under the GNU General Public License v3. -local IPK_Version="20200229.149" +local IPK_Version="20200301.150" local m, s, o local redir_run=0 local reudp_run=0 diff --git a/package/ctcgfw/luci-app-ssr-plus-Jo/luasrc/model/cbi/shadowsocksr/subscription.lua b/package/ctcgfw/luci-app-ssr-plus-Jo/luasrc/model/cbi/shadowsocksr/subscription.lua index 9fd00a455c..33a8ac56f1 100644 --- a/package/ctcgfw/luci-app-ssr-plus-Jo/luasrc/model/cbi/shadowsocksr/subscription.lua +++ b/package/ctcgfw/luci-app-ssr-plus-Jo/luasrc/model/cbi/shadowsocksr/subscription.lua @@ -1,3 +1,6 @@ +-- Licensed to the public under the GNU General Public License v3. + +local m, s, o local shadowsocksr= "shadowsocksr" local uci = luci.model.uci.cursor() local server_table = {} @@ -9,6 +12,13 @@ if nixio.fs.access("/etc/dnsmasq.ssr/gfw_list.conf") then gfwmode=1 end +local uci = luci.model.uci.cursor() +local server_count = 0 +uci:foreach("vssr", "servers", function(s) + server_count = server_count + 1 +end) + +local fs = require "nixio.fs" local sys = require "luci.sys" if gfwmode==1 then @@ -50,13 +60,18 @@ o.template = "shadowsocksr/update_subscribe" -o = s:option(Button,"delete",translate("Delete all severs")) +o = s:option(Button,"delete",translate("Delete All Subscribe Severs")) o.inputstyle = "reset" - - +o.description = string.format(translate("Server Count") .. ": %d", server_count) o.write = function() - uci:delete_all("shadowsocksr", "servers", function(s) return true end) - uci:commit("shadowsocksr") +uci:delete_all("shadowsocksr", "servers", function(s) + if s["hashkey"] then + return true + else + return false + end +end) +uci:save("shadowsocksr") luci.sys.call("uci commit shadowsocksr && /etc/init.d/shadowsocksr stop") luci.http.redirect(luci.dispatcher.build_url("admin", "vpn", "shadowsocksr", "servers")) diff --git a/package/ctcgfw/luci-app-ssr-plus-Jo/po/zh-cn/ssr-plus.po b/package/ctcgfw/luci-app-ssr-plus-Jo/po/zh-cn/ssr-plus.po index 0852015b5f..dc781918ec 100644 --- a/package/ctcgfw/luci-app-ssr-plus-Jo/po/zh-cn/ssr-plus.po +++ b/package/ctcgfw/luci-app-ssr-plus-Jo/po/zh-cn/ssr-plus.po @@ -850,6 +850,7 @@ msgstr "V2服务器" msgid "SS/SSR/V2RAY Server" msgstr "SS/SSR/V2RAY 服务端" - +msgid "Delete All Subscribe Severs" +msgstr "删除所有订阅服务器节点" diff --git a/package/ctcgfw/luci-app-ssr-plus-Jo/root/etc/init.d/shadowsocksr b/package/ctcgfw/luci-app-ssr-plus-Jo/root/etc/init.d/shadowsocksr index 09f82f7740..e6e66f731b 100755 --- a/package/ctcgfw/luci-app-ssr-plus-Jo/root/etc/init.d/shadowsocksr +++ b/package/ctcgfw/luci-app-ssr-plus-Jo/root/etc/init.d/shadowsocksr @@ -1135,4 +1135,3 @@ stop() { del_cron } -