-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: GitHub Actions <[email protected]>
- Loading branch information
1 parent
5c399e5
commit 65c5685
Showing
83 changed files
with
22,538 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
# | ||
# Copyright (C) 2008-2014 The LuCI Team <[email protected]> | ||
# 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 KMS | ||
PKG_NAME:=luci-app-vlmcsd | ||
PKG_VERSION:=1.0.0 | ||
PKG_RELEASE:=1 | ||
|
||
LUCI_TITLE:=LuCI support for vlmcsd | ||
LUCI_DEPENDS:=+vlmcsd | ||
LUCI_PKGARCH:=all | ||
|
||
PKG_NAME:=luci-app-vlmcsd | ||
PKG_VERSION:=1.0 | ||
PKG_RELEASE:=7 | ||
PKG_MAINTAINER:=sbwml <[email protected]> | ||
|
||
include $(TOPDIR)/feeds/luci/luci.mk | ||
|
||
|
41 changes: 41 additions & 0 deletions
41
luci-app-vlmcsd/htdocs/luci-static/resources/view/vlmcsd/config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
'use strict'; | ||
'require form'; | ||
'require fs'; | ||
'require ui'; | ||
'require view'; | ||
|
||
return view.extend({ | ||
render: function () { | ||
var m, s, o; | ||
|
||
m = new form.Map("vlmcsd", _("Config File")); | ||
|
||
s = m.section(form.TypedSection); | ||
s.anonymous = true; | ||
s.sortable = true; | ||
|
||
o = s.option(form.TextValue, '_vlmcsd', null, _('This file is /etc/vlmcsd/vlmcsd.ini.')); | ||
o.rows = 25; | ||
o.cfgvalue = function (section_id) { | ||
return fs.trimmed('/etc/vlmcsd/vlmcsd.ini').catch(function (e) { | ||
return ""; | ||
}); | ||
}; | ||
o.write = function (section_id, formvalue) { | ||
return this.cfgvalue(section_id).then(function (value) { | ||
if (value == formvalue) { | ||
return; | ||
} | ||
return fs.write('/etc/vlmcsd/vlmcsd.ini', formvalue.trim().replace(/\r\n/g, '\n') + '\n') | ||
}); | ||
}; | ||
|
||
return m.render(); | ||
}, | ||
|
||
handleSaveApply: function (ev) { | ||
onclick = L.bind(this.handleSave, this, ev); | ||
return fs.exec('/etc/init.d/vlmcsd', ['restart']); | ||
}, | ||
handleReset: null | ||
}); |
75 changes: 75 additions & 0 deletions
75
luci-app-vlmcsd/htdocs/luci-static/resources/view/vlmcsd/vlmcsd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
'use strict'; | ||
'require form'; | ||
'require poll'; | ||
'require rpc'; | ||
'require uci'; | ||
'require view'; | ||
|
||
var callServiceList = rpc.declare({ | ||
object: 'service', | ||
method: 'list', | ||
params: ['name'], | ||
expect: { '': {} } | ||
}); | ||
|
||
function getServiceStatus() { | ||
return L.resolveDefault(callServiceList('vlmcsd'), {}).then(function (res) { | ||
var isRunning = false; | ||
try { | ||
isRunning = res['vlmcsd']['instances']['vlmcsd']['running']; | ||
} catch (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', 'VLMCSD', _('RUNNING')); | ||
} else { | ||
renderHTML = spanTemp.format('red', 'VLMCSD', _('NOT RUNNING')); | ||
} | ||
|
||
return renderHTML; | ||
} | ||
|
||
return view.extend({ | ||
render: function() { | ||
var m, s, o; | ||
|
||
m = new form.Map('vlmcsd', _('KMS Server'), | ||
_('A KMS Server Emulator to active your Windows or Office.')); | ||
|
||
s = m.section(form.TypedSection); | ||
s.anonymous = true; | ||
s.render = function () { | ||
poll.add(function () { | ||
return L.resolveDefault(getServiceStatus()).then(function (res) { | ||
var view = document.getElementById('service_status'); | ||
view.innerHTML = renderStatus(res); | ||
}); | ||
}); | ||
|
||
return E('div', { class: 'cbi-section', id: 'status_bar' }, [ | ||
E('p', { id: 'service_status' }, _('Collecting data...')) | ||
]); | ||
} | ||
|
||
s = m.section(form.NamedSection, 'config', 'vlmcsd'); | ||
|
||
o = s.option(form.Flag, 'enabled', _('Enabled')); | ||
o.default = o.disabled; | ||
o.rmempty = false; | ||
|
||
o = s.option(form.Flag, 'autoactivate', _('Auto activate')); | ||
o.default = o.disabled; | ||
o.rmempty = false; | ||
|
||
o = s.option(form.Flag, 'firewall', _('Open firewall port')); | ||
o.default = o.disabled; | ||
o.rmempty = false; | ||
|
||
return m.render(); | ||
} | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
luci-app-vlmcsd/root/usr/share/luci/menu.d/luci-app-vlmcsd.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"admin/services/vlmcsd": { | ||
"title": "KMS Server", | ||
"order": 60, | ||
"action": { | ||
"type": "firstchild" | ||
}, | ||
"depends": { | ||
"acl": [ "luci-app-vlmcsd" ], | ||
"uci": { "vlmcsd": true } | ||
} | ||
}, | ||
"admin/services/vlmcsd/vlmcsd": { | ||
"title": "Basic Setting", | ||
"order": 10, | ||
"action": { | ||
"type": "view", | ||
"path": "vlmcsd/vlmcsd" | ||
} | ||
}, | ||
"admin/services/vlmcsd/config": { | ||
"title": "Config File", | ||
"order": 20, | ||
"action": { | ||
"type": "view", | ||
"path": "vlmcsd/config" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,28 @@ | ||
include $(TOPDIR)/rules.mk | ||
|
||
PKG_NAME:=vlmcsd | ||
PKG_VERSION:=svn1113 | ||
PKG_RELEASE:=4 | ||
|
||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | ||
PKG_SOURCE_URL:=https://codeload.github.com/Wind4/vlmcsd/tar.gz/$(PKG_VERSION)? | ||
PKG_HASH:=62f55c48f5de1249c2348ab6b96dabbe7e38899230954b0c8774efb01d9c42cc | ||
|
||
PKG_LICENSE:=MIT | ||
PKG_LICENSE_FILES:=LICENSE | ||
PKG_MAINTAINER:=fuyumi <[email protected]> | ||
PKG_VERSION:=2023.7.28 | ||
PKG_RELEASE:=1 | ||
|
||
PKG_BUILD_PARALLEL:=1 | ||
PKG_MAINTAINER:=sbwml <[email protected]> | ||
|
||
include $(INCLUDE_DIR)/package.mk | ||
|
||
define Package/vlmcsd | ||
SECTION:=net | ||
CATEGORY:=Network | ||
TITLE:=vlmcsd for OpenWRT | ||
URL:=http://forums.mydigitallife.info/threads/50234 | ||
TITLE:=KMS Emulator in C | ||
URL:=https://github.com/Wind4/vlmcsd | ||
DEPENDS:=+libpthread | ||
endef | ||
|
||
define Package/vlmcsd/description | ||
vlmcsd is a KMS Emulator in C. | ||
vlmcsd is an open-source KMS (Key Management Service) server emulator that allows | ||
for the activation of Microsoft products such as Windows and Office within a local network, | ||
without needing to connect to Microsoft's official KMS servers. | ||
endef | ||
|
||
TARGET_CC:= $(filter-out ccache,$(TARGET_CC)) | ||
|
||
MAKE_FLAGS += \ | ||
-C $(PKG_BUILD_DIR) | ||
|
||
define Package/vlmcsd/install | ||
$(INSTALL_DIR) $(1)/usr/bin | ||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vlmcsd $(1)/usr/bin/vlmcsd | ||
|
Oops, something went wrong.