mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-09-10 18:34:09 +08:00
update 2026-08-26 12:33:54
This commit is contained in:
@@ -1,20 +0,0 @@
|
|||||||
#
|
|
||||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=luci-app-msd_lite
|
|
||||||
|
|
||||||
LUCI_TITLE:=LuCI app for msd_lite
|
|
||||||
LUCI_PKGARCH:=all
|
|
||||||
LUCI_DEPENDS:=+msd_lite
|
|
||||||
LUCI_DESCRIPTION:=LuCI support for msd_lite
|
|
||||||
|
|
||||||
define Package/luci-app-msd_lite/conffiles
|
|
||||||
/etc/config/msd_lite
|
|
||||||
endef
|
|
||||||
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
|
||||||
|
|
||||||
# call BuildPackage - OpenWrt buildroot signature
|
|
||||||
@@ -1,131 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
'require view';
|
|
||||||
'require fs';
|
|
||||||
'require form';
|
|
||||||
'require poll';
|
|
||||||
'require uci';
|
|
||||||
'require rpc';
|
|
||||||
'require tools.widgets as widgets';
|
|
||||||
|
|
||||||
const callServiceList = rpc.declare({
|
|
||||||
object: 'service',
|
|
||||||
method: 'list',
|
|
||||||
params: ['name'],
|
|
||||||
expect: { '': {} }
|
|
||||||
});
|
|
||||||
|
|
||||||
function getServiceStatus() {
|
|
||||||
return L.resolveDefault(callServiceList('msd_lite'), {}).then((res) => {
|
|
||||||
var isRunning = false;
|
|
||||||
try {
|
|
||||||
isRunning = res['msd_lite']?.['instances']?.['msd_lite-c']?.['running'] || false;
|
|
||||||
} catch (e) {
|
|
||||||
console.error('Error checking service status:', e);
|
|
||||||
}
|
|
||||||
return isRunning;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderStatus(isRunning) {
|
|
||||||
var spanTemp = '<em><span style="color:%s"><strong>%s %s</strong></span></em>';
|
|
||||||
var renderHTML;
|
|
||||||
if (isRunning)
|
|
||||||
renderHTML = spanTemp.format('green', _('msd_lite'), _('Running'));
|
|
||||||
else
|
|
||||||
renderHTML = spanTemp.format('red', _('msd_lite'), _('Not Running'));
|
|
||||||
|
|
||||||
return renderHTML;
|
|
||||||
}
|
|
||||||
|
|
||||||
return view.extend({
|
|
||||||
load: function () {
|
|
||||||
return Promise.all([
|
|
||||||
uci.load('msd_lite')
|
|
||||||
]);
|
|
||||||
},
|
|
||||||
|
|
||||||
render: function () {
|
|
||||||
var m, s, o;
|
|
||||||
|
|
||||||
m = new form.Map('msd_lite', _('Multi Stream daemon Lite'),
|
|
||||||
_('The lightweight version of Multi Stream daemon (msd) for organizing IPTV streaming over HTTP.'));
|
|
||||||
|
|
||||||
// Status section
|
|
||||||
s = m.section(form.TypedSection, null, _('Service Status'));
|
|
||||||
s.anonymous = true;
|
|
||||||
s.render = function () {
|
|
||||||
poll.add(function () {
|
|
||||||
return L.resolveDefault(getServiceStatus()).then((res) => {
|
|
||||||
var view = document.getElementById('service_status');
|
|
||||||
if (view) {
|
|
||||||
view.innerHTML = renderStatus(res);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, 5);
|
|
||||||
|
|
||||||
return E('div', { class: 'cbi-section', id: 'status_bar' }, [
|
|
||||||
E('p', { id: 'service_status' }, _('Collecting data...'))
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
s = m.section(form.NamedSection, 'default', 'msd_lite');
|
|
||||||
s.tab('settings', _('Basic Settings'));
|
|
||||||
|
|
||||||
o = s.taboption('settings', form.Flag, 'enabled', _('Enable'), _('Enable Msd_lite service'));
|
|
||||||
o.rmempty = false;
|
|
||||||
|
|
||||||
o = s.taboption('settings', form.DynamicList, 'address', _('Bind address'));
|
|
||||||
o.datatype = 'ipaddrport';
|
|
||||||
o.rmempty = false;
|
|
||||||
o.placeholder = '0.0.0.0:8080';
|
|
||||||
|
|
||||||
o = s.taboption('settings', widgets.NetworkSelect, 'network', _('Source interface'),
|
|
||||||
_('Used for receiving multicast.'));
|
|
||||||
o.nocreate = true;
|
|
||||||
o.optional = true;
|
|
||||||
|
|
||||||
o = s.taboption('settings', form.Value, 'threads', _('Worker threads'),
|
|
||||||
_('Set 0 or leave empty to auto detect.'));
|
|
||||||
o.datatype = 'uinteger';
|
|
||||||
o.placeholder = '0';
|
|
||||||
|
|
||||||
o = s.taboption('settings', form.Flag, 'bind_to_cpu', _('Bind threads to CPUs'));
|
|
||||||
o.default = o.disabled;
|
|
||||||
|
|
||||||
o = s.taboption('settings', form.Flag, 'drop_slow_clients', _('Disconnect slow clients'));
|
|
||||||
o.default = o.disabled;
|
|
||||||
|
|
||||||
o = s.taboption('settings', form.Value, 'precache_size', _('Pre cache size'));
|
|
||||||
o.datatype = 'uinteger';
|
|
||||||
o.placeholder = '4096';
|
|
||||||
|
|
||||||
o = s.taboption('settings', form.Value, 'ring_buffer_size', _('Ring buffer size'),
|
|
||||||
_('Stream receive ring buffer size.'));
|
|
||||||
o.datatype = 'uinteger';
|
|
||||||
o.placeholder = '1024';
|
|
||||||
|
|
||||||
o = s.taboption('settings', form.Value, 'multicast_recv_buffer_size', _('Receive buffer size'),
|
|
||||||
_('Multicast socket receive buffer size.'));
|
|
||||||
o.datatype = 'uinteger';
|
|
||||||
o.placeholder = '512';
|
|
||||||
|
|
||||||
o = s.taboption('settings', form.Value, 'multicast_recv_timeout', _('Receive timeout'),
|
|
||||||
_('Multicast receive timeout (seconds).'));
|
|
||||||
o.datatype = 'uinteger';
|
|
||||||
o.placeholder = '2';
|
|
||||||
|
|
||||||
o = s.taboption('settings', form.Value, 'rejoin_time', _('IGMP/MLD rejoin time'),
|
|
||||||
_('IGMP/MLD leave+join interval in seconds. 0 disables.'));
|
|
||||||
o.datatype = 'uinteger';
|
|
||||||
o.placeholder = '0';
|
|
||||||
|
|
||||||
o = s.taboption('settings', form.ListValue, 'loglevel', _('Log Level'),
|
|
||||||
_('Syslog severity level: 0=emerg, 7=debug'));
|
|
||||||
for (let i = 0; i <= 7; i++) {
|
|
||||||
o.value(i.toString(), i.toString());
|
|
||||||
}
|
|
||||||
o.default = '0';
|
|
||||||
|
|
||||||
return m.render();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Language: zh_Hans\n"
|
|
||||||
|
|
||||||
#: luci-app-msd-lite
|
|
||||||
msgid "Multi Stream daemon Lite"
|
|
||||||
msgstr "多流守护进程精简版"
|
|
||||||
|
|
||||||
msgid "The lightweight version of Multi Stream daemon (msd) for organizing IPTV streaming over HTTP."
|
|
||||||
msgstr "精简版 Multi Stream daemon (msd),用于通过 HTTP 组织 IPTV 流媒体传输。"
|
|
||||||
|
|
||||||
msgid "Service Status"
|
|
||||||
msgstr "服务状态"
|
|
||||||
|
|
||||||
msgid "Collecting data..."
|
|
||||||
msgstr "正在收集数据..."
|
|
||||||
|
|
||||||
msgid "msd_lite"
|
|
||||||
msgstr "msd_lite"
|
|
||||||
|
|
||||||
msgid "Running"
|
|
||||||
msgstr "运行中"
|
|
||||||
|
|
||||||
msgid "Not Running"
|
|
||||||
msgstr "未运行"
|
|
||||||
|
|
||||||
msgid "Basic Settings"
|
|
||||||
msgstr "基本设置"
|
|
||||||
|
|
||||||
msgid "Enable"
|
|
||||||
msgstr "启用"
|
|
||||||
|
|
||||||
msgid "Enable Msd_lite service"
|
|
||||||
msgstr "启用 Msd_lite 服务"
|
|
||||||
|
|
||||||
msgid "Bind address"
|
|
||||||
msgstr "绑定地址"
|
|
||||||
|
|
||||||
msgid "Source interface"
|
|
||||||
msgstr "源接口"
|
|
||||||
|
|
||||||
msgid "Used for receiving multicast."
|
|
||||||
msgstr "用于接收组播。"
|
|
||||||
|
|
||||||
msgid "Worker threads"
|
|
||||||
msgstr "工作线程数"
|
|
||||||
|
|
||||||
msgid "Set 0 or leave empty to auto detect."
|
|
||||||
msgstr "设为 0 或留空以自动检测。"
|
|
||||||
|
|
||||||
msgid "Bind threads to CPUs"
|
|
||||||
msgstr "线程绑定 CPU"
|
|
||||||
|
|
||||||
msgid "Disconnect slow clients"
|
|
||||||
msgstr "断开慢速客户端"
|
|
||||||
|
|
||||||
msgid "Pre cache size"
|
|
||||||
msgstr "预缓存大小"
|
|
||||||
|
|
||||||
msgid "Ring buffer size"
|
|
||||||
msgstr "环形缓冲区大小"
|
|
||||||
|
|
||||||
msgid "Stream receive ring buffer size."
|
|
||||||
msgstr "流接收环形缓冲区大小。"
|
|
||||||
|
|
||||||
msgid "Receive buffer size"
|
|
||||||
msgstr "接收缓冲区大小"
|
|
||||||
|
|
||||||
msgid "Multicast socket receive buffer size."
|
|
||||||
msgstr "组播套接字接收缓冲区大小。"
|
|
||||||
|
|
||||||
msgid "Receive timeout"
|
|
||||||
msgstr "接收超时"
|
|
||||||
|
|
||||||
msgid "Multicast receive timeout (seconds)."
|
|
||||||
msgstr "组播接收超时时间(秒)。"
|
|
||||||
|
|
||||||
msgid "IGMP/MLD rejoin time"
|
|
||||||
msgstr "IGMP/MLD 重入时间"
|
|
||||||
|
|
||||||
msgid "IGMP/MLD leave+join interval in seconds. 0 disables."
|
|
||||||
msgstr "IGMP/MLD 离开+加入间隔时间(秒)。0 表示禁用。"
|
|
||||||
|
|
||||||
msgid "Log Level"
|
|
||||||
msgstr "日志级别"
|
|
||||||
|
|
||||||
msgid "Syslog severity level: 0=emerg, 7=debug"
|
|
||||||
msgstr "系统日志严重级别:0=紧急,7=调试"
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
config msd_lite 'default'
|
|
||||||
option 'enabled' '0'
|
|
||||||
|
|
||||||
# Bind address
|
|
||||||
list 'address' '0.0.0.0:7088'
|
|
||||||
list 'address' '[::]:7088'
|
|
||||||
# For multicast receive
|
|
||||||
option 'network' ''
|
|
||||||
|
|
||||||
# syslog Severity level: 0=emerg - 7=debug
|
|
||||||
option loglevel '0'
|
|
||||||
|
|
||||||
# 0 = auto detect
|
|
||||||
option 'threads' '0'
|
|
||||||
# Bind threads to CPUs
|
|
||||||
option 'bind_to_cpu' '0'
|
|
||||||
|
|
||||||
# Disconnect slow clients
|
|
||||||
option 'drop_slow_clients' '0'
|
|
||||||
# Pre cache size
|
|
||||||
option 'precache_size' '4096'
|
|
||||||
# Stream receive ring buffer size
|
|
||||||
option 'ring_buffer_size' '1024'
|
|
||||||
# Multicast receive socket buffer size
|
|
||||||
option 'multicast_recv_buffer_size' '512'
|
|
||||||
# Multicast receive timeout
|
|
||||||
option 'multicast_recv_timeout' '2'
|
|
||||||
# Do IGMP/MLD leave+join every X seconds
|
|
||||||
option 'rejoin_time' '0'
|
|
||||||
|
|
||||||
@@ -1,131 +0,0 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
|
||||||
|
|
||||||
. /lib/functions/network.sh # 导入网络相关函数库
|
|
||||||
|
|
||||||
START=99 # 启动优先级
|
|
||||||
USE_PROCD=1 # 使用 procd 管理进程
|
|
||||||
|
|
||||||
NAME="msd_lite" # 服务名称
|
|
||||||
PROG="/usr/bin/$NAME" # 可执行程序路径
|
|
||||||
CONF="/etc/$NAME/$NAME.conf.sample" # 模板配置文件路径
|
|
||||||
CONFDIR="/var/run/$NAME" # 运行时生成配置文件目录
|
|
||||||
CONFIG_SECTION="default" # 使用固定配置节名称
|
|
||||||
|
|
||||||
# 添加网络触发器
|
|
||||||
add_interface_triggers() {
|
|
||||||
local enabled network
|
|
||||||
# 读取配置节中的 enabled
|
|
||||||
config_get_bool enabled "$CONFIG_SECTION" "enabled" "0"
|
|
||||||
# 读取配置节中的 network 字段
|
|
||||||
config_get network "$CONFIG_SECTION" "network"
|
|
||||||
# 如果 enabled = 1 且 network 非空,则为该 network 添加接口变更触发器
|
|
||||||
[ "$enabled" -eq 0 -o -z "$network" ] || procd_add_reload_interface_trigger "$network"
|
|
||||||
}
|
|
||||||
|
|
||||||
# 启动服务
|
|
||||||
start_service() {
|
|
||||||
local seconds="0"
|
|
||||||
local enabled address network interface
|
|
||||||
local bindlist addr bind_to_cpu drop_slow_clients
|
|
||||||
local loglevel threads precache_size ring_buffer_size
|
|
||||||
local multicast_recv_buffer_size multicast_recv_timeout rejoin_tim
|
|
||||||
|
|
||||||
config_load "$NAME"
|
|
||||||
|
|
||||||
# 检查服务是否启用
|
|
||||||
config_get_bool enabled "$CONFIG_SECTION" "enabled" "0"
|
|
||||||
[ "$enabled" -eq 1 ] || return 0
|
|
||||||
|
|
||||||
# 获取地址列表
|
|
||||||
config_get address "$CONFIG_SECTION" "address"
|
|
||||||
# 地址不能为空
|
|
||||||
[ -n "$address" ] || {
|
|
||||||
logger -p daemon.err -t "$NAME" "No bind addresses configured."
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# 获取网络接口
|
|
||||||
config_get network "$CONFIG_SECTION" "network"
|
|
||||||
# 若配置了 network,则尝试最多10秒等待对应接口上线
|
|
||||||
if [ -n "$network" ]; then
|
|
||||||
while [ "$seconds" -le 10 ]; do
|
|
||||||
network_flush_cache
|
|
||||||
network_get_device interface "$network"
|
|
||||||
[ -n "$interface" ] && break
|
|
||||||
seconds=$((seconds + 2))
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
[ -n "$interface" ] || logger -p daemon.warn -t "$NAME" "Interface for network '$network' not found after 10 seconds"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 生成绑定地址的 XML 列表
|
|
||||||
for addr in $address; do
|
|
||||||
bindlist="${bindlist:+$bindlist\\n\\t\\t\\t}<bind><address>$addr</address></bind>"
|
|
||||||
done
|
|
||||||
|
|
||||||
# 读取并转换布尔配置为 yes/no
|
|
||||||
config_get_bool bind_to_cpu "$CONFIG_SECTION" "bind_to_cpu" 0
|
|
||||||
[ "$bind_to_cpu" = "1" ] && bind_to_cpu="yes" || bind_to_cpu="no"
|
|
||||||
|
|
||||||
config_get_bool drop_slow_clients "$CONFIG_SECTION" "drop_slow_clients" 0
|
|
||||||
[ "$drop_slow_clients" = "1" ] && drop_slow_clients="yes" || drop_slow_clients="no"
|
|
||||||
|
|
||||||
# 读取其他配置参数
|
|
||||||
config_get loglevel "$CONFIG_SECTION" "loglevel" "0"
|
|
||||||
config_get threads "$CONFIG_SECTION" "threads" "0"
|
|
||||||
config_get precache_size "$CONFIG_SECTION" "precache_size" "4096"
|
|
||||||
config_get ring_buffer_size "$CONFIG_SECTION" "ring_buffer_size" "1024"
|
|
||||||
config_get multicast_recv_buffer_size "$CONFIG_SECTION" "multicast_recv_buffer_size" "512"
|
|
||||||
config_get multicast_recv_timeout "$CONFIG_SECTION" "multicast_recv_timeout" "2"
|
|
||||||
config_get rejoin_time "$CONFIG_SECTION" "rejoin_time" "0"
|
|
||||||
|
|
||||||
# 创建配置目录
|
|
||||||
mkdir -p "$CONFDIR"
|
|
||||||
# 通过模板替换生成具体的配置文件
|
|
||||||
sed -e "s,@logLevel@,$loglevel,g" \
|
|
||||||
-e "s,@threadsCountMax@,$threads,g" \
|
|
||||||
-e "s,@fBindToCPU@,$bind_to_cpu,g" \
|
|
||||||
-e "s,@bindList@,$bindlist,g" \
|
|
||||||
-e "s,@ifName@,$interface,g" \
|
|
||||||
-e "s,@fDropSlowClients@,$drop_slow_clients,g" \
|
|
||||||
-e "s,@precache@,$precache_size,g" \
|
|
||||||
-e "s,@ringBufSize@,$ring_buffer_size,g" \
|
|
||||||
-e "s,@rcvBuf@,$multicast_recv_buffer_size,g" \
|
|
||||||
-e "s,@rcvTimeout@,$multicast_recv_timeout,g" \
|
|
||||||
-e "s,@rejoinTime@,$rejoin_time,g" \
|
|
||||||
"$CONF" > "$CONFDIR/$NAME.conf"
|
|
||||||
|
|
||||||
# 使用 procd 启动服务
|
|
||||||
procd_open_instance "$NAME-c"
|
|
||||||
procd_set_param command "$PROG"
|
|
||||||
procd_append_param command -c "$CONFDIR/$NAME.conf"
|
|
||||||
|
|
||||||
procd_set_param limits core="unlimited"
|
|
||||||
procd_set_param limits nofile="1000000 1000000"
|
|
||||||
|
|
||||||
procd_set_param respawn
|
|
||||||
procd_set_param stderr 1
|
|
||||||
procd_close_instance
|
|
||||||
}
|
|
||||||
|
|
||||||
# 停止服务
|
|
||||||
stop_service() {
|
|
||||||
# 停止服务并删除配置文件
|
|
||||||
procd_kill "$NAME-c" >/dev/null 2>&1
|
|
||||||
rm -f "$CONFDIR/$NAME.conf"
|
|
||||||
}
|
|
||||||
|
|
||||||
restart() {
|
|
||||||
stop_service
|
|
||||||
start_service
|
|
||||||
}
|
|
||||||
|
|
||||||
# 添加服务触发器
|
|
||||||
service_triggers() {
|
|
||||||
# 添加配置文件变更触发器
|
|
||||||
procd_add_reload_trigger "$NAME" "/etc/init.d/$NAME" restart
|
|
||||||
|
|
||||||
# 添加网络接口触发器
|
|
||||||
config_load "$NAME"
|
|
||||||
add_interface_triggers
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"admin/services/msd_lite": {
|
|
||||||
"title": "Multi Stream daemon Lite",
|
|
||||||
"order": 91,
|
|
||||||
"action": {
|
|
||||||
"type": "view",
|
|
||||||
"path": "msd_lite"
|
|
||||||
},
|
|
||||||
"depends": {
|
|
||||||
"acl": [ "luci-app-msd_lite" ],
|
|
||||||
"fs": { "/etc/config/msd_lite": "file" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"luci-app-msd_lite": {
|
|
||||||
"description": "Grant UCI access for luci-app-msd_lite",
|
|
||||||
"read": {
|
|
||||||
"uci": [ "msd_lite" ]
|
|
||||||
},
|
|
||||||
"write": {
|
|
||||||
"uci": [ "msd_lite" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -12,7 +12,7 @@ LUCI_DEPENDS:=+curl +tar +libuci-lua +mount-utils +luci-lib-taskd
|
|||||||
LUCI_EXTRA_DEPENDS:=luci-lib-taskd (>=1.0.19)
|
LUCI_EXTRA_DEPENDS:=luci-lib-taskd (>=1.0.19)
|
||||||
LUCI_PKGARCH:=all
|
LUCI_PKGARCH:=all
|
||||||
|
|
||||||
PKG_VERSION:=0.2.0-r3
|
PKG_VERSION:=0.2.1-r1
|
||||||
# PKG_RELEASE MUST be empty for luci.mk
|
# PKG_RELEASE MUST be empty for luci.mk
|
||||||
PKG_RELEASE:=
|
PKG_RELEASE:=
|
||||||
|
|
||||||
|
|||||||
@@ -435,6 +435,7 @@ fi
|
|||||||
unrun() {
|
unrun() {
|
||||||
local id="$1"
|
local id="$1"
|
||||||
[ -s "/usr/share/istore/run-records/$id.txt" ] || { echo "record not found: $id" >&2; return 1; }
|
[ -s "/usr/share/istore/run-records/$id.txt" ] || { echo "record not found: $id" >&2; return 1; }
|
||||||
|
mkdir -p /tmp/is-root/tmp
|
||||||
echo "The following packages will be removed:"
|
echo "The following packages will be removed:"
|
||||||
tail -n +2 "/usr/share/istore/run-records/$id.txt" > "/tmp/is-root/tmp/to_unrun_$id.txt"
|
tail -n +2 "/usr/share/istore/run-records/$id.txt" > "/tmp/is-root/tmp/to_unrun_$id.txt"
|
||||||
cat "/tmp/is-root/tmp/to_unrun_$id.txt"
|
cat "/tmp/is-root/tmp/to_unrun_$id.txt"
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
LUCI_TITLE:=LuCI support for UUgamebooster
|
|
||||||
LUCI_DEPENDS:=+uugamebooster
|
|
||||||
LUCI_PKGARCH:=all
|
|
||||||
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
|
||||||
|
|
||||||
# call BuildPackage - OpenWrt buildroot signature
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
'require form';
|
|
||||||
'require view';
|
|
||||||
'require poll';
|
|
||||||
'require ui';
|
|
||||||
'require rpc';
|
|
||||||
|
|
||||||
var callServiceList = rpc.declare({
|
|
||||||
object: 'service',
|
|
||||||
method: 'list',
|
|
||||||
params: ['name'],
|
|
||||||
expect: { '': {} }
|
|
||||||
});
|
|
||||||
|
|
||||||
function getServiceStatus() {
|
|
||||||
return L.resolveDefault(callServiceList('uugamebooster'), {}).then(function(res) {
|
|
||||||
var instances = res['uugamebooster'] && res['uugamebooster']['instances'];
|
|
||||||
if (instances) {
|
|
||||||
for (var key in instances) {
|
|
||||||
if (instances[key] && instances[key].running)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return view.extend({
|
|
||||||
render: function() {
|
|
||||||
var m, s, o;
|
|
||||||
|
|
||||||
m = new form.Map('uugamebooster', _('UU Game Accelerator'), _('A Paid Game Acceleration service'));
|
|
||||||
|
|
||||||
s = m.section(form.GridSection, '_status', _('Status'));
|
|
||||||
s.render = function() {
|
|
||||||
return E('div', { class: 'cbi-section' }, [
|
|
||||||
E('p', { id: 'uugamebooster_status' }, _('Collecting data...'))
|
|
||||||
]);
|
|
||||||
};
|
|
||||||
|
|
||||||
s = m.section(form.TypedSection, 'uugamebooster', _('Settings'));
|
|
||||||
s.anonymous = true;
|
|
||||||
s.addremove = false;
|
|
||||||
|
|
||||||
o = s.option(form.Flag, 'enabled', _('Enable'));
|
|
||||||
o.default = '0';
|
|
||||||
o.rmempty = false;
|
|
||||||
|
|
||||||
s = m.section(form.GridSection, '_qrcode', _('QR Code'));
|
|
||||||
s.render = function() {
|
|
||||||
return E('div', { class: 'cbi-section' }, [
|
|
||||||
E('p', { id: 'uugamebooster_qcode' }, [
|
|
||||||
E('img', { src: '/uugamebooster/uuios.png', height: '300' }),
|
|
||||||
E('img', { src: '/uugamebooster/uuandriod.png', height: '300' })
|
|
||||||
])
|
|
||||||
]);
|
|
||||||
};
|
|
||||||
|
|
||||||
poll.add(function() {
|
|
||||||
return getServiceStatus().then(function(running) {
|
|
||||||
var node = document.getElementById('uugamebooster_status');
|
|
||||||
if (node) {
|
|
||||||
if (running) {
|
|
||||||
node.innerHTML = '<em><b><font color="green">UU GameAcc ' + _('RUNNING') + '</font></b></em>';
|
|
||||||
} else {
|
|
||||||
node.innerHTML = '<em><b><font color="red">UU GameAcc ' + _('NOT RUNNING') + '</font></b></em>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, 3);
|
|
||||||
|
|
||||||
return m.render();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
||||||
"Language: zh_Hans\n"
|
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/uugamebooster.js:24
|
|
||||||
msgid "Enable"
|
|
||||||
msgstr "启用"
|
|
||||||
|
|
||||||
#: root/usr/share/luci/menu.d/luci-app-uugamebooster.json:3
|
|
||||||
msgid "UU GameAcc"
|
|
||||||
msgstr "UU游戏加速器"
|
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/uugamebooster.js:11
|
|
||||||
msgid "UU Game Accelerator"
|
|
||||||
msgstr "UU游戏加速器"
|
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/uugamebooster.js:11
|
|
||||||
msgid "A Paid Game Acceleration service"
|
|
||||||
msgstr "一个付费主机游戏加速器 (开启服务后,使用手机APP绑定路由器并指定加速主机)"
|
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/uugamebooster.js:13
|
|
||||||
msgid "Status"
|
|
||||||
msgstr "状态"
|
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/uugamebooster.js:16
|
|
||||||
msgid "Collecting data..."
|
|
||||||
msgstr "正在收集数据..."
|
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/uugamebooster.js:20
|
|
||||||
msgid "Settings"
|
|
||||||
msgstr "设置"
|
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/uugamebooster.js:28
|
|
||||||
msgid "QR Code"
|
|
||||||
msgstr "二维码"
|
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/uugamebooster.js:44
|
|
||||||
msgid "RUNNING"
|
|
||||||
msgstr "运行中"
|
|
||||||
|
|
||||||
#: htdocs/luci-static/resources/view/uugamebooster.js:46
|
|
||||||
msgid "NOT RUNNING"
|
|
||||||
msgstr "未运行"
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"admin/services/uugamebooster": {
|
|
||||||
"title": "UU GameAcc",
|
|
||||||
"action": {
|
|
||||||
"type": "view",
|
|
||||||
"path": "uugamebooster"
|
|
||||||
},
|
|
||||||
"depends": {
|
|
||||||
"acl": [ "luci-app-uugamebooster" ],
|
|
||||||
"uci": { "uugamebooster": true }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"luci-app-uugamebooster": {
|
|
||||||
"description": "Grant UCI access for luci-app-uugamebooster",
|
|
||||||
"read": {
|
|
||||||
"uci": [ "uugamebooster" ],
|
|
||||||
"ubus": {
|
|
||||||
"service": [ "list" ]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"write": {
|
|
||||||
"uci": [ "uugamebooster" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 75 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.1 KiB |
@@ -1,50 +0,0 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-only
|
|
||||||
#
|
|
||||||
# Copyright (C) 2022 ImmortalWrt.org
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=msd_lite
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
|
||||||
PKG_SOURCE_URL:=https://github.com/rozhuk-im/msd_lite.git
|
|
||||||
PKG_SOURCE_DATE:=2025-09-11
|
|
||||||
PKG_SOURCE_VERSION:=79a6c62c8fced6128a5e445ee110709b3b51bb78
|
|
||||||
PKG_MIRROR_HASH:=2081142af8a4d697032ef00e75c9537b54a1a45fccbdd935bce5752c6d0eb00b
|
|
||||||
|
|
||||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immrotalwrt.org>
|
|
||||||
PKG_LICENSE:=BSD-2-Clause
|
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
include $(INCLUDE_DIR)/cmake.mk
|
|
||||||
|
|
||||||
define Package/msd_lite
|
|
||||||
SECTION:=net
|
|
||||||
CATEGORY:=Network
|
|
||||||
TITLE:=Program for IP TV streaming on the network via HTTP
|
|
||||||
URL:=http://www.netlab.linkpc.net/wiki/ru:software:msd:lite
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/msd_lite/description
|
|
||||||
msd_lite - Multi stream daemon lite. The lightweight version of
|
|
||||||
Multi Stream daemon (msd) Program for organizing IP TV streaming
|
|
||||||
on the network via HTTP.
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/msd_lite/conffiles
|
|
||||||
/etc/config/msd_lite
|
|
||||||
endef
|
|
||||||
|
|
||||||
CMAKE_OPTIONS+= -DCONFDIR=../etc/msd_lite
|
|
||||||
|
|
||||||
define Package/msd_lite/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/msd_lite $(1)/usr/bin/
|
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/etc/msd_lite
|
|
||||||
$(CP) $(CURDIR)/files/msd_lite.sample $(1)/etc/msd_lite/msd_lite.conf.sample
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,msd_lite))
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Sizes in kb, time in seconds
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
<skt> <rcvLoWatermark>XXXX</rcvLoWatermark> - DOES NOT WORK on Linux!
|
|
||||||
man socket(7):
|
|
||||||
...
|
|
||||||
The select(2) and poll(2) system calls currently do not respect the SO_RCVLOWAT
|
|
||||||
setting on Linux, and mark a socket readable when even a single byte of data is
|
|
||||||
available.
|
|
||||||
...
|
|
||||||
-->
|
|
||||||
<msd>
|
|
||||||
<log>
|
|
||||||
<!-- syslog Severity level: 0=emerg - 7=debug. -->
|
|
||||||
<level>@logLevel@</level>
|
|
||||||
</log>
|
|
||||||
<threadPool>
|
|
||||||
<threadsCountMax>@threadsCountMax@</threadsCountMax>
|
|
||||||
<!-- 0 = auto -->
|
|
||||||
<fBindToCPU>@fBindToCPU@</fBindToCPU>
|
|
||||||
<!-- Bind threads to CPUs. -->
|
|
||||||
<fCacheGetTimeSyscall>yes</fCacheGetTimeSyscall>
|
|
||||||
<!-- Cache gettime() syscalls.. -->
|
|
||||||
<timerGranularity>100</timerGranularity>
|
|
||||||
<!-- 1/1000 sec -->
|
|
||||||
</threadPool>
|
|
||||||
<!-- HTTP server -->
|
|
||||||
<HTTP>
|
|
||||||
<bindList>
|
|
||||||
@bindList@
|
|
||||||
</bindList>
|
|
||||||
<hostnameList>
|
|
||||||
<!-- Host names for all bindings. -->
|
|
||||||
<hostname>*</hostname>
|
|
||||||
</hostnameList>
|
|
||||||
</HTTP>
|
|
||||||
<hubProfileList>
|
|
||||||
<!-- Stream hub profiles templates. -->
|
|
||||||
<hubProfile>
|
|
||||||
<fDropSlowClients>@fDropSlowClients@</fDropSlowClients>
|
|
||||||
<!-- Disconnect slow clients. -->
|
|
||||||
<fSocketHalfClosed>no</fSocketHalfClosed>
|
|
||||||
<!-- Enable shutdown(SHUT_RD) for clients. -->
|
|
||||||
<fSocketTCPNoDelay>yes</fSocketTCPNoDelay>
|
|
||||||
<!-- Enable TCP_NODELAY for clients. -->
|
|
||||||
<fSocketTCPNoPush>yes</fSocketTCPNoPush>
|
|
||||||
<!-- Enable TCP_NOPUSH / TCP_CORK for clients. -->
|
|
||||||
<precache>@precache@</precache>
|
|
||||||
<!-- Pre cache size. Can be overwritten by arg from user request. -->
|
|
||||||
<ringBufSize>@ringBufSize@</ringBufSize>
|
|
||||||
<!-- Stream receive ring buffer size. Must be multiple of sndBlockSize. -->
|
|
||||||
<skt>
|
|
||||||
<sndBuf>512</sndBuf>
|
|
||||||
<!-- Max send block size, apply to clients sockets only, must be > sndBlockSize. -->
|
|
||||||
<sndLoWatermark>64</sndLoWatermark>
|
|
||||||
<!-- Send block size. Must be multiple of 4. -->
|
|
||||||
<!-- <congestionControl>htcp</congestionControl> -->
|
|
||||||
<!-- TCP_CONGESTION: this value replace/overwrite(!) all others cc settings: cc from http req args, http server settings, OS default -->
|
|
||||||
</skt>
|
|
||||||
<headersList>
|
|
||||||
<!-- Custom HTTP headers (sended before stream). -->
|
|
||||||
<header>Pragma: no-cache</header>
|
|
||||||
<header>Content-Type: video/mpeg</header>
|
|
||||||
<header>ContentFeatures.DLNA.ORG: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000</header>
|
|
||||||
<header>TransferMode.DLNA.ORG: Streaming</header>
|
|
||||||
</headersList>
|
|
||||||
</hubProfile>
|
|
||||||
</hubProfileList>
|
|
||||||
<sourceProfileList>
|
|
||||||
<!-- Stream source profiles templates. -->
|
|
||||||
<sourceProfile>
|
|
||||||
<skt>
|
|
||||||
<rcvBuf>@rcvBuf@</rcvBuf>
|
|
||||||
<!-- Multicast recv socket buf size. -->
|
|
||||||
<rcvLoWatermark>48</rcvLoWatermark>
|
|
||||||
<!-- Actual cli_snd_block_min if polling is off. -->
|
|
||||||
<rcvTimeout>@rcvTimeout@</rcvTimeout>
|
|
||||||
<!-- STATUS, Multicast recv timeout. -->
|
|
||||||
</skt>
|
|
||||||
<multicast>
|
|
||||||
<!-- For: multicast-udp and multicast-udp-rtp. -->
|
|
||||||
<ifName>@ifName@</ifName>
|
|
||||||
<rejoinTime>@rejoinTime@</rejoinTime> <!-- Do IGMP/MLD leave+join every X seconds. -->
|
|
||||||
<!-- For multicast receive. -->
|
|
||||||
</multicast>
|
|
||||||
</sourceProfile>
|
|
||||||
</sourceProfileList>
|
|
||||||
</msd>
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-only
|
|
||||||
#
|
|
||||||
# Copyright (C) 2021 ImmortalWrt.org
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=uugamebooster
|
|
||||||
PKG_VERSION:=14.0.6
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(ARCH).tar.gz
|
|
||||||
PKG_SOURCE_URL:=https://uurouter.gdl.netease.com/uuplugin/openwrt-$(ARCH)/v$(PKG_VERSION)/uu.tar.gz?
|
|
||||||
ifeq ($(ARCH),aarch64)
|
|
||||||
PKG_HASH:=4fe6fcad525c525ad530af69f102d90c1189330e4e3c3183b577ddde27731e2a
|
|
||||||
else ifeq ($(ARCH),arm)
|
|
||||||
PKG_HASH:=e8693a284d0a9445e73f8d2e9c3d330364cc6371d63c19da03f8e8c47f076caf
|
|
||||||
else ifeq ($(ARCH),mipsel)
|
|
||||||
PKG_HASH:=6fd2497bfdcf228de050119f7f593547a0da3eca9c50baa6bf8d5da6e366c575
|
|
||||||
else ifeq ($(ARCH),x86_64)
|
|
||||||
PKG_HASH:=1becd5ef81d257b22002f208cd303b04e421c7da4231523b7d82da2c7193b57f
|
|
||||||
endif
|
|
||||||
|
|
||||||
PKG_LICENSE:=Proprietary
|
|
||||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
STRIP:=true
|
|
||||||
|
|
||||||
TAR_CMD=$(HOST_TAR) -C $(1)/ $(TAR_OPTIONS)
|
|
||||||
|
|
||||||
define Package/uugamebooster
|
|
||||||
SECTION:=net
|
|
||||||
CATEGORY:=Network
|
|
||||||
DEPENDS:=@(aarch64||arm||mipsel||x86_64) +kmod-tun
|
|
||||||
TITLE:=NetEase UU Game Booster
|
|
||||||
URL:=https://uu.163.com
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/uugamebooster/description
|
|
||||||
NetEase's UU Game Booster Accelerates Triple-A Gameplay and Market.
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/uugamebooster/conffiles
|
|
||||||
/.uuplugin_uuid
|
|
||||||
/usr/share/uugamebooster/uu.conf
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/uugamebooster/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uuplugin $(1)/usr/bin/uugamebooster
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/xtables-nft-multi $(1)/usr/bin/xtables-nft-multi
|
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/usr/share/uugamebooster
|
|
||||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/uu.conf $(1)/usr/share/uugamebooster/uu.conf
|
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
|
|
||||||
$(INSTALL_CONF) $(CURDIR)/files/uugamebooster.config $(1)/etc/config/uugamebooster
|
|
||||||
$(INSTALL_BIN) $(CURDIR)/files/uugamebooster.init $(1)/etc/init.d/uugamebooster
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,uugamebooster))
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
|
|
||||||
config uugamebooster 'config'
|
|
||||||
option enabled '0'
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
|
||||||
# Copyright (C) 2021 Tianling Shen <cnsztl@immortalwrt.org>
|
|
||||||
|
|
||||||
USE_PROCD=1
|
|
||||||
START=99
|
|
||||||
|
|
||||||
CONF="uugamebooster"
|
|
||||||
PROG="/usr/bin/uugamebooster"
|
|
||||||
|
|
||||||
UU_CONF="/usr/share/uugamebooster/uu.conf"
|
|
||||||
|
|
||||||
start_service() {
|
|
||||||
config_load "$CONF"
|
|
||||||
local enabled
|
|
||||||
config_get_bool enabled "config" "enabled" "0"
|
|
||||||
[ "$enabled" -eq "1" ] || return 1
|
|
||||||
|
|
||||||
procd_open_instance "$CONF"
|
|
||||||
|
|
||||||
procd_set_param command "$PROG" "$UU_CONF"
|
|
||||||
|
|
||||||
procd_set_param limits core="unlimited"
|
|
||||||
procd_set_param respawn
|
|
||||||
procd_set_param stdout 1
|
|
||||||
procd_set_param stderr 1
|
|
||||||
|
|
||||||
procd_close_instance
|
|
||||||
}
|
|
||||||
|
|
||||||
reload_service() {
|
|
||||||
stop
|
|
||||||
start
|
|
||||||
}
|
|
||||||
|
|
||||||
service_triggers() {
|
|
||||||
procd_add_reload_trigger "$CONF"
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-only
|
|
||||||
#
|
|
||||||
# Copyright (C) 2021 ImmortalWrt.org
|
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
export CURDIR="$(cd "$(dirname $0)"; pwd)"
|
|
||||||
|
|
||||||
VERSION="$(curl -fsSL "https://router.uu.163.com/api/plugin?type=openwrt-aarch64" | jq -r ".url" | awk -F '/' '{print $6}' | tr -d 'v')" || exit 1
|
|
||||||
PKG_VERSION="$(awk -F "PKG_VERSION:=" '{print $2}' "$CURDIR/Makefile" | xargs)"
|
|
||||||
[ "$PKG_VERSION" != "$VERSION" ] || exit 0
|
|
||||||
|
|
||||||
for ARCH in "aarch64" "arm" "mipsel" "x86_64"; do
|
|
||||||
FILE_INFO="$(curl -fsSL "https://router.uu.163.com/api/plugin?type=openwrt-$ARCH")"
|
|
||||||
FILE_MD5="$(echo "$FILE_INFO" | jq -r ".md5")"
|
|
||||||
FILE_VER="$(echo "$FILE_INFO" | jq -r ".url" | awk -F '/' '{print $6}' | tr -d 'v')"
|
|
||||||
if [ "$FILE_VER" != "$VERSION" ]; then
|
|
||||||
echo -e "Version mismatch. Expected version: $VERSION, got $FILE_VER."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
curl -fsSL "http://uurouter.gdl04.netease.com/uuplugin/openwrt-$ARCH/v$VERSION/uu.tar.gz" -o "$CURDIR/uu-$ARCH.tar.gz"
|
|
||||||
ACTUAL_MD5="$(md5sum "$CURDIR/uu-$ARCH.tar.gz" | awk '{print $1}')"
|
|
||||||
if [ "$ACTUAL_MD5" != "$FILE_MD5" ]; then
|
|
||||||
echo -e "HASH mismatch. Expected md5: $FILE_MD5, got $ACTUAL_MD5."
|
|
||||||
else
|
|
||||||
FILE_HASH="$(sha256sum "$CURDIR/uu-$ARCH.tar.gz" | awk '{print $1}')"
|
|
||||||
HASH_LINE="$(($(sed -n -e "/(\$(ARCH),$ARCH)/=" "$CURDIR/Makefile") + 1))"
|
|
||||||
sed -i "${HASH_LINE}s/PKG_HASH:=.*/PKG_HASH:=$FILE_HASH/" "$CURDIR/Makefile"
|
|
||||||
fi
|
|
||||||
rm -f "$CURDIR/uu-$ARCH.tar.gz"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
sed -i "s,PKG_VERSION:=.*,PKG_VERSION:=$VERSION,g" "$CURDIR/Makefile"
|
|
||||||
Reference in New Issue
Block a user