🌴 Sync 2026-03-05 23:51:42

This commit is contained in:
github-actions[bot] committed 2026-03-05 23:51:42 +08:00
1 parent 97c049ed0a
commit 0acff03804
14253 files changed
+3893239

No files matched your search

+56
View File
@@ -0,0 +1,56 @@
#
# Copyright (C) 2015-2016 OpenWrt.org
# Copyright (C) 2020 jjm2473@gmail.com
#
# This is free software, licensed under the GNU General Public License v3.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=xunyou
PKG_VERSION:=2.0.8.9
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)_v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://partnerdownload.xunyou.com/routerplugin/koolshare/
PKG_HASH:=skip
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_v$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
TITLE:=xunyou
endef
define Package/$(PKG_NAME)/description
xunyou
endef
define Package/$(PKG_NAME)/conffiles
/etc/config/xunyou
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1) $(1)/etc/config $(1)/etc/init.d $(1)/etc/uci-defaults
$(CP) $(PKG_BUILD_DIR)/common/. $(1)/
$(CP) $(PKG_BUILD_DIR)/$(ARCH)/. $(1)/
$(INSTALL_CONF) ./files/xunyou.config $(1)/etc/config/xunyou
$(INSTALL_BIN) ./files/xunyou.init $(1)/etc/init.d/xunyou
$(INSTALL_BIN) ./files/xunyou.uci-default $(1)/etc/uci-defaults/xunyou
endef
$(eval $(call BuildPackage,xunyou))
+3
View File
@@ -0,0 +1,3 @@
config xunyou
option 'enabled' '0'
option 'interface' 'lan'
+40
View File
@@ -0,0 +1,40 @@
#!/bin/sh /etc/rc.common
START=99
STOP=10
USE_PROCD=1
PROG="/xunyou/xunyou_daemon.sh"
get_config() {
config_get_bool enabled $1 enabled 1
config_get XUNYOU_IFACE "$1" interface "lan"
}
get_interface() {
network_get_device ifname "$1" || ifname="br-lan"
}
start_service() {
config_load xunyou
config_foreach get_config xunyou
if [ $enabled == 1 ]; then
local interface=$(
. /lib/functions/network.sh
network_is_up "$XUNYOU_IFACE" || exit 0
network_get_device device "$XUNYOU_IFACE"
printf "%s" "${device}"
)
[ -z "$interface" ] && interface=br-lan
procd_open_instance
procd_set_param command "$PROG" restart -i "$interface"
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
else
sh /xunyou/xunyou_daemon.sh stop >/dev/null 2>&1
fi
}
service_triggers() {
procd_add_reload_trigger "xunyou"
}
+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
[ ! -f "/usr/share/ucitrack/luci-app-xunyou.json" ] && {
cat > /usr/share/ucitrack/luci-app-xunyou.json << EEOF
{
"config": "xunyou",
"init": "xunyou"
}
EEOF
}
uci -q batch <<-EOF >/dev/null
delete ucitrack.@xunyou[-1]
add ucitrack xunyou
set ucitrack.@xunyou[-1].init=xunyou
commit ucitrack
EOF
exit 0