🌴 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

+59
View File
@@ -0,0 +1,59 @@
# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2022 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=vlmcsd
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/Wind4/vlmcsd.git
PKG_SOURCE_DATE:=2020-03-30
PKG_SOURCE_VERSION:=70e03572b254688b8c3557f898e7ebd765d29ae1
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=fuyumi <280604399@qq.com>
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/vlmcsd
SECTION:=net
CATEGORY:=Network
TITLE:=A KMS Emulator in C
URL:=https://github.com/Wind4/vlmcsd
DEPENDS:=+libpthread
USERID:=vlmcsd:vlmcsd
endef
define Package/vlmcsd/description
KMS Emulator in C (currently runs on Linux including Android, FreeBSD,
Solaris, Minix, Mac OS, iOS, Windows with or without Cygwin)
endef
define Package/vlmcsd/conffiles
/etc/config/vlmcsd
/etc/vlmcsd.ini
endef
MAKE_FLAGS += \
CC="$(TARGET_CC_NOCACHE)" \
VLMCSD_VERSION="$(PKG_VERSION)"
define Package/vlmcsd/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vlmcsd $(1)/usr/bin/vlmcsd
$(INSTALL_DIR) $(1)/etc
$(INSTALL_BIN) ./files/vlmcsd.ini $(1)/etc/vlmcsd.ini
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_BIN) ./files/vlmcsd.conf $(1)/etc/config/vlmcsd
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/vlmcsd.init $(1)/etc/init.d/vlmcsd
endef
$(eval $(call BuildPackage,vlmcsd))
+4
View File
@@ -0,0 +1,4 @@
config vlmcsd 'config'
option enabled '0'
option auto_activate '0'
option internet_access '0'
+47
View File
@@ -0,0 +1,47 @@
#ePID/HwId设置为Windows显式
;Windows = 06401-00206-471-111111-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
#ePID设置为Office2010(包含Visio和Project)显式
;Office2010 = 06401-00096-199-222222-03-1033-17763.0000-2822018
#ePID/HwId设置为Office2013(包含Visio和Project)显式
;Office2013 = 06401-00206-234-333333-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
#ePID/HwId设置为Office2016(包含Visio和Project)显式
;Office2016 = 06401-00206-437-444444-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
#ePID/HwId设置为Office2019(包含Visio和Project)显式
;Office2019 = 06401-00206-666-666666-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
#ePID/HwId设置为Windows中国政府版 (Enterprise G/GN) 显式
;WinChinaGov = 06401-03858-000-555555-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
#程序启动时随机ePIDs(只有那些未显式指定的)
;RandomizationLevel = 1
#在ePIDs中使用特定区域 (1033 = 美国英语),即使ePID是随机的
;LCID = 1033
#设置最多4个同时工作(分叉进程或线程)
;MaxWorkers = 4
#闲置30秒后断开用户
;ConnectionTimeout = 30
#每次请求后立即断开客户端
;DisconnectClientsImmediately = yes
#创建详细日志
;LogVerbose = true
#设置激活间隔2小时
;ActivationInterval = 2h
#设置更新间隔7天
;RenewalInterval = 7d
#禁用或启用RPC的NDR64传输语法(默认启用)
;UseNDR64 = true
#禁用或启用RPC的绑定时间特性协商(默认启用)
;UseBTFN = true
+75
View File
@@ -0,0 +1,75 @@
#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
DNSMASQ_UCI_CONFIG="$(uci -q show "dhcp.@dnsmasq[0]" | awk 'NR==1 {split($0, conf, /[.=]/); print conf[2]}')"
if [ -f "/tmp/etc/dnsmasq.conf.$DNSMASQ_UCI_CONFIG" ];then
DNSMASQ_VLMCSD="$(awk -F '=' '/^conf-dir=/ {print $2}' "/tmp/etc/dnsmasq.conf.$DNSMASQ_UCI_CONFIG")/dnsmasq-vlmcsd.conf"
else
DNSMASQ_VLMCSD="/tmp/dnsmasq.d/dnsmasq-vlmcsd.conf"
fi
start_service() {
local enabled auto_activate internet_access
config_load "vlmcsd"
config_get_bool enabled "config" "enabled" "0"
config_get_bool auto_activate "config" "auto_activate" "0"
config_get_bool internet_access "config" "internet_access" "0"
[ "$enabled" -eq "1" ] || return 1
if [ "$auto_activate" -eq "1" ];then
hostname="$(uci get system.@system[0].hostname)"
echo "srv-host=_vlmcs._tcp,$hostname,1688,0,100" > "$DNSMASQ_VLMCSD"
/etc/init.d/dnsmasq restart 2>"/dev/null"
fi
procd_open_instance "vlmcsd"
procd_set_param command /usr/bin/vlmcsd
procd_append_param command -D
procd_append_param command -i "/etc/vlmcsd.ini"
procd_append_param command -l syslog
procd_append_param command -L "0.0.0.0:1688"
procd_append_param command -L "[::]:1688"
procd_set_param file "/etc/vlmcsd.ini"
procd_set_param respawn
procd_set_param user vlmcsd
procd_set_param group vlmcsd
procd_add_jail vlmcsd ronly log
procd_add_jail_mount "/etc/vlmcsd.ini"
if [ "$internet_access" -eq "1" ];then
procd_open_data
json_add_array firewall
json_add_object ""
json_add_string type rule
json_add_string name "Allow-vlmcsd-tcp"
json_add_string proto "tcp"
json_add_string src "*"
json_add_string dest_port "1688"
json_add_string target "ACCEPT"
json_close_object
json_close_array
procd_close_data
fi
procd_close_instance
}
stop_service() {
rm -f "$DNSMASQ_VLMCSD"
/etc/init.d/dnsmasq restart 2>"/dev/null"
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger vlmcsd
}