Signed-off-by: sbwml <admin@cooluc.com>
This commit is contained in:
parent
04a1bac482
commit
797101f1bc
@ -6,7 +6,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luci-app-passwall
|
PKG_NAME:=luci-app-passwall
|
||||||
PKG_VERSION:=4.75-7
|
PKG_VERSION:=4.75-8
|
||||||
PKG_RELEASE:=
|
PKG_RELEASE:=
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS:= \
|
PKG_CONFIG_DEPENDS:= \
|
||||||
|
@ -193,12 +193,12 @@ function status()
|
|||||||
local e = {}
|
local e = {}
|
||||||
e.dns_mode_status = luci.sys.call("netstat -apn | grep ':15353 ' >/dev/null") == 0
|
e.dns_mode_status = luci.sys.call("netstat -apn | grep ':15353 ' >/dev/null") == 0
|
||||||
e.haproxy_status = luci.sys.call(string.format("/bin/busybox top -bn1 | grep -v grep | grep '%s/bin/' | grep haproxy >/dev/null", appname)) == 0
|
e.haproxy_status = luci.sys.call(string.format("/bin/busybox top -bn1 | grep -v grep | grep '%s/bin/' | grep haproxy >/dev/null", appname)) == 0
|
||||||
e["tcp_node_status"] = luci.sys.call(string.format("/bin/busybox top -bn1 | grep -v -E 'grep|acl/|acl_' | grep '%s/bin/' | grep -i 'TCP' >/dev/null", appname)) == 0
|
e["tcp_node_status"] = luci.sys.call("/bin/busybox top -bn1 | grep -v 'grep' | grep '/tmp/etc/passwall/bin/' | grep -v '_acl_' | grep 'TCP' >/dev/null") == 0
|
||||||
|
|
||||||
if (ucic:get(appname, "@global[0]", "udp_node") or "nil") == "tcp" then
|
if (ucic:get(appname, "@global[0]", "udp_node") or "nil") == "tcp" then
|
||||||
e["udp_node_status"] = e["tcp_node_status"]
|
e["udp_node_status"] = e["tcp_node_status"]
|
||||||
else
|
else
|
||||||
e["udp_node_status"] = luci.sys.call(string.format("/bin/busybox top -bn1 | grep -v -E 'grep|acl/|acl_' | grep '%s/bin/' | grep -i 'UDP' >/dev/null", appname)) == 0
|
e["udp_node_status"] = luci.sys.call("/bin/busybox top -bn1 | grep -v 'grep' | grep '/tmp/etc/passwall/bin/' | grep -v '_acl_' | grep 'UDP' >/dev/null") == 0
|
||||||
end
|
end
|
||||||
luci.http.prepare_content("application/json")
|
luci.http.prepare_content("application/json")
|
||||||
luci.http.write_json(e)
|
luci.http.write_json(e)
|
||||||
@ -215,12 +215,12 @@ function socks_status()
|
|||||||
local index = luci.http.formvalue("index")
|
local index = luci.http.formvalue("index")
|
||||||
local id = luci.http.formvalue("id")
|
local id = luci.http.formvalue("id")
|
||||||
e.index = index
|
e.index = index
|
||||||
e.socks_status = luci.sys.call(string.format("/bin/busybox top -bn1 | grep -v -E 'grep|acl/|acl_' | grep '%s/bin/' | grep '%s' | grep 'SOCKS_' > /dev/null", appname, id)) == 0
|
e.socks_status = luci.sys.call(string.format("/bin/busybox top -bn1 | grep -v 'grep' | grep '/tmp/etc/passwall/bin/' | grep -v '_acl_' | grep '%s' | grep 'SOCKS_' > /dev/null", id)) == 0
|
||||||
local use_http = ucic:get(appname, id, "http_port") or 0
|
local use_http = ucic:get(appname, id, "http_port") or 0
|
||||||
e.use_http = 0
|
e.use_http = 0
|
||||||
if tonumber(use_http) > 0 then
|
if tonumber(use_http) > 0 then
|
||||||
e.use_http = 1
|
e.use_http = 1
|
||||||
e.http_status = luci.sys.call(string.format("/bin/busybox top -bn1 | grep -v -E 'grep|acl/|acl_' | grep '%s/bin/' | grep '%s' | grep -E 'HTTP_|HTTP2SOCKS' > /dev/null", appname, id)) == 0
|
e.http_status = luci.sys.call(string.format("/bin/busybox top -bn1 | grep -v 'grep' | grep '/tmp/etc/passwall/bin/' | grep -v '_acl_' | grep '%s' | grep -E 'HTTP_|HTTP2SOCKS' > /dev/null", id)) == 0
|
||||||
end
|
end
|
||||||
luci.http.prepare_content("application/json")
|
luci.http.prepare_content("application/json")
|
||||||
luci.http.write_json(e)
|
luci.http.write_json(e)
|
||||||
|
Loading…
Reference in New Issue
Block a user