Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
2ec58a906c
2
Makefile
2
Makefile
@ -14,7 +14,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir
|
||||
|
||||
world:
|
||||
|
||||
DISTRO_PKG_CONFIG:=$(shell command -pv pkg-config | grep -E '\/usr' | head -n 1)
|
||||
DISTRO_PKG_CONFIG:=$(shell which -a pkg-config | grep -E '\/usr' | head -n 1)
|
||||
export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
|
||||
|
||||
ifneq ($(OPENWRT_BUILD),1)
|
||||
|
||||
@ -15,7 +15,7 @@ MAKE_PATH = $(firstword $(CMAKE_BINARY_SUBDIR) .)
|
||||
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
||||
cmake_tool=$(TOOLCHAIN_DIR)/bin/$(1)
|
||||
else
|
||||
cmake_tool=$(shell command -v $(1))
|
||||
cmake_tool=$(shell which $(1))
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CCACHE),)
|
||||
|
||||
@ -25,21 +25,21 @@ $(eval $(call TestHostCommand,proper-umask, \
|
||||
|
||||
ifndef IB
|
||||
$(eval $(call SetupHostCommand,gcc, \
|
||||
Please install the GNU C Compiler (gcc) 4.8 or later, \
|
||||
$(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
|
||||
gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
|
||||
Please install the GNU C Compiler (gcc) 6 or later, \
|
||||
$(CC) -dumpversion | grep -E '^([6-9]\.?|1[0-9]\.?)', \
|
||||
gcc -dumpversion | grep -E '^([6-9]\.?|1[0-9]\.?)', \
|
||||
gcc --version | grep -E 'Apple.(LLVM|clang)' ))
|
||||
|
||||
$(eval $(call TestHostCommand,working-gcc, \
|
||||
\nPlease reinstall the GNU C Compiler (4.8 or later) - \
|
||||
\nPlease reinstall the GNU C Compiler (6 or later) - \
|
||||
it appears to be broken, \
|
||||
echo 'int main(int argc, char **argv) { return 0; }' | \
|
||||
gcc -x c -o $(TMP_DIR)/a.out -))
|
||||
|
||||
$(eval $(call SetupHostCommand,g++, \
|
||||
Please install the GNU C++ Compiler (g++) 4.8 or later, \
|
||||
$(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
|
||||
g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
|
||||
Please install the GNU C++ Compiler (g++) 6 or later, \
|
||||
$(CXX) -dumpversion | grep -E '^([6-9]\.?|1[0-9]\.?)', \
|
||||
g++ -dumpversion | grep -E '^([6-9]\.?|1[0-9]\.?)', \
|
||||
g++ --version | grep -E 'Apple.(LLVM|clang)' ))
|
||||
|
||||
$(eval $(call TestHostCommand,working-g++, \
|
||||
@ -166,6 +166,9 @@ $(eval $(call SetupHostCommand,file,Please install the 'file' package, \
|
||||
$(eval $(call SetupHostCommand,rsync,Please install 'rsync', \
|
||||
rsync --version </dev/null))
|
||||
|
||||
$(eval $(call SetupHostCommand,which,Please install 'which', \
|
||||
which which | grep which))
|
||||
|
||||
$(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c
|
||||
mkdir -p $(dir $@)
|
||||
$(CC) -O2 -I$(TOPDIR)/tools/include -o $@ $<
|
||||
|
||||
@ -49,7 +49,7 @@ endef
|
||||
|
||||
define RequireCommand
|
||||
define Require/$(1)
|
||||
command -pv $(1)
|
||||
which $(1)
|
||||
endef
|
||||
|
||||
$$(eval $$(call Require,$(1),$(2)))
|
||||
@ -103,7 +103,7 @@ define SetupHostCommand
|
||||
$(call QuoteHostCommand,$(11)) $(call QuoteHostCommand,$(12)); do \
|
||||
if [ -n "$$$$$$$$cmd" ]; then \
|
||||
bin="$$$$$$$$(PATH="$(subst $(space),:,$(filter-out $(STAGING_DIR_HOST)/%,$(subst :,$(space),$(PATH))))" \
|
||||
command -pv "$$$$$$$${cmd%% *}")"; \
|
||||
which "$$$$$$$${cmd%% *}")"; \
|
||||
if [ -x "$$$$$$$$bin" ] && eval "$$$$$$$$cmd" >/dev/null 2>/dev/null; then \
|
||||
mkdir -p "$(STAGING_DIR_HOST)/bin"; \
|
||||
ln -sf "$$$$$$$$bin" "$(STAGING_DIR_HOST)/bin/$(strip $(1))"; \
|
||||
|
||||
@ -31,10 +31,11 @@ load_led() {
|
||||
config_get gpio $1 gpio "0"
|
||||
config_get inverted $1 inverted "0"
|
||||
|
||||
if [ "$trigger" = "rssi" ]; then
|
||||
# handled by rssileds userspace process
|
||||
return
|
||||
fi
|
||||
# execute application led trigger
|
||||
[ -f "/usr/libexec/led-trigger/${trigger}" ] && {
|
||||
. "/usr/libexec/led-trigger/${trigger}"
|
||||
return 0
|
||||
}
|
||||
|
||||
[ "$trigger" = "usbdev" ] && {
|
||||
# Backward compatibility: translate to the new trigger
|
||||
|
||||
@ -11,65 +11,73 @@ PKG_VERSION:=1.2.2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/cbeuw/GoQuiet.git
|
||||
PKG_MIRROR_HASH:=d16557d89ac909877128729590e34a3c7a9b430000525ed133e2fffb56a0310a
|
||||
PKG_SOURCE_VERSION:=013cdfdf72000dcd4691799c37a0cf960ab4c82f
|
||||
PKG_MIRROR_HASH:=c9c97463e5286e8ad10de5e86512b98f60672235c47cfd9696188a16496fc56c
|
||||
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
|
||||
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_GQ_CLIENT_COMPRESS_UPX \
|
||||
CONFIG_GQ_SERVER_COMPRESS_UPX
|
||||
|
||||
GO_PKG:=github.com/cbeuw/GoQuiet
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
GO_PKG_LDFLAGS_X:=main.version=$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/gq-client
|
||||
define Package/GoQuiet/template
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=GoQuiet Client
|
||||
TITLE:=GoQuiet
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +libpthread
|
||||
URL:=https://github.com/cbeuw/GoQuiet
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
endef
|
||||
|
||||
define Package/gq-client
|
||||
$(call Package/GoQuiet/template)
|
||||
TITLE+= Client
|
||||
endef
|
||||
|
||||
define Package/gq-server
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=GoQuiet Server
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +libpthread
|
||||
URL:=https://github.com/cbeuw/GoQuiet
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
$(call Package/GoQuiet/template)
|
||||
TITLE+= Server
|
||||
endef
|
||||
|
||||
define Package/gq-client/description
|
||||
GoQuiet-Client
|
||||
define Package/gq-client/config
|
||||
config GQ_CLIENT_COMPRESS_UPX
|
||||
bool "Compress executable files with UPX"
|
||||
default y
|
||||
endef
|
||||
|
||||
define Package/gq-server/description
|
||||
GoQuiet-Server
|
||||
define Package/gq-server/config
|
||||
config GQ_SERVER_COMPRESS_UPX
|
||||
bool "Compress executable files with UPX"
|
||||
default y
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
tar -zxf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
GO_PKG_BUILD_VARS += GO111MODULE=auto
|
||||
|
||||
define Build/Compile
|
||||
$(eval GO_PKG_BUILD_PKG:=$(GO_PKG)/cmd/gq-client)
|
||||
$(call GoPackage/Build/Configure)
|
||||
$(call GoPackage/Build/Compile)
|
||||
ifeq ($(CONFIG_GQ_CLIENT_COMPRESS_UPX),y)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/gq-client
|
||||
endif
|
||||
$(eval GO_PKG_BUILD_PKG:=$(GO_PKG)/cmd/gq-server)
|
||||
$(call GoPackage/Build/Configure)
|
||||
$(call GoPackage/Build/Compile)
|
||||
ifeq ($(CONFIG_GQ_SERVER_COMPRESS_UPX),y)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/gq-server
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/gq-client/install
|
||||
|
||||
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=brcmfmac-firmware-4366c0-pcie-vendor
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -26,8 +26,6 @@ define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/brcmfmac-firmware-4366c0-pcie-vendor/install
|
||||
$(INSTALL_DIR) $(1)/lib
|
||||
$(INSTALL_DIR) $(1)/lib/firmware
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) ./files/brcmfmac4366c-pcie.bin $(1)/lib/firmware/brcm/brcmfmac4366c-pcie.bin
|
||||
endef
|
||||
|
||||
@ -9,12 +9,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gowebdav
|
||||
PKG_VERSION:=0.0.1
|
||||
PKG_VERSION:=0.0.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/1715173329/gowebdav/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=64867ab2925c79d8d8ff9851729bafd1270cd72b981e422136fdd4d82dc75506
|
||||
PKG_HASH:=0a6a2af4f24905ffea247b6044d01129d938af4b3a256bf19b42c52bb452f947
|
||||
|
||||
PKG_MAINTAINER:=CN_SZTL <cnsztl@immortalwrt.org>
|
||||
|
||||
@ -26,7 +26,7 @@ PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=gowebdav
|
||||
GO_PKG:=github.com/1715173329/gowebdav
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -11,7 +11,7 @@ LUCI_PKGARCH:=all
|
||||
LUCI_DEPENDS:=+appfilter
|
||||
|
||||
PKG_NAME:=luci-app-appfilter
|
||||
PKG_VERSION:=3.0
|
||||
PKG_VERSION:=5.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
|
||||
22
package/ctcgfw/luci-app-appfilter/htdocs/luci-static/resources/echarts.min.js
vendored
Normal file
22
package/ctcgfw/luci-app-appfilter/htdocs/luci-static/resources/echarts.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,4 +1,6 @@
|
||||
|
||||
module("luci.controller.appfilter", package.seeall)
|
||||
local utl = require "luci.util"
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/appfilter") then
|
||||
@ -6,12 +8,30 @@ function index()
|
||||
end
|
||||
|
||||
local page
|
||||
--hide save button
|
||||
page = entry({"admin", "network", "appfilter"}, arcombine(cbi("appfilter/appfilter"), cbi("appfilter/dev_status", {hideapplybtn=true, hidesavebtn=true, hideresetbtn=true})), _("appfilter"), 100)
|
||||
|
||||
page = entry({"admin", "network", "appfilter"}, cbi("appfilter/appfilter"), _("appfilter"))
|
||||
page.dependent = true
|
||||
page.leaf = true
|
||||
page.subindex = true
|
||||
|
||||
--page.dependent = true
|
||||
|
||||
page = entry({"admin", "network", "user_status"}, call("user_status"), nil)
|
||||
page.leaf = true
|
||||
|
||||
page = entry({"admin", "network", "dev_app_status"}, call("dev_app_status"), nil)
|
||||
page.leaf = true
|
||||
|
||||
page = entry({"admin", "network", "dev_visit_list"}, call("get_dev_visit_list"), nil)
|
||||
page.leaf = true
|
||||
|
||||
page = entry({"admin", "network", "feature_upgrade"}, call("handle_feature_upgrade"), nil)
|
||||
page.leaf = true
|
||||
|
||||
page = entry({"admin", "network", "dev_visit_time"}, call("get_dev_visit_time"), nil)
|
||||
page.leaf = true
|
||||
page = entry({"admin", "network", "app_class_visit_time"}, call("get_app_class_visit_time"), nil)
|
||||
page.leaf = true
|
||||
end
|
||||
|
||||
function get_hostname_by_mac(dst_mac)
|
||||
@ -33,6 +53,30 @@ function get_hostname_by_mac(dst_mac)
|
||||
return ""
|
||||
end
|
||||
|
||||
|
||||
function handle_feature_upgrade()
|
||||
local fs = require "nixio.fs"
|
||||
local http = require "luci.http"
|
||||
local image_tmp = "/tmp/feature.cfg"
|
||||
|
||||
local fp
|
||||
http.setfilehandler(
|
||||
function(meta, chunk, eof)
|
||||
|
||||
fp = io.open(image_tmp, "w")
|
||||
|
||||
if fp and chunk then
|
||||
fp:write(chunk)
|
||||
end
|
||||
if fp and eof then
|
||||
fp:close()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
end
|
||||
|
||||
function get_app_name_by_id(appid)
|
||||
local class_fd = io.popen("find /tmp/appfilter/ -type f -name *.class |xargs cat |grep "..appid.."|awk '{print $2}'")
|
||||
if class_fd then
|
||||
@ -48,40 +92,106 @@ function cmp_func(a,b)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
function user_status()
|
||||
local json = require "luci.jsonc"
|
||||
luci.http.prepare_content("application/json")
|
||||
--local fs=require "nixio.fs"
|
||||
--local ok, status_data = pcall(json.parse, fs.readfile("/proc/net/af_client"))
|
||||
--luci.http.write_json(tb);
|
||||
local fd = io.open("/proc/net/af_client","r")
|
||||
|
||||
status_buf=fd:read('*a')
|
||||
fd:close()
|
||||
user_array=json.parse(status_buf)
|
||||
|
||||
local visit_obj=utl.ubus("appfilter", "visit_list", {});
|
||||
local user_array=visit_obj.dev_list
|
||||
local history={}
|
||||
for i, v in pairs(user_array) do
|
||||
visit_array=user_array[i].visit_info
|
||||
for j,s in pairs(visit_array) do
|
||||
print(user_array[i].mac, user_array[i].ip,visit_array[j].appid, visit_array[j].latest_time)
|
||||
total_time=visit_array[j].latest_time - visit_array[j].first_time;
|
||||
history[#history+1]={
|
||||
mac=user_array[i].mac,
|
||||
ip=user_array[i].ip,
|
||||
hostname=get_hostname_by_mac(user_array[i].mac),
|
||||
appid=visit_array[j].appid,
|
||||
appname=get_app_name_by_id(visit_array[j].appid),
|
||||
total_num=visit_array[j].total_num,
|
||||
drop_num=visit_array[j].drop_num,
|
||||
--total_num=visit_array[j].total_num,
|
||||
--drop_num=visit_array[j].drop_num,
|
||||
total_num=0,
|
||||
drop_num=0,
|
||||
latest_action=visit_array[j].latest_action,
|
||||
latest_time=os.date("%Y/%m/%d %H:%M:%S", visit_array[j].latest_time)
|
||||
latest_time=os.date("%Y/%m/%d %H:%M:%S", visit_array[j].latest_time),
|
||||
first_time=os.date("%Y/%m/%d %H:%M:%S", visit_array[j].first_time),
|
||||
total_time=total_time
|
||||
}
|
||||
end
|
||||
end
|
||||
table.sort(history, cmp_func)
|
||||
--luci.http.write(history);
|
||||
luci.http.write_json(history);
|
||||
end
|
||||
|
||||
|
||||
function dev_app_status()
|
||||
local json = require "luci.jsonc"
|
||||
luci.http.prepare_content("application/json")
|
||||
local visit_obj=utl.ubus("appfilter", "dev_list", {});
|
||||
luci.http.write_json(visit_obj);
|
||||
end
|
||||
|
||||
|
||||
function get_dev_visit_time(mac)
|
||||
local json = require "luci.jsonc"
|
||||
luci.http.prepare_content("application/json")
|
||||
local fd = io.open("/proc/net/af_client","r")
|
||||
status_buf=fd:read('*a')
|
||||
fd:close()
|
||||
user_array=json.parse(status_buf)
|
||||
local req_obj = {}
|
||||
req_obj.mac = mac;
|
||||
local visit_obj=utl.ubus("appfilter", "dev_visit_time", req_obj);
|
||||
local user_array=visit_obj.app_list
|
||||
luci.http.write_json(user_array);
|
||||
end
|
||||
|
||||
function get_app_class_visit_time(mac)
|
||||
local json = require "luci.jsonc"
|
||||
luci.http.prepare_content("application/json")
|
||||
local req_obj = {}
|
||||
req_obj.mac = mac;
|
||||
local visit_obj=utl.ubus("appfilter", "app_class_visit_time", req_obj);
|
||||
local class_array=visit_obj.class_list
|
||||
luci.http.write_json(class_array);
|
||||
end
|
||||
|
||||
|
||||
function get_dev_visit_list(mac)
|
||||
local json = require "luci.jsonc"
|
||||
luci.http.prepare_content("application/json")
|
||||
local req_obj = {}
|
||||
req_obj.mac = mac;
|
||||
|
||||
local visit_obj=utl.ubus("appfilter", "visit_list", req_obj);
|
||||
local user_array=visit_obj.dev_list
|
||||
local history={}
|
||||
for i, v in pairs(user_array) do
|
||||
visit_array=user_array[i].visit_info
|
||||
for j,s in pairs(visit_array) do
|
||||
print(user_array[i].mac, user_array[i].ip,visit_array[j].appid, visit_array[j].latest_time)
|
||||
total_time=visit_array[j].latest_time - visit_array[j].first_time;
|
||||
history[#history+1]={
|
||||
mac=user_array[i].mac,
|
||||
ip=user_array[i].ip,
|
||||
hostname=get_hostname_by_mac(user_array[i].mac),
|
||||
appid=visit_array[j].appid,
|
||||
appname=get_app_name_by_id(visit_array[j].appid),
|
||||
total_num=0,
|
||||
drop_num=0,
|
||||
latest_action=visit_array[j].latest_action,
|
||||
latest_time=os.date("%Y/%m/%d %H:%M:%S", visit_array[j].latest_time),
|
||||
first_time=os.date("%Y/%m/%d %H:%M:%S", visit_array[j].first_time),
|
||||
total_time=total_time
|
||||
}
|
||||
end
|
||||
end
|
||||
table.sort(history, cmp_func)
|
||||
luci.http.write_json(history);
|
||||
end
|
||||
|
||||
@ -1,7 +1,16 @@
|
||||
|
||||
local ds = require "luci.dispatcher"
|
||||
local nxo = require "nixio"
|
||||
local nfs = require "nixio.fs"
|
||||
local ipc = require "luci.ip"
|
||||
local sys = require "luci.sys"
|
||||
local utl = require "luci.util"
|
||||
|
||||
local dsp = require "luci.dispatcher"
|
||||
local uci = require "luci.model.uci"
|
||||
local lng = require "luci.i18n"
|
||||
local jsc = require "luci.jsonc"
|
||||
local http = luci.http
|
||||
local SYS = require "luci.sys"
|
||||
local m, s
|
||||
|
||||
m = Map("appfilter",
|
||||
@ -12,7 +21,22 @@ s = m:section(TypedSection, "global", translate("Basic Settings"))
|
||||
s:option(Flag, "enable", translate("Enable App Filter"),translate(""))
|
||||
s.anonymous = true
|
||||
|
||||
local rule_count=0
|
||||
local version=""
|
||||
if nixio.fs.access("/etc/appfilter/feature.cfg") then
|
||||
rule_count=tonumber(SYS.exec("cat /etc/appfilter/feature.cfg | wc -l"))
|
||||
version=SYS.exec("cat /etc/appfilter/feature.cfg |grep \"#version\" | awk '{print $2}'")
|
||||
end
|
||||
local display_str="<strong>当前版本: </strong>"..version.."<br><strong>特征码个数:</strong> "..rule_count.."<br><strong> 下载地址:</strong><a href=\"https://destan19.github.io\">https://destan19.github.io</a>"
|
||||
s = m:section(TypedSection, "feature", translate("特征库更新"), display_str )
|
||||
|
||||
fu = s:option(FileUpload, "")
|
||||
fu.template = "cbi/oaf_upload"
|
||||
s.anonymous = true
|
||||
|
||||
um = s:option(DummyValue, "rule_data")
|
||||
|
||||
--um.value =rule_count .. " " .. translate("Records").. " "..version
|
||||
s = m:section(TypedSection, "appfilter", translate("App Filter Rules"))
|
||||
s.anonymous = true
|
||||
s.addremove = false
|
||||
@ -108,18 +132,17 @@ users.widget="checkbox"
|
||||
--users.widget="select"
|
||||
users.size=1
|
||||
|
||||
local fd = io.open("/proc/net/arp", "r")
|
||||
local fd = io.open("/tmp/dev_list", "r")
|
||||
if not fd then return m end
|
||||
while true do
|
||||
local line = fd:read("*l")
|
||||
if not line then
|
||||
break
|
||||
end
|
||||
if not line:match("Ip*") then
|
||||
local ip=get_cmd_result(string.format("echo '%s' | awk '{print $1}'", line))
|
||||
local mac=get_cmd_result(string.format("echo '%s' | awk '{print $4}'", line))
|
||||
local device=get_cmd_result(string.format("echo '%s' | awk '{print $6}'", line))
|
||||
if device ~= nil and mac ~= nil and device:match("lan") then
|
||||
if not line:match("Id*") then
|
||||
local ip=get_cmd_result(string.format("echo '%s' | awk '{print $3}'", line))
|
||||
local mac=get_cmd_result(string.format("echo '%s' | awk '{print $2}'", line))
|
||||
if mac ~= nil then
|
||||
local hostname=get_hostname_by_mac(mac)
|
||||
if not hostname or hostname == "*" then
|
||||
users:value(mac, mac);
|
||||
@ -139,6 +162,49 @@ for i=1,max,1 do
|
||||
end
|
||||
end
|
||||
m:section(SimpleSection).template = "admin_network/user_status"
|
||||
local dir, fd
|
||||
dir = "/tmp/upload/"
|
||||
nixio.fs.mkdir(dir)
|
||||
http.setfilehandler(
|
||||
function(meta, chunk, eof)
|
||||
if not fd then
|
||||
if not meta then return end
|
||||
if meta and chunk then fd = nixio.open(dir .. meta.file, "w") end
|
||||
if not fd then
|
||||
return
|
||||
end
|
||||
end
|
||||
if chunk and fd then
|
||||
fd:write(chunk)
|
||||
end
|
||||
if eof and fd then
|
||||
fd:close()
|
||||
local fd2 = io.open("/tmp/upload/"..meta.file)
|
||||
local line=fd2:read("*l");
|
||||
fd2:close()
|
||||
local ret=string.match(line, "#version")
|
||||
if ret ~= nil then
|
||||
local cmd="cp /tmp/upload/"..meta.file.." /etc/appfilter/feature.cfg";
|
||||
os.execute(cmd);
|
||||
os.execute("rm /tmp/appfilter -fr");
|
||||
luci.sys.exec("/etc/init.d/appfilter restart &");
|
||||
um.value = translate("更新成功,请刷新页面!")
|
||||
else
|
||||
um.value = translate("更新失败,格式错误!")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
)
|
||||
|
||||
if luci.http.formvalue("upload") then
|
||||
local f = luci.http.formvalue("ulfile")
|
||||
if #f <= 0 then
|
||||
--um.value = translate("No specify upload file.")
|
||||
end
|
||||
elseif luci.http.formvalue("download") then
|
||||
Download()
|
||||
end
|
||||
|
||||
|
||||
return m
|
||||
|
||||
@ -0,0 +1,24 @@
|
||||
|
||||
local ds = require "luci.dispatcher"
|
||||
local nxo = require "nixio"
|
||||
local nfs = require "nixio.fs"
|
||||
local ipc = require "luci.ip"
|
||||
local sys = require "luci.sys"
|
||||
local utl = require "luci.util"
|
||||
local dsp = require "luci.dispatcher"
|
||||
local uci = require "luci.model.uci"
|
||||
local lng = require "luci.i18n"
|
||||
local jsc = require "luci.jsonc"
|
||||
|
||||
local m, s
|
||||
arg[1] = arg[1] or ""
|
||||
m = Map("appfilter",
|
||||
translate("上网统计("..arg[1]..")"),
|
||||
translate(""))
|
||||
|
||||
local v
|
||||
v=m:section(SimpleSection)
|
||||
v.template="admin_network/dev_status"
|
||||
v.mac=arg[1]
|
||||
m.redirect = luci.dispatcher.build_url("admin", "network", "appfilter")
|
||||
return m
|
||||
@ -0,0 +1,353 @@
|
||||
<style type="text/css">
|
||||
<%
|
||||
local dsp = require "luci.dispatcher"
|
||||
-%>
|
||||
|
||||
#display{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
table.imagetable {
|
||||
font-family: verdana,arial,sans-serif;
|
||||
font-size:11px;
|
||||
color:#333333;
|
||||
border-width: 1px;
|
||||
border-color: #999999;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
<!--
|
||||
table.imagetable th {
|
||||
background:#f5f5f5
|
||||
border-width: 0px;
|
||||
padding: 5px;
|
||||
border-style: solid;
|
||||
border-color: #999999;
|
||||
}
|
||||
table.imagetable td {
|
||||
background:#ffffffff
|
||||
border-width: 0px;
|
||||
padding: 5px;
|
||||
border-style: solid;
|
||||
border-color: #999999;
|
||||
}-->
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="<%=resource%>/echarts.min.js"></script>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
window.onload =function(){
|
||||
|
||||
}
|
||||
var app_class_data;
|
||||
var app_time_data;
|
||||
var mac='<%=self.mac%>';
|
||||
function get_display_time(total_time){
|
||||
var hour=parseInt(total_time / 3600);
|
||||
var seconds=total_time % 3600;
|
||||
var min=parseInt(seconds / 60)
|
||||
var seconds2=seconds % 60;
|
||||
var total_time_str;
|
||||
|
||||
if (hour > 0)
|
||||
total_time_str=hour + "小时" + min + "分"
|
||||
else{
|
||||
if (min == 0 && seconds2 != 0)
|
||||
min = 1;
|
||||
total_time_str=min + "分"
|
||||
}
|
||||
return total_time_str;
|
||||
}
|
||||
|
||||
function display_app_visit_view(data){
|
||||
var myChart = echarts.init(document.getElementById('main2'));
|
||||
var dev_array=new Array();
|
||||
var m2R2Data=new Array()
|
||||
var total_time=0
|
||||
for(var i = 0; i < data.length; i++){
|
||||
var dev_obj = data[i];
|
||||
var m2_obj={};
|
||||
m2_obj.value=dev_obj.visit_time;
|
||||
m2_obj.legendname=dev_obj.app_id;
|
||||
|
||||
var tmp_time = get_display_time(dev_obj.visit_time);
|
||||
|
||||
m2_obj.name=dev_obj.app_id + " " + tmp_time;
|
||||
total_time+=dev_obj.visit_time
|
||||
m2R2Data.push(m2_obj);
|
||||
}
|
||||
|
||||
var total_time_str = get_display_time(total_time);
|
||||
option = {
|
||||
title: [
|
||||
{
|
||||
text: 'APP时间统计',
|
||||
textStyle: {
|
||||
fontSize: 16,
|
||||
color: "black"
|
||||
},
|
||||
left: "2%"
|
||||
},
|
||||
{
|
||||
text: '',
|
||||
subtext: total_time_str,
|
||||
textStyle:{
|
||||
fontSize:15,
|
||||
color:"black"
|
||||
},
|
||||
subtextStyle: {
|
||||
fontSize: 15,
|
||||
color: 'black'
|
||||
},
|
||||
textAlign:"center",
|
||||
x: '34.5%',
|
||||
y: '44%',
|
||||
}],
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter:function (parms){
|
||||
var total_time = get_display_time(parms.data.value);
|
||||
var str= parms.seriesName+"</br>"+
|
||||
parms.marker+""+parms.data.legendname+"</br>"+
|
||||
"时间:"+ total_time+"</br>"+
|
||||
"占比:"+ parms.percent+"%";
|
||||
return str ;
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
type:"scroll",
|
||||
orient: 'vertical',
|
||||
left:'70%',
|
||||
align:'left',
|
||||
top:'middle',
|
||||
textStyle: {
|
||||
color:'#8C8C8C'
|
||||
},
|
||||
height:250
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: "访问时间",
|
||||
type:'pie',
|
||||
center: ['35%', '50%'],
|
||||
radius: ['40%', '65%'],
|
||||
clockwise: false, //饼图的扇区是否是顺时针排布
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
position: 'outter',
|
||||
formatter:function (parms){
|
||||
return parms.data.legendname
|
||||
}
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
normal: {
|
||||
length:8,
|
||||
length2:7,
|
||||
smooth:true,
|
||||
}
|
||||
},
|
||||
data:m2R2Data
|
||||
}
|
||||
]
|
||||
};
|
||||
myChart.setOption(option);
|
||||
}
|
||||
|
||||
function display_app_class_view(data){
|
||||
console.log("begin display.");
|
||||
var myChart = echarts.init(document.getElementById('main'));
|
||||
var dev_array=new Array();
|
||||
var m2R2Data=new Array()
|
||||
var total_time=0
|
||||
for(var i = 0; i < data.length; i++){
|
||||
console.log("begin display222.");
|
||||
|
||||
var dev_obj = data[i];
|
||||
if (dev_obj.visit_time == 0)
|
||||
continue;
|
||||
|
||||
var m2_obj={};
|
||||
m2_obj.value=dev_obj.visit_time;
|
||||
m2_obj.legendname=dev_obj.name;
|
||||
|
||||
var tmp_time = get_display_time(dev_obj.visit_time);
|
||||
|
||||
m2_obj.name=dev_obj.name + " " + tmp_time;
|
||||
total_time+=dev_obj.visit_time
|
||||
m2R2Data.push(m2_obj);
|
||||
}
|
||||
|
||||
var total_time_str = get_display_time(total_time);
|
||||
|
||||
option = {
|
||||
title: [
|
||||
{
|
||||
text: 'APP分类时间统计',
|
||||
textStyle: {
|
||||
fontSize: 16,
|
||||
color: "black"
|
||||
},
|
||||
left: "2%"
|
||||
},
|
||||
{
|
||||
text: '',
|
||||
subtext: total_time_str,
|
||||
textStyle:{
|
||||
fontSize:15,
|
||||
color:"black"
|
||||
},
|
||||
subtextStyle: {
|
||||
fontSize: 15,
|
||||
color: 'black'
|
||||
},
|
||||
textAlign:"center",
|
||||
x: '34.5%',
|
||||
y: '44%',
|
||||
}],
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter:function (parms){
|
||||
var total_time = get_display_time(parms.data.value);
|
||||
var str= parms.seriesName+"</br>"+
|
||||
parms.marker+""+parms.data.legendname+"</br>"+
|
||||
"时间:"+ total_time +"</br>"+
|
||||
"占比:"+ parms.percent+"%";
|
||||
return str ;
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
type:"scroll",
|
||||
orient: 'vertical',
|
||||
left:'70%',
|
||||
align:'left',
|
||||
top:'middle',
|
||||
textStyle: {
|
||||
color:'#8C8C8C'
|
||||
},
|
||||
height:250
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name:'访问时间',
|
||||
type:'pie',
|
||||
center: ['35%', '50%'],
|
||||
radius: ['40%', '65%'],
|
||||
clockwise: false, //饼图的扇区是否是顺时针排布
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
position: 'outter',
|
||||
formatter:function (parms){
|
||||
return parms.data.legendname
|
||||
}
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
normal: {
|
||||
length:8,
|
||||
length2:7,
|
||||
smooth:true,
|
||||
}
|
||||
},
|
||||
data:m2R2Data
|
||||
}
|
||||
]
|
||||
};
|
||||
myChart.setOption(option);
|
||||
}
|
||||
new XHR().get('<%=url('admin/network/app_class_visit_time')%>/' + mac, null,
|
||||
function(x, st)
|
||||
{
|
||||
display_app_class_view(st);
|
||||
}
|
||||
);
|
||||
|
||||
new XHR().get('<%=url('admin/network/dev_visit_time')%>/' + mac, null,
|
||||
function(x, st)
|
||||
{
|
||||
display_app_visit_view(st);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
new XHR().get('<%=url('admin/network/dev_visit_list')%>/' + mac, null,
|
||||
function(x, st)
|
||||
{
|
||||
var tb = document.getElementById('user_status_table');
|
||||
var str=JSON.stringify(st);
|
||||
if (st && tb)
|
||||
{
|
||||
/* clear all rows */
|
||||
while(tb.rows.length > 1)
|
||||
tb.deleteRow(1);
|
||||
for(var i = 0; i < st.length; i++ )
|
||||
{
|
||||
var action_status=""
|
||||
if(st[i].latest_action == 1)
|
||||
action_status="已过滤"
|
||||
else
|
||||
action_status="未过滤"
|
||||
var hostname=""
|
||||
if(st[i].hostname == "" || st[i].hostname == "*"){
|
||||
hostname="?";
|
||||
}
|
||||
else{
|
||||
hostname=st[i].hostname;
|
||||
}
|
||||
var tr = tb.insertRow(-1);
|
||||
//tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1);
|
||||
tr.insertCell(-1).innerHTML = st[i].appname;
|
||||
tr.insertCell(-1).innerHTML = hostname;
|
||||
tr.insertCell(-1).innerHTML = st[i].mac;
|
||||
tr.insertCell(-1).innerHTML = st[i].first_time;
|
||||
var hour=parseInt(st[i].total_time / 3600);
|
||||
var seconds=st[i].total_time % 3600;
|
||||
var min=parseInt(seconds / 60)
|
||||
var total_time_str;
|
||||
if (st[i].latest_action == 1)
|
||||
total_time_str="-"
|
||||
else {
|
||||
if (hour > 0)
|
||||
total_time_str=hour + "小时" + min + "分"
|
||||
else{
|
||||
if (min == 0)
|
||||
min = 1;
|
||||
total_time_str=min + "分"
|
||||
}
|
||||
}
|
||||
|
||||
tr.insertCell(-1).innerHTML = total_time_str;
|
||||
tr.insertCell(-1).innerHTML = action_status;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
//]]></script>
|
||||
|
||||
<fieldset class="cbi-section">
|
||||
<div id="display">
|
||||
<div id="main" style="width: 500px;height:300px;"></div>
|
||||
<div id="main2" style="width: 400px;height:300px;"></div>
|
||||
</div>
|
||||
<table class="imagetable" id="user_status_table">
|
||||
<tr>
|
||||
<th ><%:App%></th>
|
||||
<th ><%:主机名%></th>
|
||||
<th ><%:mac地址%></th>
|
||||
<th><%:开始时间%></th>
|
||||
<th><%:访问时长%></th>
|
||||
<th><%:过滤状态%></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="8"><em><br /><%:Collecting data...%></em></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</fieldset>
|
||||
@ -1,4 +1,8 @@
|
||||
<style type="text/css">
|
||||
<%
|
||||
local dsp = require "luci.dispatcher"
|
||||
-%>
|
||||
|
||||
table.imagetable {
|
||||
font-family: verdana,arial,sans-serif;
|
||||
font-size:11px;
|
||||
@ -25,6 +29,7 @@ table.imagetable td {
|
||||
</style>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
|
||||
/*
|
||||
XHR.poll(10, '<%=url('admin/network/user_status')%>', null,
|
||||
function(x, st)
|
||||
{
|
||||
@ -32,7 +37,6 @@ table.imagetable td {
|
||||
var str=JSON.stringify(st);
|
||||
if (st && tb)
|
||||
{
|
||||
/* clear all rows */
|
||||
while(tb.rows.length > 1)
|
||||
tb.deleteRow(1);
|
||||
for(var i = 0; i < st.length; i++ )
|
||||
@ -51,33 +55,93 @@ table.imagetable td {
|
||||
}
|
||||
var tr = tb.insertRow(-1);
|
||||
//tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1);
|
||||
tr.insertCell(-1).innerHTML = hostname;
|
||||
tr.insertCell(-1).innerHTML = st[i].mac;
|
||||
tr.insertCell(-1).innerHTML = st[i].ip;
|
||||
tr.insertCell(-1).innerHTML = st[i].appname;
|
||||
tr.insertCell(-1).innerHTML = st[i].drop_num;
|
||||
tr.insertCell(-1).innerHTML = st[i].total_num;
|
||||
tr.insertCell(-1).innerHTML = st[i].latest_time;
|
||||
tr.insertCell(-1).innerHTML = hostname;
|
||||
tr.insertCell(-1).innerHTML = "<a href='<%=url('admin/network/appfilter/')%>"+st[i].mac+"'>"+st[i].mac+"</a>";
|
||||
tr.insertCell(-1).innerHTML = st[i].first_time;
|
||||
var hour=parseInt(st[i].total_time / 3600);
|
||||
var seconds=st[i].total_time % 3600;
|
||||
var min=parseInt(seconds / 60)
|
||||
var total_time_str;
|
||||
if (st[i].latest_action == 1)
|
||||
total_time_str="-"
|
||||
else {
|
||||
if (hour > 0)
|
||||
total_time_str=hour + "小时" + min + "分"
|
||||
else{
|
||||
if (min == 0)
|
||||
min = 1;
|
||||
total_time_str=min + "分"
|
||||
}
|
||||
}
|
||||
|
||||
tr.insertCell(-1).innerHTML = total_time_str;
|
||||
tr.insertCell(-1).innerHTML = action_status;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
*/
|
||||
|
||||
XHR.poll(5, '<%=url('admin/network/dev_app_status')%>', null,
|
||||
function(x, st)
|
||||
{
|
||||
var tb = document.getElementById('user_status_table');
|
||||
var dev_list_str=JSON.stringify(st);
|
||||
if (st && tb)
|
||||
{
|
||||
while(tb.rows.length > 1)
|
||||
tb.deleteRow(1);
|
||||
var devlist = st.devlist
|
||||
for(var i = 0; i < devlist.length; i++ )
|
||||
{
|
||||
var hostname=""
|
||||
if(devlist[i].hostname == "" || devlist[i].hostname == "*"){
|
||||
hostname="?";
|
||||
}
|
||||
else{
|
||||
hostname=devlist[i].hostname;
|
||||
}
|
||||
var tr = tb.insertRow(-1);
|
||||
//tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1);
|
||||
tr.insertCell(-1).innerHTML = hostname;
|
||||
tr.insertCell(-1).innerHTML = "<a href='<%=url('admin/network/appfilter/')%>"+devlist[i].mac+"'>"+devlist[i].mac+"</a>";
|
||||
tr.insertCell(-1).innerHTML = devlist[i].ip;
|
||||
var app_list_str="";
|
||||
for (var j = 0; j < devlist[i].applist.length; j++){
|
||||
console.log(devlist[i].applist[j].name);
|
||||
app_list_str+=devlist[i].applist[j].name;
|
||||
if (j != devlist[i].applist.length - 1)
|
||||
app_list_str+=","
|
||||
}
|
||||
tr.insertCell(-1).innerHTML = app_list_str;
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
//]]></script>
|
||||
|
||||
|
||||
<fieldset class="cbi-section">
|
||||
<legend><%:访问记录%></legend>
|
||||
<legend><%:终端列表%></legend>
|
||||
<table class="imagetable" id="user_status_table">
|
||||
<!--
|
||||
<tr>
|
||||
<th ><%:App%></th>
|
||||
<th ><%:主机名%></th>
|
||||
<th ><%:mac地址%></th>
|
||||
<th><%:开始时间%></th>
|
||||
<th><%:访问时长%></th>
|
||||
<th><%:过滤状态%></th>
|
||||
</tr>
|
||||
-->
|
||||
<tr>
|
||||
<th ><%:主机名%></th>
|
||||
<th ><%:mac地址%></th>
|
||||
<th ><%:ip地址%></th>
|
||||
<th ><%:App名称%></th>
|
||||
<th><%:丢包次数%></th>
|
||||
<th ><%:访问次数%></th>
|
||||
<th><%:最后访问时间%></th>
|
||||
<th><%:过滤状态%></th>
|
||||
<th><%:常用APP(TOP5)%></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="8"><em><br /><%:Collecting data...%></em></td>
|
||||
|
||||
@ -0,0 +1,5 @@
|
||||
<%+cbi/valueheader%>
|
||||
<label class="cbi-value" style="display:inline-block; width: 130px" for="ulfile"><%:选择本地特征库文件:%></label>
|
||||
<input class="cbi-input-file" style="width: 500px" type="file" id="ulfile" name="ulfile" />
|
||||
<input type="submit" class="cbi-button cbi-input-apply" name="upload" value="<%:Upload%>" />
|
||||
<%+cbi/valuefooter%>
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set appfilter.user=user
|
||||
appfilter.feature=feature
|
||||
commit appfilter
|
||||
EOF
|
||||
exit 0
|
||||
|
||||
@ -2,14 +2,14 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=open-app-filter
|
||||
PKG_VERSION:=3.0
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=5.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/destan19/OpenAppFilter.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-01-26
|
||||
PKG_SOURCE_VERSION:=95c95d366140f50166dbe7517d87787d05a6df1c
|
||||
PKG_MIRROR_HASH:=c54ac1ed8947e44c73af0501d1c05901745dfedb4feb73ed80aa9a8ba1e4b70e
|
||||
PKG_SOURCE_DATE:=2021-03-04
|
||||
PKG_SOURCE_VERSION:=4483aab7d158031adc99b8669d5e7cf4f1023c14
|
||||
PKG_MIRROR_HASH:=07ba70f41ae62704b8698703f2f3a0b06d4317d4292297514a7ffa13ccecebfc
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
||||
@ -9,12 +9,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=simple-torrent
|
||||
PKG_VERSION:=1.2.12
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=1.2.14
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/boypt/simple-torrent/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=82cfa9cd9e9dca839ad542a24ecf67073fbcb703f9d890381148be99e8689716
|
||||
PKG_HASH:=e3b3357ab8eb9431ec7c22b2f453d219cfe0652c5c26bbf0a052c99271cbf6a5
|
||||
|
||||
PKG_LICENSE:=AGPL-3.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
@ -41,7 +41,7 @@ define Package/simple-torrent
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=BitTorrent
|
||||
TITLE:=A self-hosted remote torrent client
|
||||
URL:=https://github.com/ginuerzh/gost
|
||||
URL:=https://github.com/boypt/simple-torrent
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle +libstdcpp
|
||||
endef
|
||||
|
||||
|
||||
@ -11,12 +11,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=v2ray-plugin
|
||||
PKG_VERSION:=1.8.0
|
||||
PKG_VERSION:=4.35.0
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/teddysun/v2ray-plugin/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=1276bdc2f03e40219eed2894ff746e4ef5acb8a7f980c163b7a90b0b5b9058e2
|
||||
PKG_HASH:=ccd5e791150b2c822b179430350cb789d91e5d90d6776ea14abe02f5895fdadb
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
@ -32,6 +32,7 @@ PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/shadowsocks/v2ray-plugin
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
GO_PKG_LDFLAGS_X:=main.VERSION=v$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
@ -55,7 +56,7 @@ define Package/v2ray-plugin
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=SIP003 plugin for shadowsocks, based on v2ray
|
||||
URL:=https://github.com/shadowsocks/v2ray-plugin
|
||||
URL:=https://github.com/teddysun/v2ray-plugin
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-certificates
|
||||
endef
|
||||
|
||||
|
||||
@ -9,12 +9,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=xray-plugin
|
||||
PKG_VERSION:=1.3.0
|
||||
PKG_VERSION:=1.3.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/teddysun/xray-plugin/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=a74adb1ea36819b634fb2b09fc2ac14ec2c57488285c82e6e26f1347de1d6324
|
||||
PKG_HASH:=2129774dd095cc113f26d20283127e2fefe41821290b13d8b31efe73ff9c08fd
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-ssr-plus
|
||||
PKG_VERSION:=183
|
||||
PKG_RELEASE:=6
|
||||
PKG_RELEASE:=8
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun \
|
||||
|
||||
@ -155,14 +155,10 @@ end
|
||||
if is_finded("trojan") then
|
||||
o:value("trojan", translate("Trojan"))
|
||||
end
|
||||
if is_finded("trojan-go") then
|
||||
o:value("trojan", translate("Trojan"))
|
||||
o:value("trojan-go", translate("Trojan-Go"))
|
||||
end
|
||||
if is_finded("naive") then
|
||||
o:value("naiveproxy", translate("NaiveProxy"))
|
||||
end
|
||||
if is_finded("ipt2socks-alt") or is_finded("ipt2socks") then
|
||||
if is_finded("ipt2socks") then
|
||||
o:value("socks5", translate("Socks5"))
|
||||
end
|
||||
if is_finded("redsocks2") then
|
||||
@ -200,7 +196,6 @@ o:depends("type", "v2ray")
|
||||
o:depends("type", "trojan")
|
||||
o:depends("type", "naiveproxy")
|
||||
o:depends("type", "socks5")
|
||||
o:depends("type", "trojan-go")
|
||||
|
||||
o = s:option(Value, "server_port", translate("Server Port"))
|
||||
o.datatype = "port"
|
||||
@ -211,7 +206,6 @@ o:depends("type", "v2ray")
|
||||
o:depends("type", "trojan")
|
||||
o:depends("type", "naiveproxy")
|
||||
o:depends("type", "socks5")
|
||||
o:depends("type", "trojan-go")
|
||||
|
||||
o = s:option(Flag, "auth_enable", translate("Enable Authentication"))
|
||||
o.rmempty = false
|
||||
@ -239,7 +233,6 @@ o:depends({type = "v2ray", v2ray_protocol = "http", auth_enable = true})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "socks", auth_enable = true})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "trojan"})
|
||||
o:depends("type", "trojan-go")
|
||||
|
||||
o = s:option(ListValue, "encrypt_method", translate("Encrypt Method"))
|
||||
for _, v in ipairs(encrypt_methods) do
|
||||
@ -271,6 +264,9 @@ end
|
||||
if is_finded("v2ray-plugin") then
|
||||
o:value("v2ray-plugin", translate("v2ray-plugin"))
|
||||
end
|
||||
if is_finded("xray-plugin") then
|
||||
o:value("xray-plugin", translate("xray-plugin"))
|
||||
end
|
||||
o.rmempty = true
|
||||
o:depends("type", "ss")
|
||||
|
||||
@ -278,6 +274,7 @@ o = s:option(Value, "plugin_opts", translate("Plugin Opts"))
|
||||
o.rmempty = true
|
||||
o:depends({type = "ss", plugin = "obfs-local"})
|
||||
o:depends({type = "ss", plugin = "v2ray-plugin"})
|
||||
o:depends({type = "ss", plugin = "xray-plugin"})
|
||||
|
||||
o = s:option(ListValue, "protocol", translate("Protocol"))
|
||||
for _, v in ipairs(protocol) do
|
||||
@ -337,14 +334,6 @@ o:value("quic", "QUIC")
|
||||
o.rmempty = true
|
||||
o:depends("type", "v2ray")
|
||||
|
||||
trojan_transport = s:option(ListValue, "trojan_transport", translate("Transport"))
|
||||
trojan_transport:value("original", "Original")
|
||||
trojan_transport:value("ws", "WebSocket")
|
||||
trojan_transport:value("h2", "HTTP/2")
|
||||
trojan_transport:value("h2+ws", "HTTP/2 & WebSocket")
|
||||
trojan_transport.default = "original"
|
||||
trojan_transport:depends("type", "trojan-go")
|
||||
|
||||
-- [[ TCP部分 ]]--
|
||||
-- TCP伪装
|
||||
o = s:option(ListValue, "tcp_guise", translate("Camouflage Type"))
|
||||
@ -490,22 +479,6 @@ o.placeholder = "eg: [\"-config\", \"test.json\"]"
|
||||
o:depends({plugin_type = "shadowsocks"})
|
||||
o:depends({plugin_type = "other"})
|
||||
|
||||
-- [[ Trojan-Go Shadowsocks2 ]] --
|
||||
o = s:option(Flag, "ss_aead", translate("Shadowsocks2"))
|
||||
o:depends("type", "trojan-go")
|
||||
o.default = "0"
|
||||
|
||||
o = s:option(ListValue, "ss_aead_method", translate("Encrypt Method"))
|
||||
o:value("aes-128-gcm")
|
||||
o:value("aes-256-gcm")
|
||||
o:value("chacha20-ietf-poly1305")
|
||||
o.default = "aes-128-gcm"
|
||||
o:depends("ss_aead", "1")
|
||||
|
||||
o = s:option(Value, "ss_aead_pwd", translate("Password"))
|
||||
o.password = true
|
||||
o:depends("ss_aead", "1")
|
||||
|
||||
-- [[ TLS ]]--
|
||||
o = s:option(Flag, "tls", translate("TLS"))
|
||||
o.rmempty = true
|
||||
@ -513,7 +486,6 @@ o.default = "0"
|
||||
o:depends({type = "v2ray", xtls = false})
|
||||
-- o:depends({type = "v2ray", v2ray_protocol = "vless", xtls = false})
|
||||
o:depends("type", "trojan")
|
||||
o:depends("type", "trojan-go")
|
||||
|
||||
-- XTLS
|
||||
if is_finded("xray") then
|
||||
@ -538,7 +510,6 @@ o:depends("xtls", true)
|
||||
-- [[ TLS部分 ]] --
|
||||
o = s:option(Flag, "tls_sessionTicket", translate("Session Ticket"))
|
||||
o:depends({type = "trojan", tls = true})
|
||||
o:depends({type = "trojan-go", tls = true})
|
||||
o.default = "0"
|
||||
|
||||
-- [[ Trojan TLS ]]--
|
||||
@ -546,14 +517,10 @@ o = s:option(ListValue, "fingerprint", translate("Finger Print"))
|
||||
o:value("disable", translate("disable"))
|
||||
o:value("firefox", translate("firefox"))
|
||||
o:value("chrome", translate("chrome"))
|
||||
if is_finded("Trojan-go") then
|
||||
o:value("ios", translate("ios"))
|
||||
end
|
||||
if is_finded("xray") then
|
||||
o:value("safari", translate("safari"))
|
||||
o:value("randomized", translate("random"))
|
||||
end
|
||||
o:depends({type = "trojan-go", tls = true})
|
||||
o:depends({type = "v2ray", tls = true})
|
||||
o.default = "firefox"
|
||||
|
||||
@ -586,7 +553,6 @@ o = s:option(Flag, "certificate", translate("Self-signed Certificate"))
|
||||
o.rmempty = true
|
||||
o.default = "0"
|
||||
o:depends({type = "trojan", tls = true, insecure = false})
|
||||
o:depends({type = "trojan-go", tls = true, insecure = false})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "vmess", tls = true, insecure = false})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "vless", tls = true, insecure = false})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "vmess", xtls = true, insecure = false})
|
||||
@ -629,9 +595,9 @@ end
|
||||
|
||||
o = s:option(Value, "certpath", translate("Current Certificate Path"))
|
||||
o:depends("certificate", 1)
|
||||
o:value("/etc/ssl/private/")
|
||||
o:value("/etc/ssl/private/ca.pem")
|
||||
o.description = translate("Please confirm the current certificate path")
|
||||
o.default = "/etc/ssl/private/"
|
||||
o.default = "/etc/ssl/private/ca.pem"
|
||||
|
||||
o = s:option(Flag, "fast_open", translate("TCP Fast Open"))
|
||||
o.rmempty = true
|
||||
@ -639,7 +605,6 @@ o.default = "0"
|
||||
o:depends("type", "ssr")
|
||||
o:depends("type", "ss")
|
||||
o:depends("type", "trojan")
|
||||
o:depends("type", "trojan-go")
|
||||
|
||||
o = s:option(Flag, "switch_enable", translate("Enable Auto Switch"))
|
||||
o.rmempty = false
|
||||
|
||||
@ -227,58 +227,6 @@ function import_ssr_url(btn, urlname, sid) {
|
||||
}
|
||||
s.innerHTML = "<font color='green'><%:Import configuration information successfully.%></font>";
|
||||
return false;
|
||||
case "trojan-go":
|
||||
var url0, param = "";
|
||||
var ploc = ssu[1].indexOf("#");
|
||||
if (ploc > 0) {
|
||||
url0 = ssu[1].substr(0, ploc);
|
||||
param = ssu[1].substr(ploc + 1);
|
||||
} else {
|
||||
url0 = ssu[1]
|
||||
}
|
||||
var sstr = url0;
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.type')[0].value = ssu[0];
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.type')[0].dispatchEvent(event);
|
||||
var team = sstr.split('@');
|
||||
var password = team[0]
|
||||
var serverPart = team[1].split(':');
|
||||
var others = serverPart[1].split('?');
|
||||
var port = parseInt(others[0]);
|
||||
var queryParam = {}
|
||||
if (others.length > 1) {
|
||||
var queryParams = others[1]
|
||||
var queryArray = queryParams.split('&');
|
||||
for (i = 0; i < queryArray.length; i++) {
|
||||
var params = queryArray[i].split('=');
|
||||
queryParam[decodeURIComponent(params[0])] = decodeURIComponent(params[1] || '');
|
||||
}
|
||||
}
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.server')[0].value = serverPart[0];
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.server_port')[0].value = port || '443';
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.password')[0].value = password;
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.trojan_transport')[0].value = queryParam.type || 'original';
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.trojan_transport')[0].dispatchEvent(event);
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.ws_host')[0].value = queryParam.host;
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.ws_path')[0].value = queryParam.path;
|
||||
if (queryParam.encryption)
|
||||
{
|
||||
var ss_aead = queryParam.encryption.split(';');
|
||||
var ss_aead_method = ss_aead[1].split(':');
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.ss_aead')[0].checked = ss_aead[0] == 'ss';
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.ss_aead')[0].dispatchEvent(event);
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.ss_aead_method')[0].value = ss_aead_method[0];
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.ss_aead_pwd')[0].value = ss_aead_method[1];
|
||||
}
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls')[0].checked = true;
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls')[0].dispatchEvent(event);
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls_host')[0].value = queryParam.sni || '';
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.insecure')[0].checked = queryParam.allowInsecure == '1';
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.insecure')[0].dispatchEvent(event);
|
||||
if (param != undefined) {
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.alias')[0].value = decodeURI(param);
|
||||
}
|
||||
s.innerHTML = "<font color='green'><%:Import configuration information successfully.%></font>";
|
||||
return false;
|
||||
case "vmess":
|
||||
var sstr = b64DecodeUnicode(ssu[1]);
|
||||
var ploc = sstr.indexOf("/?");
|
||||
|
||||
@ -733,8 +733,5 @@ msgstr "输入的内容不正确!"
|
||||
msgid "Reset complete"
|
||||
msgstr "重置完成"
|
||||
|
||||
msgid "Shadowsocks2"
|
||||
msgstr "二次加密"
|
||||
|
||||
msgid "Finger Print"
|
||||
msgstr "指纹伪造"
|
||||
|
||||
@ -27,6 +27,7 @@ shunt_dns_config_file=
|
||||
tmp_local_port=
|
||||
ARG_UDP=
|
||||
ARG_OTA=
|
||||
dns_port="5335" #dns port
|
||||
tmp_dns_port="300" #dns2socks temporary port
|
||||
tmp_udp_port="301" #udp temporary port
|
||||
tmp_udp_local_port="302" #udp socks temporary port
|
||||
@ -182,7 +183,7 @@ start_dns() {
|
||||
pid_file="/var/run/pdnsd.pid";
|
||||
run_as="nobody";
|
||||
server_ip=127.0.0.1;
|
||||
server_port=5335;
|
||||
server_port=$dns_port;
|
||||
status_ctl=on;
|
||||
query_method=tcp_only;
|
||||
min_ttl=1h;
|
||||
@ -201,6 +202,7 @@ start_dns() {
|
||||
uptest=none;
|
||||
interval=10m;
|
||||
purge_cache=off;
|
||||
reject=::/0;
|
||||
}
|
||||
EOF
|
||||
ln_start_bin $(first_type pdnsd) pdnsd -c $TMP_PATH/pdnsd.conf
|
||||
@ -218,7 +220,7 @@ start_dns() {
|
||||
;;
|
||||
2)
|
||||
ln_start_bin $(first_type microsocks) microsocks -i 127.0.0.1 -p $tmp_dns_port ssrplus-dns
|
||||
ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_dns_port $dnsserver:$dnsport 127.0.0.1:5335 -q
|
||||
ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_dns_port $dnsserver:$dnsport 127.0.0.1:$dns_port -q
|
||||
pdnsd_enable_flag=2
|
||||
;;
|
||||
esac
|
||||
@ -302,20 +304,6 @@ gen_config_file() { #server1 type2 code3 local_port4 socks_port5 threads5
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
trojan-go)
|
||||
case "$3" in
|
||||
1 | 2)
|
||||
lua /usr/share/shadowsocksr/gen_config.lua $1 nat $4 >$config_file
|
||||
;;
|
||||
3)
|
||||
lua /usr/share/shadowsocksr/gen_config.lua $1 nat $4 >$config_file
|
||||
lua /usr/share/shadowsocksr/gen_config.lua $1 client $tmp_port >$shunt_dns_config_file
|
||||
;;
|
||||
4)
|
||||
lua /usr/share/shadowsocksr/gen_config.lua $1 client $4 >$config_file
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
naiveproxy)
|
||||
case "$3" in
|
||||
1)
|
||||
@ -361,14 +349,9 @@ start_udp() {
|
||||
;;
|
||||
trojan) #client
|
||||
gen_config_file $UDP_RELAY_SERVER $type 2 $tmp_udp_local_port
|
||||
ln_start_bin $(first_type trojan-go trojan) $type --config $udp_config_file
|
||||
ln_start_bin $(first_type ipt2socks-alt ipt2socks) ipt2socks -U -b 0.0.0.0 -4 -s 127.0.0.1 -p $tmp_udp_local_port -l $tmp_udp_port
|
||||
echolog "UDP TPROXY Relay:$($(first_type trojan-go trojan) --version 2>&1 | head -1) Started!"
|
||||
;;
|
||||
trojan-go)
|
||||
gen_config_file $UDP_RELAY_SERVER $type 2 $udp_config_file
|
||||
ln_start_bin $(first_type trojan-go) $type --config $udp_config_file
|
||||
echolog "UDP TPROXY Relay:$($(first_type trojan-go) --version 2>&1 | head -1) Started!"
|
||||
ln_start_bin $(first_type trojan) $type --config $udp_config_file
|
||||
ln_start_bin $(first_type ipt2socks) ipt2socks -U -b 0.0.0.0 -4 -s 127.0.0.1 -p $tmp_udp_local_port -l $tmp_udp_port
|
||||
echolog "UDP TPROXY Relay:$($(first_type trojan) --version 2>&1 | head -1) Started!"
|
||||
;;
|
||||
naiveproxy)
|
||||
echolog "NaïveProxy UDP TPROXY Relay not supported!"
|
||||
@ -376,12 +359,12 @@ start_udp() {
|
||||
ARG_UDP=""
|
||||
;;
|
||||
socks5)
|
||||
if [ "$(uci_get_by_name $UDP_RELAY_SERVER auth_enable 0)" == "1" ]; then
|
||||
local auth="-a $(uci_get_by_name $UDP_RELAY_SERVER username) -k $(uci_get_by_name $UDP_RELAY_SERVER password)"
|
||||
fi
|
||||
ln_start_bin $(first_type ipt2socks-alt ipt2socks) ipt2socks $udp_config_file -U -4 -s $(uci_get_by_name $UDP_RELAY_SERVER server) -p $(uci_get_by_name $UDP_RELAY_SERVER server_port) -l $tmp_udp_port $auth
|
||||
#gen_config_file $UDP_RELAY_SERVER $type 2 $tmp_udp_port
|
||||
#ln_start_bin $(first_type redsocks2) redsocks2 -c $udp_config_file
|
||||
# if [ "$(uci_get_by_name $UDP_RELAY_SERVER auth_enable 0)" == "1" ]; then
|
||||
# local auth="-a $(uci_get_by_name $UDP_RELAY_SERVER username) -k $(uci_get_by_name $UDP_RELAY_SERVER password)"
|
||||
# fi
|
||||
# ln_start_bin $(first_type ipt2socks) ipt2socks $udp_config_file -U -4 -s $(uci_get_by_name $UDP_RELAY_SERVER server) -p $(uci_get_by_name $UDP_RELAY_SERVER server_port) -l $tmp_udp_port $auth
|
||||
gen_config_file $UDP_RELAY_SERVER $type 2 $tmp_udp_port
|
||||
ln_start_bin $(first_type redsocks2) redsocks2 -c $udp_config_file
|
||||
echolog "UDP TPROXY Relay:Socks5 REDIRECT/TPROXY Started!"
|
||||
;;
|
||||
tun)
|
||||
@ -418,17 +401,17 @@ start_shunt() {
|
||||
ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_port 8.8.8.8:53 127.0.0.1:$tmp_shunt_dns_port -q
|
||||
echolog "shunt:$($(first_type xray v2ray) -version | head -1) Started!"
|
||||
;;
|
||||
trojan | trojan-go)
|
||||
trojan)
|
||||
gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port
|
||||
ln_start_bin $(first_type trojan-go trojan) $type --config $shunt_config_file
|
||||
ln_start_bin $(first_type trojan) $type --config $shunt_config_file
|
||||
if [ -n "$tmp_local_port" ]; then
|
||||
local tmp_port=$tmp_local_port
|
||||
else
|
||||
local tmp_port=$tmp_shunt_local_port
|
||||
ln_start_bin $(first_type trojan-go trojan) $type --config $shunt_dns_config_file
|
||||
ln_start_bin $(first_type trojan) $type --config $shunt_dns_config_file
|
||||
fi
|
||||
ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_port 8.8.8.8:53 127.0.0.1:$tmp_shunt_dns_port -q
|
||||
echolog "shunt:$($(first_type trojan-go trojan) --version 2>&1 | head -1) Started!"
|
||||
echolog "shunt:$($(first_type trojan) --version 2>&1 | head -1) Started!"
|
||||
;;
|
||||
naiveproxy)
|
||||
gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port
|
||||
@ -443,22 +426,22 @@ start_shunt() {
|
||||
echolog "shunt:$($(first_type "naive") --version 2>&1 | head -1) Started!"
|
||||
redir_udp=0
|
||||
;;
|
||||
socks5)
|
||||
if [ "$(uci_get_by_name $SHUNT_SERVER auth_enable 0)" == "1" ]; then
|
||||
local auth="-a $(uci_get_by_name $SHUNT_SERVER username) -k $(uci_get_by_name $SHUNT_SERVER password)"
|
||||
fi
|
||||
ln_start_bin $(first_type ipt2socks-alt ipt2socks) ipt2socks $shunt_config_file -R -4 -s $(uci_get_by_name $SHUNT_SERVER server) -p $(uci_get_by_name $SHUNT_SERVER server_port) -l $tmp_shunt_port $auth
|
||||
#gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port
|
||||
#ln_start_bin $(first_type redsocks2) redsocks2 -c $shunt_config_file
|
||||
if [ -n "$tmp_local_port" ]; then
|
||||
local tmp_port=$tmp_local_port
|
||||
else
|
||||
local tmp_port=$tmp_shunt_local_port
|
||||
ln_start_bin $(first_type microsocks) microsocks -i 127.0.0.1 -p $tmp_port shunt-dns-ssr-plus
|
||||
fi
|
||||
ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_port 8.8.8.8:53 127.0.0.1:$tmp_shunt_dns_port -q
|
||||
echolog "shunt:$type REDIRECT/TPROXY Started!"
|
||||
;;
|
||||
# socks5)
|
||||
# if [ "$(uci_get_by_name $SHUNT_SERVER auth_enable 0)" == "1" ]; then
|
||||
# local auth="-a $(uci_get_by_name $SHUNT_SERVER username) -k $(uci_get_by_name $SHUNT_SERVER password)"
|
||||
# fi
|
||||
# ln_start_bin $(first_type ipt2socks) ipt2socks $shunt_config_file -R -4 -s $(uci_get_by_name $SHUNT_SERVER server) -p $(uci_get_by_name $SHUNT_SERVER server_port) -l $tmp_shunt_port $auth
|
||||
# #gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port
|
||||
# #ln_start_bin $(first_type redsocks2) redsocks2 -c $shunt_config_file
|
||||
# if [ -n "$tmp_local_port" ]; then
|
||||
# local tmp_port=$tmp_local_port
|
||||
# else
|
||||
# local tmp_port=$tmp_shunt_local_port
|
||||
# ln_start_bin $(first_type microsocks) microsocks -i 127.0.0.1 -p $tmp_port shunt-dns-ssr-plus
|
||||
# fi
|
||||
# ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_port 8.8.8.8:53 127.0.0.1:$tmp_shunt_dns_port -q
|
||||
# echolog "shunt:$type REDIRECT/TPROXY Started!"
|
||||
# ;;
|
||||
*)
|
||||
gen_config_file $SHUNT_SERVER $type 3 $tmp_shunt_port
|
||||
ln_start_bin $(first_type redsocks2) redsocks2 -c $shunt_config_file
|
||||
@ -492,10 +475,10 @@ start_local() {
|
||||
echolog "Global_Socks5:$($(first_type "xray" "v2ray") -version | head -1) Started!"
|
||||
fi
|
||||
;;
|
||||
trojan | trojan-go) #client
|
||||
trojan) #client
|
||||
gen_config_file $LOCAL_SERVER $type 4 $local_port
|
||||
ln_start_bin $(first_type trojan-go trojan) $type --config $local_config_file
|
||||
echolog "Global_Socks5:$($(first_type trojan-go trojan) --version 2>&1 | head -1) Started!"
|
||||
ln_start_bin $(first_type trojan) $type --config $local_config_file
|
||||
echolog "Global_Socks5:$($(first_type trojan) --version 2>&1 | head -1) Started!"
|
||||
;;
|
||||
naiveproxy)
|
||||
gen_config_file $LOCAL_SERVER $type 4 $local_port
|
||||
@ -552,10 +535,12 @@ Start_Run() {
|
||||
ln_start_bin $(first_type xray v2ray) v2ray -config $tcp_config_file
|
||||
echolog "Main node:$($(first_type xray v2ray) -version | head -1) Started!"
|
||||
;;
|
||||
trojan | trojan-go)
|
||||
trojan)
|
||||
gen_config_file $GLOBAL_SERVER $type 1 $tcp_port
|
||||
ln_start_bin $(first_type trojan-go trojan) $type --config $tcp_config_file
|
||||
echolog "Main node:$($(first_type trojan-go trojan) --version 2>&1 | head -1) Started!"
|
||||
for i in $(seq 1 $threads); do
|
||||
ln_start_bin $(first_type $type) $type --config $tcp_config_file
|
||||
done
|
||||
echolog "Main node:$($(first_type $type) --version 2>&1 | head -1) , $threads Threads Started!"
|
||||
;;
|
||||
naiveproxy)
|
||||
gen_config_file $GLOBAL_SERVER $type 1 $tcp_port
|
||||
@ -566,7 +551,7 @@ Start_Run() {
|
||||
if [ "$(uci_get_by_name $GLOBAL_SERVER auth_enable 0)" == "1" ]; then
|
||||
local auth="-a $(uci_get_by_name $GLOBAL_SERVER username) -k $(uci_get_by_name $GLOBAL_SERVER password)"
|
||||
fi
|
||||
ln_start_bin $(first_type ipt2socks-alt ipt2socks) ipt2socks $tcp_config_file -R -4 -j $threads -s $(uci_get_by_name $GLOBAL_SERVER server) -p $(uci_get_by_name $GLOBAL_SERVER server_port) -l $tcp_port $auth
|
||||
ln_start_bin $(first_type ipt2socks) ipt2socks $tcp_config_file -R -4 -j $threads -s $(uci_get_by_name $GLOBAL_SERVER server) -p $(uci_get_by_name $GLOBAL_SERVER server_port) -l $tcp_port $auth
|
||||
#gen_config_file $GLOBAL_SERVER $type 1 $tcp_port
|
||||
#for i in $(seq 1 $threads); do
|
||||
# ln_start_bin $(first_type redsocks2) redsocks2 -c $tcp_config_file
|
||||
|
||||
@ -3951,7 +3951,6 @@
|
||||
103.144.66.0/23
|
||||
103.144.70.0/23
|
||||
103.144.72.0/23
|
||||
103.144.88.0/24
|
||||
103.144.108.0/23
|
||||
103.144.136.0/23
|
||||
103.144.148.0/23
|
||||
@ -3986,7 +3985,6 @@
|
||||
103.147.124.0/23
|
||||
103.147.198.0/23
|
||||
103.147.206.0/23
|
||||
103.147.211.0/24
|
||||
103.148.174.0/23
|
||||
103.149.6.0/23
|
||||
103.149.17.0/24
|
||||
@ -4129,6 +4127,11 @@
|
||||
103.162.32.0/23
|
||||
103.162.38.0/23
|
||||
103.162.116.0/23
|
||||
103.163.28.0/23
|
||||
103.163.32.0/23
|
||||
103.163.46.0/23
|
||||
103.163.74.0/23
|
||||
103.163.180.0/23
|
||||
103.192.0.0/22
|
||||
103.192.4.0/22
|
||||
103.192.8.0/22
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -28,7 +28,5 @@ if [ ! -s "/etc/config/shadowsocksr" ]; then
|
||||
fi
|
||||
sed -i "s/option type 'vmess'"/"option type 'v2ray'\n\toption v2ray_protocol 'vmess'/g" /etc/config/shadowsocksr
|
||||
sed -i "s/option type 'vless'"/"option type 'v2ray'\n\toption v2ray_protocol 'vless'/g" /etc/config/shadowsocksr
|
||||
sed -i "s/option type 'trojan'"/"option type 'v2ray'\n\toption v2ray_protocol 'trojan'/g" /etc/config/shadowsocksr
|
||||
sed -i "s/option type 'socks5'"/"option type 'v2ray'\n\toption v2ray_protocol 'socks'/g" /etc/config/shadowsocksr
|
||||
rm -rf /tmp/luci-modulecache /tmp/luci-indexcache
|
||||
exit 0
|
||||
|
||||
@ -108,7 +108,7 @@ while [ "1" == "1" ]; do #死循环
|
||||
kill -9 $(busybox ps -w | grep ssrplus-dns | grep -v grep | awk '{print $1}') >/dev/null 2>&1
|
||||
kill -9 $(busybox ps -w | grep "dns2socks 127.0.0.1 $tmp_dns_port" | grep -v grep | awk '{print $1}') >/dev/null 2>&1
|
||||
ln_start_bin $(first_type microsocks) microsocks -i 127.0.0.1 -p $tmp_dns_port ssrplus-dns
|
||||
ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_dns_port $dnsserver:$dnsport 127.0.0.1:5335 -q
|
||||
ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_dns_port $dnsserver:$dnsport 127.0.0.1:$dns_port -q
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
@ -118,13 +118,13 @@ local Xray = {
|
||||
streamSettings = {
|
||||
network = server.transport or "tcp",
|
||||
security = (server.xtls == '1') and "xtls" or (server.tls == '1') and "tls" or nil,
|
||||
tlsSettings = (server.tls == '1') and {
|
||||
tlsSettings = (server.tls == '1' and (server.insecure == "1" or server.tls_host or server.fingerprint)) and {
|
||||
-- tls
|
||||
fingerprint = server.fingerprint,
|
||||
allowInsecure = (server.insecure == "1") and true or nil,
|
||||
serverName = server.tls_host
|
||||
} or nil,
|
||||
xtlsSettings = (server.xtls == '1') and {
|
||||
xtlsSettings = (server.xtls == '1' and (server.insecure == "1" or server.tls_host or server.fingerprint)) and {
|
||||
-- xtls
|
||||
allowInsecure = (server.insecure == "1") and true or nil,
|
||||
serverName = server.tls_host
|
||||
@ -194,7 +194,7 @@ local trojan = {
|
||||
ssl = {
|
||||
verify = (server.insecure == "0") and true or false,
|
||||
verify_hostname = (server.tls == "1") and true or false,
|
||||
cert = "",
|
||||
cert = (server.certificate) and server.certpath or nil,
|
||||
cipher = cipher,
|
||||
cipher_tls13 = cipher13,
|
||||
sni = server.tls_host,
|
||||
@ -204,12 +204,6 @@ local trojan = {
|
||||
session_ticket = (server.tls_sessionTicket == "1") and true or false
|
||||
},
|
||||
udp_timeout = 60,
|
||||
mux = (server.mux == "1") and {
|
||||
-- mux
|
||||
enabled = true,
|
||||
concurrency = tonumber(server.concurrency),
|
||||
idle_timeout = 60
|
||||
} or nil,
|
||||
tcp = {
|
||||
-- tcp
|
||||
no_delay = true,
|
||||
@ -265,37 +259,6 @@ function config:handleIndex(index)
|
||||
trojan = function()
|
||||
print(json.stringify(trojan, 1))
|
||||
end,
|
||||
trojan_go = function()
|
||||
trojan.ssl.cipher = server.fingerprint == nil and cipher or (server.fingerprint == "disable" and cipher13 .. ":" .. cipher or "")
|
||||
trojan.ssl.cipher_tls13 = server.fingerprint == nil and cipher13 or nil
|
||||
trojan.ssl.fingerprint = (server.fingerprint ~= nil and server.fingerprint ~= "disable") and server.fingerprint or ""
|
||||
trojan.ssl.alpn = server.trojan_transport == 'ws' and {} or {"h2", "http/1.1"}
|
||||
if server.tls ~= "1" and server.trojan_transport == "original" then
|
||||
-- tls
|
||||
trojan.ssl = nil
|
||||
trojan.transport_plugin = server.trojan_transport == "original" and {
|
||||
enabled = server.plugin_type ~= nil,
|
||||
type = server.plugin_type or "plaintext",
|
||||
command = server.plugin_type ~= "plaintext" and server.plugin_cmd or nil,
|
||||
option = server.plugin_type ~= "plaintext" and server.plugin_option or nil,
|
||||
arg = server.plugin_type ~= "plaintext" and {server.plugin_arg} or nil,
|
||||
env = {}
|
||||
} or nil
|
||||
end
|
||||
trojan.websocket = server.trojan_transport and server.trojan_transport:find('ws') and {
|
||||
-- ws
|
||||
enabled = true,
|
||||
path = server.ws_path or "/",
|
||||
host = server.ws_host or (server.tls_host or server.server)
|
||||
} or nil
|
||||
trojan.shadowsocks = (server.ss_aead == "1") and {
|
||||
-- ss
|
||||
enabled = true,
|
||||
method = server.ss_aead_method or "aead_aes_128_gcm",
|
||||
password = server.ss_aead_pwd or ""
|
||||
} or nil
|
||||
print(json.stringify(trojan, 1))
|
||||
end,
|
||||
naiveproxy = function()
|
||||
print(json.stringify(naiveproxy, 1))
|
||||
end
|
||||
|
||||
@ -19,7 +19,7 @@ nil)
|
||||
rm -f $TMP_DNSMASQ_PATH/netflix_forward.conf
|
||||
;;
|
||||
$(uci_get_by_type global global_server nil) | same)
|
||||
netflix 5335
|
||||
netflix $dns_port
|
||||
;;
|
||||
*)
|
||||
netflix $tmp_shunt_dns_port
|
||||
@ -31,7 +31,7 @@ for line in $(cat /etc/ssrplus/white.list); do sed -i "/$line/d" $TMP_DNSMASQ_PA
|
||||
for line in $(cat /etc/ssrplus/white.list); do sed -i "/$line/d" $TMP_DNSMASQ_PATH/gfw_base.conf; done
|
||||
for line in $(cat /etc/ssrplus/deny.list); do sed -i "/$line/d" $TMP_DNSMASQ_PATH/gfw_list.conf; done
|
||||
for line in $(cat /etc/ssrplus/deny.list); do sed -i "/$line/d" $TMP_DNSMASQ_PATH/gfw_base.conf; done
|
||||
cat /etc/ssrplus/black.list | sed '/^$/d' | sed '/#/d' | sed "/.*/s/.*/server=\/&\/127.0.0.1#5335\nipset=\/&\/blacklist/" >$TMP_DNSMASQ_PATH/blacklist_forward.conf
|
||||
cat /etc/ssrplus/black.list | sed '/^$/d' | sed '/#/d' | sed "/.*/s/.*/server=\/&\/127.0.0.1#$dns_port\nipset=\/&\/blacklist/" >$TMP_DNSMASQ_PATH/blacklist_forward.conf
|
||||
cat /etc/ssrplus/white.list | sed '/^$/d' | sed '/#/d' | sed "/.*/s/.*/server=\/&\/127.0.0.1\nipset=\/&\/whitelist/" >$TMP_DNSMASQ_PATH/whitelist_forward.conf
|
||||
cat /etc/ssrplus/deny.list | sed '/^$/d' | sed '/#/d' | sed "/.*/s/.*/address=\/&\//" >$TMP_DNSMASQ_PATH/denylist.conf
|
||||
if [ "$(uci_get_by_type global adblock 0)" == "1" ]; then
|
||||
|
||||
@ -24,6 +24,7 @@ local proxy = ucic:get_first(name, 'server_subscribe', 'proxy', '0')
|
||||
local switch = ucic:get_first(name, 'server_subscribe', 'switch', '1')
|
||||
local subscribe_url = ucic:get_first(name, 'server_subscribe', 'subscribe_url', {})
|
||||
local filter_words = ucic:get_first(name, 'server_subscribe', 'filter_words', '过期时间/剩余流量')
|
||||
local v2_tj = luci.sys.exec('type -t -p trojan') ~= "" and "trojan" or "v2ray"
|
||||
local log = function(...)
|
||||
print(os.date("%Y-%m-%d %H:%M:%S ") .. table.concat({...}, " "))
|
||||
end
|
||||
@ -232,7 +233,7 @@ local function processData(szType, content)
|
||||
local userinfo = hostInfo[1]
|
||||
local password = userinfo
|
||||
result.alias = UrlDecode(alias)
|
||||
result.type = luci.sys.exec('type -t -p trojan') ~= "" and "trojan" or "v2ray"
|
||||
result.type = v2_tj
|
||||
result.v2ray_protocol = "trojan"
|
||||
result.server = host[1]
|
||||
-- 按照官方的建议 默认验证ssl证书
|
||||
|
||||
@ -9,13 +9,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=v2ray
|
||||
PKG_VERSION:=4.34.0
|
||||
PKG_VERSION:=4.35.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/v2ray-core-$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE:=v2ray-core-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/v2fly/v2ray-core/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=b250f569cb0369f394f63184e748f1df0c90500feb8a1bf2276257c4c8b81bee
|
||||
PKG_HASH:=2bb437550148f9c435b4df62c96f93301d4f92dca9e7d2abf912797e8fbcecda
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
@ -31,11 +31,11 @@ PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=v2ray.com/core
|
||||
GO_PKG:=github.com/v2fly/v2ray-core/v4
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
GO_PKG_LDFLAGS_X:= \
|
||||
$(GO_PKG).version=$(PKG_VERSION) \
|
||||
$(GO_PKG).codename=OpenWrt
|
||||
$(GO_PKG).build=OpenWrt \
|
||||
$(GO_PKG).version=$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
@ -46,7 +46,7 @@ define Package/$(PKG_NAME)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-certificates
|
||||
DEPENDS:=@BROKEN $(GO_ARCH_DEPENDS) +ca-certificates
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
|
||||
@ -3,12 +3,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-nginx-pingos
|
||||
PKG_VERSION:=1.19.0
|
||||
PKG_RELEASE:=4
|
||||
PKG_VERSION:=1.19.6
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://nginx.org/download/
|
||||
PKG_HASH:=44a616171fcd7d7ad7c6af3e6f3ad0879b54db5a5d21be874cd458b5691e36c8
|
||||
PKG_HASH:=b11195a02b1d3285ddf2987e02c6b6d28df41bb1b1dd25f33542848ef4fc33b5
|
||||
|
||||
PKG_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
PKG_BUILD_DIR:=$(PKG_DIR)/nginx-$(PKG_VERSION)
|
||||
|
||||
@ -360,6 +360,7 @@ struct ngx_rtmp_session_s {
|
||||
unsigned published:1;
|
||||
unsigned closed:1;
|
||||
unsigned publishing:1;
|
||||
unsigned finalized:1;
|
||||
|
||||
/* live type: 0- RTMP 1- http-flv 2- hls */
|
||||
unsigned live_type:2;
|
||||
|
||||
@ -374,6 +374,11 @@ ngx_rtmp_async_finalize_http_request(ngx_event_t *ev)
|
||||
|
||||
ngx_log_error(NGX_LOG_INFO, s->log, 0, "asyn finalize http request");
|
||||
|
||||
if (!r) {
|
||||
ngx_log_error(NGX_LOG_ERR, s->log, 0, "Http request is null");
|
||||
return;
|
||||
}
|
||||
|
||||
if (r->header_sent) {
|
||||
ngx_http_finalize_request(r, NGX_HTTP_CLIENT_CLOSED_REQUEST);
|
||||
ngx_http_run_posted_requests(r->connection);
|
||||
@ -407,6 +412,13 @@ ngx_rtmp_finalize_session(ngx_rtmp_session_t *s)
|
||||
return;
|
||||
}
|
||||
|
||||
if (s->finalized) {
|
||||
ngx_log_error(NGX_LOG_WARN, s->log, 0, "The session has been finalized.");
|
||||
return;
|
||||
}
|
||||
|
||||
s->finalized = 1;
|
||||
|
||||
if (s->live_type != NGX_RTMP_LIVE) {
|
||||
e = &s->close;
|
||||
e->data = s;
|
||||
@ -437,6 +449,14 @@ ngx_rtmp_finalize_fake_session(ngx_rtmp_session_t *s)
|
||||
{
|
||||
ngx_log_error(NGX_LOG_INFO, s->log, 0, "finalize fake session");
|
||||
|
||||
|
||||
if (s->finalized) {
|
||||
ngx_log_error(NGX_LOG_WARN, s->log, 0, "The fake session has been finalized.");
|
||||
return;
|
||||
}
|
||||
|
||||
s->finalized = 1;
|
||||
|
||||
ngx_rtmp_fire_event(s, NGX_RTMP_DISCONNECT, NULL, NULL);
|
||||
|
||||
ngx_rtmp_close_session(s);
|
||||
|
||||
0
package/lienol/luci-app-nginx-pingos/root/etc/init.d/pingos
Normal file → Executable file
0
package/lienol/luci-app-nginx-pingos/root/etc/init.d/pingos
Normal file → Executable file
0
package/lienol/luci-app-nginx-pingos/root/etc/uci-defaults/luci-app-nginx-pingos
Normal file → Executable file
0
package/lienol/luci-app-nginx-pingos/root/etc/uci-defaults/luci-app-nginx-pingos
Normal file → Executable file
@ -1,7 +1,7 @@
|
||||
user root;
|
||||
daemon on;
|
||||
master_process on;
|
||||
worker_processes 4;
|
||||
worker_processes 1;
|
||||
#worker_rlimit 4g;
|
||||
|
||||
#error_log logs/error.log;
|
||||
@ -109,9 +109,9 @@ http {
|
||||
hash $arg_session consistent;
|
||||
# 这里需要注意,你要开几个进程,就要按这个规则写几条记录
|
||||
server unix:/tmp/http.0;
|
||||
server unix:/tmp/http.1;
|
||||
server unix:/tmp/http.2;
|
||||
server unix:/tmp/http.3;
|
||||
# server unix:/tmp/http.1;
|
||||
# server unix:/tmp/http.2;
|
||||
# server unix:/tmp/http.3;
|
||||
}
|
||||
|
||||
server {
|
||||
|
||||
@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=4
|
||||
PKG_RELEASE:=15
|
||||
PKG_DATE:=20210213
|
||||
PKG_RELEASE:=16
|
||||
PKG_DATE:=20210303
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
|
||||
@ -40,6 +40,8 @@ define Package/rssileds/install
|
||||
$(INSTALL_BIN) ./files/rssileds.init $(1)/etc/init.d/rssileds
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rssileds $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/usr/libexec/led-trigger
|
||||
$(INSTALL_BIN) ./files/rssi $(1)/usr/libexec/led-trigger/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,rssileds))
|
||||
|
||||
3
package/network/utils/rssileds/files/rssi
Normal file
3
package/network/utils/rssileds/files/rssi
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
logger -t led-trigger "LED trigger rssi is handled by /etc/init.d/rssileds"
|
||||
Loading…
Reference in New Issue
Block a user