add package zxlhhyccc

This commit is contained in:
CN_SZTL 2019-08-04 07:08:57 +08:00
parent e93807ad56
commit 528a055e0f
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
77 changed files with 1826 additions and 4 deletions

View File

@ -35,7 +35,7 @@ make -j1 V=s
# Origin source
### Based on: [coolsnowwolf/lede](https://github.com/coolsnowwolf/lede).<br/>
Packages jsda: [jsda/packages2](https://github.com/jsda/packages2).<br/>
Package jsda: [jsda/packages2](https://github.com/jsda/packages2).<br/>
luci-theme-netgearv2 source: [tracemouse/luci-theme-netgear](https://github.com/tracemouse/luci-theme-netgear).<br/>
luci-app-serverchan source: [zxlhhyccc/luci-app-serverchan](https://github.com/zxlhhyccc/luci-app-serverchan).<br/>
OpenAppFilter source: [destan19/OpenAppFilter](https://github.com/destan19/OpenAppFilter).<br/>
@ -44,11 +44,12 @@ luci-app-koolproxy source: [Baozisoftware/luci-app-koolproxy](https://github.com
luci-app-k3screenctrl source: [Hill-98/luci-app-k3screenctrl](https://github.com/Hill-98/luci-app-k3screenctrl).<br/>
luci-app-smstool source: [f8q8/luci-app-smstool-master](https://github.com/f8q8/luci-app-smstool-master).<br/>
luci-app-airwhu source: [KyleRicardo/luci-app-airwhu](https://github.com/KyleRicardo/luci-app-airwhu).<br/>
Packages Lienol: [Lienol/openwrt-package](https://github.com/Lienol/openwrt-package).<br/>
Package Lienol: [Lienol/openwrt-package](https://github.com/Lienol/openwrt-package).<br/>
luci-app-bbr-mod source: [ntlf9t/luci-app-bbr-mod](https://github.com/ntlf9t/luci-app-bbr-mod).<br/>
Package Openwrt-BBR: [anshi233/Openwrt-BBR](https://github.com/anshi233/Openwrt-BBR).<br/>
simple-obfs source: [aa65535/openwrt-simple-obfs](https://github.com/aa65535/openwrt-simple-obfs).<br/>
v2ray-plugin source: [honwen/openwrt-v2ray-plugin](https://github.com/honwen/openwrt-v2ray-plugin).
v2ray-plugin source: [honwen/openwrt-v2ray-plugin](https://github.com/honwen/openwrt-v2ray-plugin).<br/>
Package zxlhhyccc: [zxlhhyccc/MY-lede](https://github.com/zxlhhyccc/MY-lede).
# License
### [GPL v3](https://www.gnu.org/licenses/gpl-3.0.html).

View File

@ -25,7 +25,7 @@ define Package/$(PKG_NAME)
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=LuCI Support for k3screenctrl
DEPENDS:=@PACKAGE_k3screenctrl +k3screenctrl
DEPENDS:=@PACKAGE_phicomm-k3screenctrl +phicomm-k3screenctrl
endef
define Package/$(PKG_NAME)/description

0
package/lean/k3screenctrl/Makefile Executable file → Normal file
View File

View File

@ -0,0 +1,33 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=https_dns_proxy
PKG_VERSION:=2018-04-23
PKG_RELEASE=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_MIRROR_HASH:=24b7e4238c37e646f33eee3a374f6b7beb5c167b9c5008cc13b51e5f1f3a44ea
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://github.com/aarond10/https_dns_proxy/
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=bea68401330e611f6e9b75cec84e2dc4e81e52de
PKG_MAINTAINER:=Aaron Drew <aarond10@gmail.com>
PKG_LICENSE:=MIT
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/https_dns_proxy
SECTION:=net
CATEGORY:=Network
TITLE:=DNS over HTTPS proxy server
DEPENDS:=+libcares +libcurl +libev +ca-bundle
endef
define Package/https_dns_proxy/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d ${1}/etc/config
$(INSTALL_BIN) $(PKG_BUILD_DIR)/https_dns_proxy $(1)/usr/sbin/
$(INSTALL_BIN) ./files/https_dns_proxy.init $(1)/etc/init.d/https_dns_proxy
$(INSTALL_CONF) ./files/https_dns_proxy.config $(1)/etc/config/https_dns_proxy
endef
$(eval $(call BuildPackage,https_dns_proxy))

View File

@ -0,0 +1,19 @@
config https_dns_proxy
option listen_addr '127.0.0.1'
option listen_port '5053'
option bootstrap_dns '8.8.8.8,8.8.4.4'
option url_prefix 'https://dns.google.com/resolve?'
option user 'nobody'
option group 'nogroup'
option subnet_addr ''
option proxy_server ''
config https_dns_proxy
option listen_addr '127.0.0.1'
option listen_port '5054'
option bootstrap_dns '1.1.1.1,1.0.0.1'
option url_prefix 'https://cloudflare-dns.com/dns-query?ct=application/dns-json&'
option user 'nobody'
option group 'nogroup'
option subnet_addr ''
option proxy_server ''

View File

@ -0,0 +1,46 @@
#!/bin/sh /etc/rc.common
START=80
USE_PROCD=1
PROG=/usr/sbin/https_dns_proxy
xappend() { param="$param $1"; }
append_parm() {
local section="$1"
local option="$2"
local switch="$3"
local default="$4"
local _loctmp
config_get _loctmp "$section" "$option" "$default"
[ -z "$_loctmp" ] && return 0
xappend "$switch $_loctmp"
}
start_instance() {
local cfg="$1" param
append_parm "$cfg" 'listen_addr' '-a' '127.0.0.1'
append_parm "$cfg" 'listen_port' '-p' '5053'
append_parm "$cfg" 'bootstrap_dns' '-b'
append_parm "$cfg" 'url_prefix' '-r'
append_parm "$cfg" 'user' '-u' 'nobody'
append_parm "$cfg" 'group' '-g' 'nogroup'
append_parm "$cfg" 'subnet_addr' '-e'
append_parm "$cfg" 'proxy_server' '-t'
procd_open_instance
procd_set_param command ${PROG} ${param}
procd_set_param respawn
procd_close_instance
}
service_triggers() {
procd_add_reload_trigger "https_dns_proxy"
}
start_service() {
config_load 'https_dns_proxy'
config_foreach start_instance 'https_dns_proxy'
}

View File

@ -0,0 +1,58 @@
# Copyright (C) 2019 Lucian Cristian <lucian.cristian@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=libpciaccess
PKG_VERSION:=0.14
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://www.x.org/releases/individual/lib/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_HASH:=3df543e12afd41fea8eac817e48cbfde5aed8817b81670a4e9e493bb2f5bf2a4
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_MAINTAINER:= Lucian Cristian <lucian.cristian@gmail.com>
include $(INCLUDE_DIR)/package.mk
define Package/libpciaccess
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Generic PCI access library
URL:=https://xorg.freedesktop.org/
endef
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
CONFIGURE_ARGS += \
--prefix=/usr
define Build/InstallDev
$(INSTALL_DIR) \
$(1)/usr/include \
$(1)/usr/lib
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/* \
$(1)/usr/include/
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/{pkgconfig,*.so*} \
$(1)/usr/lib/
endef
define Package/libpciaccess/install
$(INSTALL_DIR) \
$(1)/usr/lib
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/*.so* \
$(1)/usr/lib/
endef
$(eval $(call BuildPackage,libpciaccess))

View File

@ -0,0 +1,28 @@
From b6df5202306bd71158b482f25ca2e6919645d4dd Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 4 Jun 2015 20:55:06 -0700
Subject: [PATCH 4/4] Don't include sys/io.h on arm
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending
src/linux_sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c
index 3f95e53..1e3aad3 100644
--- a/src/linux_sysfs.c
+++ b/src/linux_sysfs.c
@@ -50,7 +50,7 @@
#include <dirent.h>
#include <errno.h>
-#if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
+#if defined(__i386__) || defined(__x86_64__)
#include <sys/io.h>
#else
#define inb(x) -1
--
2.1.4

View File

@ -0,0 +1,54 @@
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=librouteros
PKG_SOURCE_DATE:=2018-07-19
PKG_SOURCE_VERSION:=c485c777ffbbbd87c3d72d843af36ba016803cae
PKG_RELEASE:=1
PKG_MAINTAINER:=Sven Roederer <devel-sven@geroedel.de>
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=COPYING
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/octo/librouteros/tar.gz/$(PKG_SOURCE_VERSION)?
PKG_HASH:=427e071fe270ff6c08e32a10e5beff2add4205e6c864b142f950efdb8d2245a4
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/librouteros
TITLE:=A library that talks to MikroTik devices.
URL:=https://octo.github.io/librouteros/
SECTION:=libs
CATEGORY:=Libraries
endef
define Package/librouteros/description
librouteros is a library to communicate with RouterOS, the operating system of MikroTik's RouterBoards.
It uses the API port provided by those systems to connect and talk to the devices. librouteros is a
low-level library in that it abstracts the network protocol used but has next to no knowledge about the
commands and responses available
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/routeros_*.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/librouteros.{a,la,so*} $(1)/usr/lib/
endef
define Package/librouteros/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/librouteros.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,librouteros))

View File

@ -0,0 +1,17 @@
# Copyright 2017-2018 Stan Grishin (stangri@melmac.net)
# This is free software, licensed under the GNU General Public License v3.
include $(TOPDIR)/rules.mk
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
LUCI_TITLE:=HTTPS DNS Proxy Web UI
LUCI_DESCRIPTION:=Provides Web UI for HTTPS DNS Proxy
LUCI_DEPENDS:=+luci-mod-admin-full +https_dns_proxy
LUCI_PKGARCH:=all
PKG_RELEASE:=3
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -0,0 +1,7 @@
module("luci.controller.https_dns_proxy", package.seeall)
function index()
if not nixio.fs.access("/etc/config/https_dns_proxy") then
return
end
entry({"admin", "services", "https_dns_proxy"}, cbi("https_dns_proxy"), _("HTTPS DNS Proxy"))
end

View File

@ -0,0 +1,107 @@
local uci = require("luci.model.uci").cursor()
function uci_del_list(conf, sect, opt, value)
local lval = uci:get(conf, sect, opt)
if lval == nil or lval == "" then
lval = {}
elseif type(lval) ~= "table" then
lval = { lval }
end
local i
local changed = false
for i = #lval, 1 do
if lval[i] == value then
table.remove(lval, i)
changed = true
end
end
if changed then
if #lval > 0 then
uci:set(conf, sect, opt, lval)
else
uci:delete(conf, sect, opt)
end
end
end
function uci_add_list(conf, sect, opt, value)
local lval = uci:get(conf, sect, opt)
if lval == nil or lval == "" then
lval = {}
elseif type(lval) ~= "table" then
lval = { lval }
end
lval[#lval+1] = value
uci:set(conf, sect, opt, lval)
end
m = Map("https_dns_proxy", translate("HTTPS DNS Proxy Settings"))
m.template="cbi/map"
s3 = m:section(TypedSection, "https_dns_proxy", translate("Instances"))
s3.template = "cbi/tblsection"
s3.sortable = false
s3.anonymous = true
s3.addremove = true
local n = 0
uci:foreach("https_dns_proxy", "https_dns_proxy", function(s)
if s[".name"] == section then
return false
end
n = n + 1
end)
prov = s3:option(ListValue, "url_prefix", translate("Provider"))
prov:value("https://cloudflare-dns.com/dns-query?ct=application/dns-json&","Cloudflare")
prov:value("https://dns.google.com/resolve?","Google")
prov.write = function(self, section, value)
local la_val = la:formvalue(section)
local lp_val = lp:formvalue(section)
if not la_val then la_val = "127.0.0.1" end
if not lp_val then lp_val = n + 5053 end
if value and value:match("cloudflare") then
uci:set("https_dns_proxy", section, "bootstrap_dns", "1.1.1.1,1.0.0.1")
uci:set("https_dns_proxy", section, "url_prefix", "https://cloudflare-dns.com/dns-query?ct=application/dns-json&")
else
uci:set("https_dns_proxy", section, "bootstrap_dns", "8.8.8.8,8.8.4.4")
uci:set("https_dns_proxy", section, "url_prefix", "https://dns.google.com/resolve?")
end
uci:set("https_dns_proxy", section, "user", "nobody")
uci:set("https_dns_proxy", section, "group", "nogroup")
uci:save("https_dns_proxy")
if n == 0 then
uci:delete("dhcp", "@dnsmasq[0]", "server")
end
uci_del_list("dhcp", "@dnsmasq[0]", "server", tostring(la_val) .. ":" .. tostring(lp_val))
uci_add_list("dhcp", "@dnsmasq[0]", "server", tostring(la_val) .. ":" .. tostring(lp_val))
uci:save("dhcp")
end
la = s3:option(Value, "listen_addr", translate("Listen address"))
la.value = "127.0.0.1"
la.rmempty = true
lp = s3:option(Value, "listen_port", translate("Listen port"))
lp.datatype = "port"
lp.value = n + 5053
lp.write = function(self, section, value)
if not value then
uci:set("https_dns_proxy", section, "listen_port", n + 5053)
else
uci:set("https_dns_proxy", section, "listen_port", value)
end
uci:save("https_dns_proxy")
end
sa = s3:option(Value, "subnet_addr", translate("Subnet address"))
sa.datatype = "ip4prefix"
sa.rmempty = true
ps = s3:option(Value, "proxy_server", translate("Proxy server"))
ps.datatype = "or(ipaddr,hostname)"
ps.rmempty = true
return m

View File

@ -0,0 +1,51 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.1\n"
"Last-Translator: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: es\n"
#: applications/luci-app-https_dns_proxy/luasrc/controller/https_dns_proxy.lua:6
msgid "HTTPS DNS Proxy"
msgstr "Proxy DNS HTTPS"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:40
msgid "HTTPS DNS Proxy Settings"
msgstr "Configuración de proxy HTTPS DNS"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:43
msgid "Instances"
msgstr "Instancias"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:83
msgid "Listen address"
msgstr "Escuchar direccion"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:87
msgid "Listen port"
msgstr "Escuchar puerto"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:57
msgid "Provider"
msgstr "Proveedor"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:103
msgid "Proxy server"
msgstr "Servidor proxy"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:99
msgid "Subnet address"
msgstr "Direccion de subred"
#~ msgid "Group name"
#~ msgstr "Nombre del grupo"
#~ msgid "User name"
#~ msgstr "Nombre de usuario"

View File

@ -0,0 +1,34 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
#: applications/luci-app-https_dns_proxy/luasrc/controller/https_dns_proxy.lua:6
msgid "HTTPS DNS Proxy"
msgstr ""
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:40
msgid "HTTPS DNS Proxy Settings"
msgstr ""
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:43
msgid "Instances"
msgstr ""
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:83
msgid "Listen address"
msgstr ""
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:87
msgid "Listen port"
msgstr ""
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:57
msgid "Provider"
msgstr ""
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:103
msgid "Proxy server"
msgstr ""
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:99
msgid "Subnet address"
msgstr ""

View File

@ -0,0 +1,54 @@
#
# Yangfl <mmyangfl@gmail.com>, 2019.
#
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2019-01-03 22:46+0800\n"
"Last-Translator: Yangfl <mmyangfl@gmail.com>\n"
"Language-Team: <debian-l10n-chinese@lists.debian.org>\n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"X-Generator: Gtranslator 3.30.1\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: applications/luci-app-https_dns_proxy/luasrc/controller/https_dns_proxy.lua:6
msgid "HTTPS DNS Proxy"
msgstr "HTTPS DNS 代理"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:40
msgid "HTTPS DNS Proxy Settings"
msgstr "HTTPS DNS 代理设置"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:43
msgid "Instances"
msgstr "实例"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:83
msgid "Listen address"
msgstr "监听地址"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:87
msgid "Listen port"
msgstr "监听端口"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:57
msgid "Provider"
msgstr "提供商"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:103
msgid "Proxy server"
msgstr "代理服务器"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:99
msgid "Subnet address"
msgstr "子网地址"
#~ msgid "Group name"
#~ msgstr "组名称"
#~ msgid "User name"
#~ msgstr "用户名"

View File

@ -0,0 +1,54 @@
#
# Yangfl <mmyangfl@gmail.com>, 2019.
#
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2019-01-03 22:46+0800\n"
"Last-Translator: Yangfl <mmyangfl@gmail.com>\n"
"Language-Team: <debian-l10n-chinese@lists.debian.org>\n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_TW\n"
"X-Generator: Gtranslator 3.30.1\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: applications/luci-app-https_dns_proxy/luasrc/controller/https_dns_proxy.lua:6
msgid "HTTPS DNS Proxy"
msgstr "HTTPS DNS 代理"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:40
msgid "HTTPS DNS Proxy Settings"
msgstr "HTTPS DNS 代理設定"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:43
msgid "Instances"
msgstr "例項"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:83
msgid "Listen address"
msgstr "監聽位址"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:87
msgid "Listen port"
msgstr "監聽埠"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:57
msgid "Provider"
msgstr "提供商"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:103
msgid "Proxy server"
msgstr "代理伺服器"
#: applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua:99
msgid "Subnet address"
msgstr "子網位址"
#~ msgid "Group name"
#~ msgstr "組名稱"
#~ msgid "User name"
#~ msgstr "使用者名稱"

View File

@ -0,0 +1,10 @@
#!/bin/sh
uci -q batch <<-EOF >/dev/null
delete ucitrack.@https_dns_proxy[-1]
add ucitrack https_dns_proxy
set ucitrack.@template[-1].init=https_dns_proxy
commit ucitrack
EOF
rm -f /tmp/luci-indexcache
exit 0

View File

@ -0,0 +1,51 @@
# Copyright (C) 2018 XiaoShan mivm.cn
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-k3usb
PKG_VERSION:=1.1.0
PKG_RELEASE:=1
PKG_LICENSE:=GPLv3
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Shenzt <shenzt@gmail.com>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=LuCI Support for k3usb3.0 on or off
DEPENDS:=
endef
define Package/$(PKG_NAME)/description
LuCI Support for k3usb3.0 on or off.
endef
define Build/Prepare
$(foreach po,$(wildcard ${CURDIR}/files/luci/i18n/*.po), \
po2lmo $(po) $(PKG_BUILD_DIR)/$(patsubst %.po,%.lmo,$(notdir $(po)));)
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller
$(INSTALL_DATA) ./files/luci/controller/k3usb.lua $(1)/usr/lib/lua/luci/controller/
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
$(INSTALL_DATA) $(PKG_BUILD_DIR)/k3usb*.lmo $(1)/usr/lib/lua/luci/i18n/
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi
$(INSTALL_DATA) ./files/luci/model/cbi/k3usb.lua $(1)/usr/lib/lua/luci/model/cbi/
$(INSTALL_DIR) $(1)/
cp -pR ./files/root/* $(1)/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@ -0,0 +1,10 @@
-- Copyright (C) 2018 XiaoShan mivm.cn
module("luci.controller.k3usb", package.seeall)
function index()
if not nixio.fs.access("/etc/config/k3usb") then
return
end
entry({"admin","system","k3usb"}, cbi("k3usb"), _("k3usb"),60)
end

View File

@ -0,0 +1,19 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8\n"
msgid "usb3 enable :"
msgstr "USB3 开启:"
msgid "usb3 mode enable"
msgstr "是否开启USB3模式修改此选项设备将会自动重启"
msgid "k3usb"
msgstr "K3USB管理"
msgid "k3 usb mode"
msgstr "开启或禁用USB3"
msgid "usb mode"
msgstr "USB3管理模式"

View File

@ -0,0 +1,13 @@
-- Copyright (C) 2018 XiaoShan mivm.cn
local m, s ,o
m = Map("k3usb", translate("k3usb"), translate("k3 usb mode"))
s = m:section(TypedSection, "config", translate("usb mode") )
s.anonymous = true
o = s:option(Flag, "usb3_enable", translate("usb3 enable :"), translate("usb3 mode enable"))
o.default = 1
return m

View File

@ -0,0 +1,3 @@
config config usb
option usb3_enable '0'

View File

@ -0,0 +1,62 @@
#!/bin/sh /etc/rc.common
START=55
STOP=55
usb3_enable=$(uci get k3usb.usb.usb3_enable 2>/dev/null)
kernel=$(uname -a | awk '{print $3}')
boot(){
if [ "$usb3_enable" == "1" ]; then
#usb3
kmodloader /usr/k3usb/45-phy-bcm-ns-usb3
kmodloader /usr/k3usb/54-usb3
#usb2
kmodloader /usr/k3usb/35-usb-ehci
kmodloader /usr/k3usb/40-usb2
kmodloader /usr/k3usb/45-phy-bcm-ns-usb2
kmodloader /usr/k3usb/50-usb-ohci
echo "usb switch to usb3 mode!"
else
#usb2
kmodloader /usr/k3usb/35-usb-ehci
kmodloader /usr/k3usb/40-usb2
kmodloader /usr/k3usb/45-phy-bcm-ns-usb2
kmodloader /usr/k3usb/50-usb-ohci
echo "usb switch to usb2 mode!"
fi
kmodloader /usr/k3usb/usb-storage
kmodloader /usr/k3usb/usb-storage-extras
}
start(){
if [ "$usb3_enable" == "1" ]; then
if [ -z "$(lsmod | grep usb3)" ]; then
echo "usb change to usb3 mode, will reboot!"
reboot
else
echo "usb mode is usb3 , nothing to do"
fi
else
if [ -n "$(lsmod | grep usb3)" ]; then
echo "usb change usb2 mode, will reboot!"
reboot
else
echo "usb mode is usb2 , nothing to do"
fi
fi
}
stop(){
echo "nothing do"
}
restart(){
start
}

View File

@ -0,0 +1,10 @@
#!/bin/sh
uci -q batch <<-EOF >/dev/null
delete ucitrack.@k3usb[-1]
add ucitrack k3usb
set ucitrack.@k3usb[-1].init=k3usb
commit ucitrack
EOF
exit 0

View File

@ -0,0 +1 @@
ehci-hcd

View File

@ -0,0 +1,4 @@
ehci-hcd
ehci-platform
ehci-orion
ehci-atmel

View File

@ -0,0 +1 @@
phy-bcm-ns-usb2

View File

@ -0,0 +1 @@
phy-bcm-ns-usb3

View File

@ -0,0 +1,3 @@
ohci-hcd
ohci-platform
ohci-at91

View File

@ -0,0 +1,3 @@
xhci-hcd
xhci-pci
xhci-plat-hcd

View File

@ -0,0 +1 @@
usb-storage

View File

@ -0,0 +1,10 @@
ums-alauda
ums-cypress
ums-datafab
ums-freecom
ums-isd200
ums-jumpshot
ums-karma
ums-sddr09
ums-sddr55
ums-usbat

View File

@ -0,0 +1,17 @@
# Copyright (C) 2016 Openwrt.org
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for syncthing
LUCI_DEPENDS:=+syncthing
LUCI_PKGARCH:=all
PKG_VERSION:=1.0
PKG_RELEASE:=2
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -0,0 +1,18 @@
module("luci.controller.syncthing", package.seeall)
function index()
if not nixio.fs.access("/etc/config/syncthing") then
return
end
entry({"admin", "nas", "syncthing"}, cbi("syncthing"), _("Syncthing"), 10).dependent = true
entry({"admin","nas","syncthing","status"},call("act_status")).leaf=true
end
function act_status()
local e={}
e.running=luci.sys.call("pgrep syncthing >/dev/null")==0
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end

View File

@ -0,0 +1,19 @@
-- Copyright 2008 Yanira <forum-2008@email.de>
-- Licensed to the public under the Apache License 2.0.
require("nixio.fs")
m = Map("syncthing", translate("SyncThing Synchronization Tool"))
m:section(SimpleSection).template = "syncthing/syncthing_status"
s = m:section(TypedSection, "setting", translate("Settings"))
s.anonymous = true
s:option(Flag, "enabled", translate("Enable"))
s:option(Value, "port", translate("port")).default = 8384
s.rmempty = true
return m

View File

@ -0,0 +1,22 @@
<script type="text/javascript">//<![CDATA[
XHR.poll(1, '<%=url([[admin]], [[nas]], [[syncthing]], [[status]])%>', null,
function(x, data) {
var tb = document.getElementById('syncthing_status');
if (data && tb) {
if (data.running) {
var links = '<font color=green><%:RUNNING%></font>';
tb.innerHTML = links;
} else {
tb.innerHTML = '<font color=red><%:NOT RUNNING%></font>';
}
}
}
);
//]]>
</script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
<p id="syncthing_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>

View File

@ -0,0 +1,11 @@
msgid "Syncthing"
msgstr "储存同步"
msgid "SyncThing Synchronization Tool"
msgstr "syncthing同步工具"

View File

@ -0,0 +1,4 @@
config setting 'config'
option enabled '0'
option port '8384'

View File

@ -0,0 +1,43 @@
#!/bin/sh /etc/rc.common
START=50
run_syncthing()
{
local enabled
config_get_bool enabled $1 enabled
if [ $enabled = 1 ]; then
local port
config_get port $1 port
state=`pgrep syncthing | wc -l`
if [ $state = 0 ] ; then
export HOME="/root"
syncthing -gui-address="0.0.0.0:$port" -logfile="/var/log/syncthing.log" -no-browser >/dev/null &
echo "启动中..."
start=`pgrep syncthing | wc -l`
if [ $start = 0 ] ; then
echo "启动失败"
else
echo "启动成功"
fi
else
echo "已在运行"
fi
fi
}
start()
{
config_load syncthing
config_foreach run_syncthing setting
}
stop()
{
kill -9 `pgrep syncthing`
stop=`pgrep syncthing | wc -l`
if [ $stop = 0 ] ; then
echo "已停止运行"
else
echo "未停止运行"
fi
}

View File

@ -0,0 +1,12 @@
#!/bin/sh
touch /etc/config/syncthing
uci -q batch <<-EOF >/dev/null
delete ucitrack.@syncthing[-1]
add ucitrack syncthing
set ucitrack.@syncthing[-1].exec='/etc/init.d/syncthing restart'
commit ucitrack
EOF
# remove LuCI cache
rm -f /tmp/luci*
exit 0

View File

@ -0,0 +1,17 @@
# Copyright (C) 2016 Openwrt.org
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for verysync
LUCI_DEPENDS:=+verysync
LUCI_PKGARCH:=all
PKG_VERSION:=1.0
PKG_RELEASE:=2
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -0,0 +1,18 @@
module("luci.controller.verysync", package.seeall)
function index()
if not nixio.fs.access("/etc/config/verysync") then
return
end
entry({"admin", "nas", "verysync"}, cbi("verysync"), _("Verysync"), 10).dependent = true
entry({"admin","nas","verysync","status"},call("act_status")).leaf=true
end
function act_status()
local e={}
e.running=luci.sys.call("pgrep verysync >/dev/null")==0
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end

View File

@ -0,0 +1,20 @@
-- Copyright 2008 Yanira <forum-2008@email.de>
-- Licensed to the public under the Apache License 2.0.
require("nixio.fs")
m = Map("verysync", translate("An Efficient Data Transfer Tool"),
translate("Simple and easy-to-use multi-platform file synchronization software, astonishing transmission speed is different from the greatest advantage of other products, micro-force synchronization of intelligent P2P technology to accelerate synchronization, will split the file into several KB-only data synchronization, and the file will be AES encryption processing."))
m:section(SimpleSection).template = "verysync/verysync_status"
s = m:section(TypedSection, "setting", translate("Settings"))
s.anonymous = true
s:option(Flag, "enabled", translate("Enable"))
s:option(Value, "port", translate("port")).default = 8886
s.rmempty = true
return m

View File

@ -0,0 +1,22 @@
<script type="text/javascript">//<![CDATA[
XHR.poll(1, '<%=url([[admin]], [[nas]], [[verysync]], [[status]])%>', null,
function(x, data) {
var tb = document.getElementById('verysync_status');
if (data && tb) {
if (data.running) {
var links = '<font color=green><%:RUNNING%></font>';
tb.innerHTML = links;
} else {
tb.innerHTML = '<font color=red><%:NOT RUNNING%></font>';
}
}
}
);
//]]>
</script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
<p id="verysync_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>

View File

@ -0,0 +1,13 @@
msgid "Verysync"
msgstr "微力同步"
msgid "An Efficient Data Transfer Tool"
msgstr "一款高效的数据传输工具"
msgid "Simple and easy-to-use multi-platform file synchronization software, astonishing transmission speed is different from the greatest advantage of other products, micro-force synchronization of intelligent P2P technology to accelerate synchronization, will split the file into several KB-only data synchronization, and the file will be AES encryption processing."
msgstr "简单易用的多平台文件同步软件,惊人的传输速度是不同于其他产品的最大优势, 微力同步 的智能 P2P 技术加速同步,会将文件分割成若干份仅 KB 的数据同步,而文件都会进行 AES 加密处理。"

View File

@ -0,0 +1,4 @@
config setting 'config'
option enabled '0'
option port '8886'

View File

@ -0,0 +1,43 @@
#!/bin/sh /etc/rc.common
START=50
run_verysync()
{
local enabled
config_get_bool enabled $1 enabled
if [ $enabled = 1 ]; then
local port
config_get port $1 port
state=`pgrep verysync | wc -l`
if [ $state = 0 ] ; then
export HOME="/root"
verysync -gui-address="0.0.0.0:$port" -logfile="/var/log/verysync.log" -no-browser >/dev/null &
echo "启动中..."
start=`pgrep verysync | wc -l`
if [ $start = 0 ] ; then
echo "启动失败"
else
echo "启动成功"
fi
else
echo "已在运行"
fi
fi
}
start()
{
config_load verysync
config_foreach run_verysync setting
}
stop()
{
kill -9 `pgrep verysync`
stop=`pgrep verysync | wc -l`
if [ $stop = 0 ] ; then
echo "已停止运行"
else
echo "未停止运行"
fi
}

View File

@ -0,0 +1,12 @@
#!/bin/sh
touch /etc/config/verysync
uci -q batch <<-EOF >/dev/null
delete ucitrack.@verysync[-1]
add ucitrack verysync
set ucitrack.@verysync[-1].exec='/etc/init.d/verysync restart'
commit ucitrack
EOF
# remove LuCI cache
rm -f /tmp/luci*
exit 0

View File

@ -0,0 +1,16 @@
#
# Copyright (C) 2008-2014 The LuCI Team <luci@lists.subsignal.org>
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for Xware downloading app.
LUCI_DEPENDS:=@arm +wget
PKG_VERSION:=1.0
PKG_RELEASE:=2
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -0,0 +1,13 @@
module("luci.controller.xunlei", package.seeall)
function index()
if not nixio.fs.access("/etc/config/xunlei") then
return
end
local page
page = entry({"admin", "services", "xunlei"}, cbi("xunlei"), _("迅雷远程下载"), 199)
page.i18n = "xunlei"
page.dependent = true
end

View File

@ -0,0 +1,106 @@
local fs = require "nixio.fs"
local util = require "nixio.util"
local running=(luci.sys.call("pidof EmbedThunderManager > /dev/null") == 0)
local button=""
local xunleiinfo=""
local tblXLInfo={}
local detailInfo = "<br />启动后会看到类似如下信息:<br /><br />[ 0, 1, 1, 0, “7DHS94”,1, “201_2.1.3.121”, “shdixang”, 1 ]<br /><br />其中有用的几项为:<br /><br />第一项: 0表示返回结果成功<br /><br />第二项: 1表示检测网络正常0表示检测网络异常<br /><br />第四项: 1表示已绑定成功0表示未绑定<br /><br />第五项: 未绑定的情况下,为绑定的需要的激活码;<br /><br />第六项: 1表示磁盘挂载检测成功0表示磁盘挂载检测失败。"
if running then
xunleiinfo = luci.sys.exec("wget-ssl http://127.0.0.1:9000/getsysinfo -O - 2>/dev/null")
m = Map("xunlei", translate("Xware"), translate("<strong><font color=\"green\">迅雷远程下载 运行中</font></strong>"))
string.gsub(string.sub(xunleiinfo, 2, -2),'[^,]+',function(w) table.insert(tblXLInfo, w) end)
detailInfo = [[<p>启动信息:]] .. xunleiinfo .. [[</p>]]
if tonumber(tblXLInfo[1]) == 0 then
detailInfo = detailInfo .. [[<p>状态正常</p>]]
else
detailInfo = detailInfo .. [[<p style="color:red">执行异常</p>]]
end
if tonumber(tblXLInfo[2]) == 0 then
detailInfo = detailInfo .. [[<p style="color:red">网络异常</p>]]
else
detailInfo = detailInfo .. [[<p>网络正常</p>]]
end
if tonumber(tblXLInfo[4]) == 0 then
detailInfo = detailInfo .. [[<p>未绑定]].. [[&nbsp;&nbsp;激活码:]].. tblXLInfo[5] ..[[</p>]]
else
detailInfo = detailInfo .. [[<p>已绑定</p>]]
end
if tonumber(tblXLInfo[6]) == 0 then
detailInfo = detailInfo .. [[<p style="color:red">磁盘挂载检测失败</p>]]
else
detailInfo = detailInfo .. [[<p>磁盘挂载检测成功</p>]]
end
else
m = Map("xunlei", translate("Xware"), translate("<strong><font color=\"red\">迅雷远程下载 未运行</font></strong>"))
end
-----------
--Xware--
-----------
s = m:section(TypedSection, "xunlei","Xware 设置")
s.anonymous = true
s:tab("basic", translate("Settings"))
enable = s:taboption("basic", Flag, "enable", "启用 迅雷远程下载")
enable.rmempty = false
vod = s:taboption("basic", Flag, "vod", "删除迅雷VOD服务器", "删除迅雷VOD服务器减少上传流量。")
vod.rmempty = false
s:taboption("basic", DummyValue,"opennewwindow" ,"<br /><p align=\"justify\"><script type=\"text/javascript\"></script><input type=\"button\" class=\"cbi-button cbi-button-apply\" value=\"获取启动信息\" onclick=\"window.open('http://'+window.location.host+':9000/getsysinfo')\" /></p>", detailInfo)
s:taboption("basic", DummyValue,"opennewwindow" ,"<br /><p align=\"justify\"><script type=\"text/javascript\"></script><input type=\"button\" class=\"cbi-button cbi-button-apply\" value=\"迅雷远程下载页面\" onclick=\"window.open('http://yuancheng.xunlei.com')\" /></p>", "<br />打开迅雷远程下载页面。首次运行将激活码填进网页即可绑定。")
s:tab("editconf_etm", translate("Xware 配置"))
editconf_etm = s:taboption("editconf_etm", Value, "_editconf_etm",
translate("Xware 配置:"),
translate("注释用“ ; ”"))
editconf_etm.template = "cbi/tvalue"
editconf_etm.rows = 20
editconf_etm.wrap = "off"
function editconf_etm.cfgvalue(self, section)
return fs.readfile("/tmp/etc/etm.cfg") or ""
end
function editconf_etm.write(self, section, value2)
if value2 then
value2 = value2:gsub("\r\n?", "\n")
fs.writefile("/tmp/etm.cfg", value2)
if (luci.sys.call("cmp -s /tmp/etm.cfg /tmp/etc/etm.cfg") == 1) then
fs.writefile("/tmp/etc/etm.cfg", value2)
end
fs.remove("/tmp/etm.cfg")
end
end
s:tab("editconf_download", translate("下载配置"))
editconf_download = s:taboption("editconf_download", Value, "_editconf_download",
translate("下载配置"),
translate("注释用“ ; ”"))
editconf_download.template = "cbi/tvalue"
editconf_download.rows = 20
editconf_download.wrap = "off"
function editconf_download.cfgvalue(self, section)
return fs.readfile("/tmp/etc/download.cfg") or ""
end
function editconf_download.write(self, section, value3)
if value3 then
value3 = value3:gsub("\r\n?", "\n")
fs.writefile("/tmp/download.cfg", value3)
if (luci.sys.call("cmp -s /tmp/download.cfg /tmp/etc/download.cfg") == 1) then
fs.writefile("/tmp/etc/download.cfg", value3)
end
fs.remove("/tmp/download.cfg")
end
end
return m

View File

@ -0,0 +1,10 @@
config xunlei 'config'
option device '/mnt/sda1'
option up '0'
option xware 'Xware_mipseb_32_uclibc.tar.gz'
option url 'http://dl.lazyzhu.com/file/Thunder/Xware'
option file '/app'
option vod '1'
option enable '0'

View File

@ -0,0 +1,49 @@
#!/bin/sh /etc/rc.common
START=99
start() {
config_load "xunlei"
config_get enable config enable 0
config_get device config device
config_get up config up 0
config_get file config file
device=$(uci get xunlei.config.device)
file=$(uci get xunlei.config.file)
vod=$(uci get xunlei.config.vod)
mountpoint="`mount | grep "$device" | awk '{print $3;exit}'`"
rm -f /tmp/etc/thunder_mounts.cfg
rm -f /tmp/etc/etm.cfg
rm -f /tmp/etc/download.cfg
path1="$file/xunlei/cfg/thunder_mounts.cfg"
path2="$file/xunlei/cfg/etm.cfg"
path3="$file/xunlei/cfg/download.cfg"
[ "$up" -eq 1 ] && /etc/xware/xlup && /etc/xware/cfg
[ "$vod" -eq 1 ] && rm -f $file/xunlei/lib/vod_httpserver
[ "$vod" -eq 1 ] && rm -f $file/xunlei/vod_httpserver
[ "$enable" -eq 0 ] && exit 0
ln -s "$path1" /tmp/etc/thunder_mounts.cfg
ln -s "$path2" /tmp/etc/etm.cfg
ln -s "$path3" /tmp/etc/download.cfg
$file/xunlei/portal
sleep 3
renice -n 19 $(pidof EmbedThunderManager)
}
stop() {
file=$(uci get xunlei.config.file)
$file/xunlei/portal -s
}
restart() {
stop
sleep 1
start
}

View File

@ -0,0 +1,11 @@
#!/bin/sh
uci -q batch <<-EOF >/dev/null
delete ucitrack.@xunlei[-1]
add ucitrack xunlei
set ucitrack.@xunlei[-1].init=xunlei
commit ucitrack
EOF
rm -f /tmp/luci-indexcahe
exit 0

View File

@ -0,0 +1,18 @@
#!/bin/sh /etc/rc.common
device=$(uci get xunlei.config.device)
file=$(uci get xunlei.config.file)
mountpoint="`mount | grep "$device" | awk '{print $3;exit}'`"
[ -f "$file/xunlei/cfg/thunder_mounts.cfg" ] && cfg="$file/xunlei/cfg/thunder_mounts.cfg"
[ ! -f "$cfg" ] && {
cfg="/$file/xunlei/cfg/thunder_mounts.cfg"
cat > "$cfg" << EOF
avaliable_mount_path_pattern
{
$mountpoint
}
EOF
}

View File

@ -0,0 +1,10 @@
#!/bin/sh /etc/rc.common
VERSION=`wget -qO- http://dl.lazyzhu.com/file/Thunder/Xware/latest`
sleep 3 && killall wget
xl_configfile="/tmp/etc/xlver"
[ ! -f "$xl_configfile" ] && touch "$xl_configfile"
cat > "$xl_configfile" << EOF
$VERSION
EOF

View File

@ -0,0 +1,43 @@
#!/bin/sh /etc/rc.common
device=$(uci get xunlei.config.device)
file=$(uci get xunlei.config.file)
mountpoint="`mount | grep "$device" | awk '{print $3;exit}'`"
DIR=$file/xunlei
$DIR/portal -s
sleep 1
mkdir -p ${DIR}/cfg
cd ${DIR}
FILES=$(uci get xunlei.config.xware)
ver=$(uci get xunlei.config.ver)
url=$(uci get xunlei.config.url)
zversion=$(uci get xunlei.config.zversion)
VERSION=$(wget --no-check-certificate -O- ${url}/latest)
{
if [ "$zversion" -eq 1 ];then
wget --no-check-certificate ${url}/${ver}/${FILES}
else
wget --no-check-certificate ${url}/${VERSION}/${FILES}
fi
}
{
xl_configfile="/tmp/etc/xlver"
[ ! -f "$xl_configfile" ] && touch "$xl_configfile"
cat > "$xl_configfile" << EOF
$VERSION
EOF
}
rm -rf $DIR/portal && rm -rf $DIR/lib && tar zxvf ${FILES}
chmod +x $DIR/* && chmod +x $DIR/lib/*
rm -rf ${FILES}
rm -rf $file/xunlei/cfg/thunder_mounts.cfg>> /dev/null 2>&1
uci set xunlei.config.up=0>> /dev/null 2>&1
uci commit 2>&1 > /dev/null
vod=$(uci get xunlei.config.vod)
[ "$vod" -eq 1 ] && rm -f "$file"/xunlei/vod_httpserver
[ "$vod" -eq 1 ] && rm -f "$file"/xunlei/lib/vod_httpserver
sleep 3 && killall wget

View File

@ -0,0 +1,63 @@
#
# Copyright (C) 2017 Banglang Huang
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=pf-ring
PKG_VERSION:=7.4.0
PKG_RELEASE:=1
PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
PKG_LICENSE:=GPL-2.0-only
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ntop/PF_RING/tar.gz/$(PKG_VERSION)?
PKG_HASH:=e1c9cb44d8072854220f493c56fa5cba99a6b8336883939dc18b3e30c2954b68
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/PF_RING-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
CONFIGURE_PATH:=kernel
MAKE_PATH:=kernel
define KernelPackage/pf-ring
SUBMENU:=Network Support
TITLE:=PF_RING Kernel driver
FILES:=$(PKG_BUILD_DIR)/kernel/pf_ring.ko
AUTOLOAD:=$(call AutoLoad,90,pf_ring,1)
endef
define KernelPackage/pf-ring/description
Kernel module for libpf-ring package
endef
EXTRA_CFLAGS += \
-I$(PKG_BUILD_DIR)/kernel
MAKE_OPTS := \
ARCH="$(LINUX_KARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)/kernel" \
CFLAGS="$(TARGET_CFLAGS)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)"
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/linux
$(CP) $(PKG_INSTALL_DIR)/usr/include/linux/*.h $(1)/usr/include/linux
endef
define Build/Compile
+$(MAKE) -C "$(LINUX_DIR)" \
$(MAKE_OPTS) \
modules
endef
$(eval $(call KernelPackage,pf-ring))

View File

@ -0,0 +1,63 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=phicomm-k3screenctrl
PKG_VERSION:=1.0
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
#PKG_SOURCE_URL:=https://github.com/Hill-98/k3screenctrl
#PKG_SOURCE_VERSION:=3257090decf7de1e70ef6e7bf28d0491ffe78854
PKG_SOURCE_URL:=https://github.com/zxlhhyccc/Hill-98-k3screenctrl.git
PKG_SOURCE_VERSION:=81c1cb35022082262c28e87b5b0d7141d0d2432b
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
PKG_MAINTAINER:=Hamster Tian <haotia@gmail.com>
include $(INCLUDE_DIR)/package.mk
TARGET_CFLAGS+= -D_GNU_SOURCE
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=@TARGET_bcm53xx_DEVICE_phicomm-k3 +@BUSYBOX_CONFIG_ARPING +@KERNEL_DEVMEM +bash
TITLE:=LCD screen controller on PHICOMM K3
URL:=https://github.com/zxlhhyccc/Hill-98-k3screenctrl
endef
define Package/$(PKG_NAME)/description
K3 Screen Controller (k3screenctrl) is a program utilizing
the LCD screen on PHICOMM K3 to display some stats.
endef
define Package/$(PKG_NAME)/postinst
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
if [ -f /etc/uci-defaults/k3screenctrl ]; then
( . /etc/uci-defaults/k3screenctrl ) && \
rm -f /etc/uci-defaults/k3screenctrl
fi
rm -rf /tmp/luci-indexcache /tmp/luci-modulecache
fi
exit 0
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/lib/k3screenctrl
$(INSTALL_DIR) $(1)/lib/k3screenctrl/oui
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/k3screenctrl $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/*.sh $(1)/lib/k3screenctrl/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/oui/update_oui.sh $(1)/lib/k3screenctrl/oui/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/k3screenctrl/oui/oui.txt $(1)/lib/k3screenctrl/oui/
$(INSTALL_DATA) ./files/k3screenctrl.config $(1)/etc/config/k3screenctrl
$(INSTALL_BIN) ./files/k3screenctrl.init $(1)/etc/init.d/k3screenctrl
$(INSTALL_BIN) ./files/k3screenctrl.uci $(1)/etc/uci-defaults/k3screenctrl
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@ -0,0 +1,11 @@
config general
option screen_time '10'
option refresh_time '5'
option pawd_hide '1'
option disp_cputemp '1'
option psk_hide '1'
option cputemp '1'
option city_checkip '1'
option update_time '3600'

View File

@ -0,0 +1,27 @@
#!/bin/sh /etc/rc.common
START=99
STOP=99
SCRIPTS_BASE=/lib/k3screenctrl/
TEMP_DIR=/tmp/k3screenctrl
start() {
[ -z "$(grep "/lib/k3screenctrl/oui/update_oui.sh" /etc/crontabs/root)" ] && echo "0 6 * * * /lib/k3screenctrl/oui/update_oui.sh" >> /etc/crontabs/root
mkdir -p $TEMP_DIR
mkdir -p $TEMP_DIR/device_speed
[ -z "$(iptables --list | grep K3_SEREEN_U)" ] && iptables -N K3_SEREEN_U
[ -z "$(iptables --list | grep K3_SEREEN_D)" ] && iptables -N K3_SEREEN_D
$SCRIPTS_BASE"device_custom.sh"
$SCRIPTS_BASE"device_online.sh" &
# [ -z "$(grep "/lib/k3screenctrl/device_online.sh" /etc/crontabs/root)" ] && echo "*/5 * * * * /lib/k3screenctrl/device_online.sh" >> /etc/crontabs/root
m=$(uci get k3screenctrl.@general[0].screen_time) && [ $m -lt 10 ] && m=10
d=$(uci get k3screenctrl.@general[0].refresh_time) && [ $d -lt 2 ] && d=2
/usr/bin/k3screenctrl -m $m -d $d &
}
stop() {
killall k3screenctrl device_online.sh
kill -9 $(pidof device_online.sh) >/dev/null 2>&1
rm -rf $TEMP_DIR
}

View File

@ -0,0 +1,8 @@
#!/bin/sh
uci -q batch <<-EOF >/dev/null
delete ucitrack.@k3screenctrl[-1]
add ucitrack k3screenctrl
set ucitrack.@k3screenctrl[-1].init=k3screenctrl
commit ucitrack
EOF
exit 0

View File

@ -0,0 +1,61 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=phicommk3-screenctrl
PKG_VERSION:=1.0
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/zxlhhyccc/k3screenctrl-6.git
PKG_SOURCE_VERSION:=6bbb319f74567f58122ec14227c0147be5da4cc0
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
PKG_MAINTAINER:=Hamster Tian <haotia@gmail.com>
include $(INCLUDE_DIR)/package.mk
TARGET_CFLAGS+= -D_GNU_SOURCE
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=@TARGET_bcm53xx_DEVICE_phicomm-k3 +@BUSYBOX_CONFIG_ARPING +@KERNEL_DEVMEM +bash
TITLE:=LCD screen controller on PHICOMM K3
URL:=https://github.com/zxlhhyccc/PHICOMM-K3
endef
define Package/$(PKG_NAME)/description
K3 Screen Controller (k3screenctrl) is a program utilizing
the LCD screen on PHICOMM K3 to display some stats.
endef
define Package/$(PKG_NAME)/postinst
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
if [ -f /etc/uci-defaults/k3screenctrl ]; then
( . /etc/uci-defaults/k3screenctrl ) && \
rm -f /etc/uci-defaults/k3screenctrl
fi
rm -rf /tmp/luci-indexcache /tmp/luci-modulecache
fi
exit 0
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/lib/k3screenctrl
$(INSTALL_DIR) $(1)/lib/k3screenctrl/oui
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/k3screenctrl $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/*.sh $(1)/lib/k3screenctrl/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/oui/update_oui.sh $(1)/lib/k3screenctrl/oui/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/k3screenctrl/oui/oui.txt $(1)/lib/k3screenctrl/oui/
$(INSTALL_DATA) ./files/k3screenctrl.config $(1)/etc/config/k3screenctrl
$(INSTALL_BIN) ./files/k3screenctrl.init $(1)/etc/init.d/k3screenctrl
$(INSTALL_BIN) ./files/k3screenctrl.uci $(1)/etc/uci-defaults/k3screenctrl
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@ -0,0 +1,11 @@
config general
option screen_time '10'
option refresh_time '5'
option pawd_hide '1'
option disp_cputemp '1'
option psk_hide '1'
option cputemp '1'
option city_checkip '1'
option update_time '3600'

View File

@ -0,0 +1,20 @@
#!/bin/sh /etc/rc.common
START=99
STOP=99
SCRIPTS_BASE=/lib/k3screenctrl/
TEMP_DIR=/tmp/k3screenctrl
start() {
[ -z "$(grep "/lib/k3screenctrl/oui/update_oui.sh" /etc/crontabs/root)" ] && echo "0 6 * * * /lib/k3screenctrl/oui/update_oui.sh" >> /etc/crontabs/root
mkdir -p $TEMP_DIR
mkdir -p $TEMP_DIR/device_speed
m=$(uci get k3screenctrl.@general[0].screen_time) && [ $m -lt 10 ] && m=10
d=$(uci get k3screenctrl.@general[0].refresh_time) && [ $d -lt 2 ] && d=2
/usr/bin/k3screenctrl -m $m -d $d &
}
stop() {
killall k3screenctrl
}

View File

@ -0,0 +1,8 @@
#!/bin/sh
uci -q batch <<-EOF >/dev/null
delete ucitrack.@k3screenctrl[-1]
add ucitrack k3screenctrl
set ucitrack.@k3screenctrl[-1].init=k3screenctrl
commit ucitrack
EOF
exit 0

View File

@ -0,0 +1,6 @@
config general 'general'
option screen_time '10'
option refresh_time '2'
option psk_hide '0'
option cputemp '0'

View File

@ -0,0 +1,15 @@
#!/bin/sh /etc/rc.common
START=99
STOP=99
SCRIPTS_BASE=/lib/k3screenctrl/
start() {
[ -z "$(grep "/lib/k3screenctrl/oui/update_oui.sh" /etc/crontabs/root)" ] && echo "0 6 * * * /lib/k3screenctrl/oui/update_oui.sh" >> /etc/crontabs/root
/usr/bin/k3screenctrl &
}
stop() {
killall k3screenctrl
}

View File

@ -0,0 +1,8 @@
#!/bin/sh
uci -q batch <<-EOF >/dev/null
delete ucitrack.@k3screenctrl[-1]
add ucitrack k3screenctrl
set ucitrack.@k3screenctrl[-1].init=k3screenctrl
commit ucitrack
EOF
exit 0

View File

@ -0,0 +1,65 @@
#
# Copyright (C) 2015-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v3.
#
include $(TOPDIR)/rules.mk
ifeq ($(ARCH),x86_64)
PKG_ARCH_SYNCTHING:=amd64
endif
ifeq ($(ARCH),mipsel)
PKG_ARCH_SYNCTHING:=mipsle
endif
ifeq ($(ARCH),mips)
PKG_ARCH_SYNCTHING:=mips
endif
ifeq ($(ARCH),i386)
PKG_ARCH_SYNCTHING:=386
endif
ifeq ($(ARCH),arm)
PKG_ARCH_SYNCTHING:=arm
endif
ifeq ($(ARCH),aarch64)
PKG_ARCH_SYNCTHING:=arm64
endif
PKG_NAME:=syncthing
PKG_VERSION:=v1.2.0
PKG_RELEASE:=2
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-linux-$(PKG_ARCH_SYNCTHING)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/syncthing/syncthing/releases/download/$(PKG_VERSION)
PKG_HASH:=skip
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=net
CATEGORY:=Network
TITLE:=A continuous file synchronization program
DEPENDS:=
URL:=https://github.com/syncthing/syncthing
endef
define Package/$(PKG_NAME)/description
Syncthing is a continuous file synchronization program.
endef
define Build/Prepare
tar -xzvf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)-linux-$(PKG_ARCH_SYNCTHING)-$(PKG_VERSION)/syncthing $(1)/usr/bin/syncthing
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@ -0,0 +1,55 @@
#
# Copyright (C) 2018 OpenWrt-dist
# Copyright (C) 2018 dz
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=transmission-web-control
PKG_VERSION:=1.6.0-alpha
PKG_REV:=bade4d9
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/ronggang/transmission-web-control.git
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE:=GPLv3
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=ronggang
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/transmission-web-control
SUBMENU:=BitTorrent
SECTION:=net
CATEGORY:=Network
TITLE:=transmission-web-control
URL:=https://github.com/ronggang/transmission-web-control
DEPENDS:=
endef
define Package/$(PKG_NAME)/description
transmission-web-control
endef
define Build/Compile
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/share/transmission
$(CP) -r $(PKG_BUILD_DIR)/src $(1)/usr/share/transmission/web
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@ -0,0 +1,65 @@
#
# Copyright (C) 2015-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v3.
#
include $(TOPDIR)/rules.mk
ifeq ($(ARCH),x86_64)
PKG_ARCH_VERYSYNC:=amd64
endif
ifeq ($(ARCH),mipsel)
PKG_ARCH_VERYSYNC:=mipsle
endif
ifeq ($(ARCH),mips)
PKG_ARCH_VERYSYNC:=mips
endif
ifeq ($(ARCH),i386)
PKG_ARCH_VERYSYNC:=386
endif
ifeq ($(ARCH),arm)
PKG_ARCH_VERYSYNC:=arm
endif
ifeq ($(ARCH),aarch64)
PKG_ARCH_VERYSYNC:=arm64
endif
PKG_NAME:=verysync
PKG_VERSION:=v1.0.10
PKG_RELEASE:=2
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-linux-$(PKG_ARCH_VERYSYNC)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://releases-cdn.verysync.com/releases/$(PKG_VERSION)/
PKG_HASH:=skip
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=net
CATEGORY:=Network
TITLE:=A efficient data transmission tool
DEPENDS:=
URL:=http://www.verysync.com
endef
define Package/$(PKG_NAME)/description
Verysync is a efficient data transmission tool.
endef
define Build/Prepare
tar -xzvf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)-linux-$(PKG_ARCH_VERYSYNC)-$(PKG_VERSION)/verysync $(1)/usr/bin/verysync
endef
$(eval $(call BuildPackage,$(PKG_NAME)))