diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index 01d944667..e04c703f5 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_RELEASE:=142 -PKG_VERSION:=2 +PKG_VERSION:=3 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) include $(INCLUDE_DIR)/package.mk diff --git a/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua b/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua index 4ce824791..e5d5bf80d 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua @@ -19,7 +19,6 @@ function index() entry({"admin", "services", "shadowsocksr", "check"}, call("check_status")) entry({"admin", "services", "shadowsocksr", "refresh"}, call("refresh_data")) entry({"admin", "services", "shadowsocksr", "subscribe"}, call("subscribe")) - entry({"admin", "services", "shadowsocksr", "checkport"}, call("check_port")) entry({"admin", "services", "shadowsocksr", "log"},form("shadowsocksr/log"),_("Log"), 80).leaf = true entry({"admin", "services", "shadowsocksr","run"},call("act_status")).leaf=true entry({"admin", "services", "shadowsocksr", "ping"}, call("act_ping")).leaf=true @@ -116,7 +115,7 @@ end luci.sys.exec("rm -f /tmp/china_ssr.txt ") else if nixio.fs.access("/usr/bin/wget-ssl") then - refresh_cmd="wget-ssl --no-check-certificate -O - ".. luci.model.uci.cursor():get_first(shadowsocksr, 'global', 'adblock_url','https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt') .." > /tmp/adnew.conf" + refresh_cmd="wget-ssl --no-check-certificate -O - ".. luci.model.uci.cursor():get_first('shadowsocksr', 'global', 'adblock_url','https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt') .." > /tmp/adnew.conf" end sret=luci.sys.call(refresh_cmd .. " 2>/dev/null") if sret== 0 then @@ -148,37 +147,3 @@ end luci.http.prepare_content("application/json") luci.http.write_json({ ret=retstring ,retcount=icount}) end - - -function check_port() -local set="" -local retstring="

" -local s -local server_name = "" -local shadowsocksr = "shadowsocksr" -local uci = luci.model.uci.cursor() -local iret=1 -uci:foreach(shadowsocksr, "servers", function(s) - if s.alias then - server_name=s.alias - elseif s.server and s.server_port then - server_name= "%s:%s" %{s.server, s.server_port} - end - iret=luci.sys.call(" ipset add ss_spec_wan_ac " .. s.server .. " 2>/dev/null") - socket = nixio.socket("inet", "stream") - socket:setopt("socket", "rcvtimeo", 3) - socket:setopt("socket", "sndtimeo", 3) - ret=socket:connect(s.server,s.server_port) - if tostring(ret) == "true" then - socket:close() - retstring =retstring .. "[" .. server_name .. "] OK.
" - else - retstring =retstring .. "[" .. server_name .. "] Error.
" - end - if iret== 0 then - luci.sys.call(" ipset del ss_spec_wan_ac " .. s.server) - end -end) -luci.http.prepare_content("application/json") -luci.http.write_json({ ret=retstring }) -end diff --git a/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/checkport.htm b/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/checkport.htm deleted file mode 100644 index fa7b4044e..000000000 --- a/package/lean/luci-app-ssr-plus/luasrc/view/shadowsocksr/checkport.htm +++ /dev/null @@ -1,26 +0,0 @@ -<%+cbi/valueheader%> - - -<%=self.value%> -<%+cbi/valuefooter%> diff --git a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-ad b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-ad index 668a26266..0846065c0 100755 --- a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-ad +++ b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-ad @@ -1,6 +1,5 @@ #!/bin/sh -e - if [ -f /tmp/adnew.conf ]; then cat /tmp/adnew.conf | grep ^\|\|[^\*]*\^$ | sed -e 's:||:address\=\/:' -e 's:\^:/0\.0\.0\.0:' > /tmp/ad.conf fi - +rm -f /tmp/adnew.conf