diff --git a/gost/Makefile b/gost/Makefile index 419b55b01..74ff1f06b 100644 --- a/gost/Makefile +++ b/gost/Makefile @@ -5,8 +5,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gost -PKG_VERSION:=2.11.1 -PKG_RELEASE:=1 +PKG_VERSION:=2.11.2 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/ginuerzh/gost/tar.gz/v$(PKG_VERSION)? @@ -16,17 +16,12 @@ PKG_LICENSE:=MIT PKG_LICENSE_FILE:=LICENSE PKG_MAINTAINER:=Tianling Shen -PKG_CONFIG_DEPENDS:= \ - CONFIG_GOST_COMPRESS_GOPROXY \ - CONFIG_GOST_COMPRESS_UPX - PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 GO_PKG:=github.com/ginuerzh/gost GO_PKG_BUILD_PKG:=github.com/ginuerzh/gost/cmd/gost -GO_PKG_LDFLAGS:=-s -w include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk @@ -36,41 +31,11 @@ define Package/gost CATEGORY:=Network TITLE:=GO Simple Tunnel URL:=https://github.com/ginuerzh/gost - DEPENDS:=$(GO_ARCH_DEPENDS) -endef - -define Package/gost/description - A simple security tunnel written in Golang -endef - -define Package/gost/config -config GOST_COMPRESS_GOPROXY - bool "Compiling with GOPROXY proxy" - default n - -config GOST_COMPRESS_UPX - bool "Compress executable files with UPX" - depends on !mips64 - default n -endef - -ifeq ($(CONFIG_GOST_COMPRESS_GOPROXY),y) - export GO111MODULE=on - export GOPROXY=https://goproxy.bj.bcebos.com -endif - -define Build/Compile - $(call GoPackage/Build/Compile) -ifeq ($(CONFIG_GOST_COMPRESS_UPX),y) - $(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/gost -endif + DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle endef define Package/gost/install - $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) - - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gost $(1)/usr/bin/gost + $(call GoPackage/Package/Install/Bin,$(1)) $(INSTALL_DIR) $(1)/etc/config $(INSTALL_CONF) $(CURDIR)/files/gost.config $(1)/etc/config/gost diff --git a/luci-app-control-timewol/Makefile b/luci-app-control-timewol/Makefile index 52ddebc70..fbabc3126 100644 --- a/luci-app-control-timewol/Makefile +++ b/luci-app-control-timewol/Makefile @@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for Timewol From Koolshare LUCI_DEPENDS:=+etherwake LUCI_PKGARCH:=all PKG_VERSION:=1.0 -PKG_RELEASE:=3-20190309 +PKG_RELEASE:=3-20220406 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/luci-app-control-timewol/po/zh-cn/timewol.po b/luci-app-control-timewol/po/zh-cn/timewol.po index a883cf73a..2eccb1fb4 100644 --- a/luci-app-control-timewol/po/zh-cn/timewol.po +++ b/luci-app-control-timewol/po/zh-cn/timewol.po @@ -1,2 +1,11 @@ msgid "Control" msgstr "管控" + +msgid "Running Status" +msgstr "运行状态" + +msgid "NOT RUNNING" +msgstr "未运行" + +msgid "RUNNING" +msgstr "运行中" diff --git a/luci-app-control-webrestriction/Makefile b/luci-app-control-webrestriction/Makefile index f0e0c5e5b..7dc5d88c7 100644 --- a/luci-app-control-webrestriction/Makefile +++ b/luci-app-control-webrestriction/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI support for Webrestriction From Koolshare LUCI_PKGARCH:=all PKG_VERSION:=1.0 -PKG_RELEASE:=5-20200107 +PKG_RELEASE:=5-20220406 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/luci-app-control-webrestriction/po/zh-cn/webrestriction.po b/luci-app-control-webrestriction/po/zh-cn/webrestriction.po index a883cf73a..7b7f51f92 100644 --- a/luci-app-control-webrestriction/po/zh-cn/webrestriction.po +++ b/luci-app-control-webrestriction/po/zh-cn/webrestriction.po @@ -1,2 +1,14 @@ msgid "Control" msgstr "管控" + +msgid "Running Status" +msgstr "运行状态" + +msgid "NOT RUNNING" +msgstr "未运行" + +msgid "RUNNING" +msgstr "运行中" + +msgid "Blacklist" +msgstr "黑名单" diff --git a/luci-app-control-weburl/Makefile b/luci-app-control-weburl/Makefile index 1572acaef..544a04274 100644 --- a/luci-app-control-weburl/Makefile +++ b/luci-app-control-weburl/Makefile @@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for Weburl From Koolshare LUCI_DEPENDS:=+iptables-mod-filter +kmod-ipt-filter LUCI_PKGARCH:=all PKG_VERSION:=1.0 -PKG_RELEASE:=3-20190309 +PKG_RELEASE:=3-20220406 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/luci-app-control-weburl/po/zh-cn/weburl.po b/luci-app-control-weburl/po/zh-cn/weburl.po index a883cf73a..2eccb1fb4 100644 --- a/luci-app-control-weburl/po/zh-cn/weburl.po +++ b/luci-app-control-weburl/po/zh-cn/weburl.po @@ -1,2 +1,11 @@ msgid "Control" msgstr "管控" + +msgid "Running Status" +msgstr "运行状态" + +msgid "NOT RUNNING" +msgstr "未运行" + +msgid "RUNNING" +msgstr "运行中" diff --git a/luci-app-control-weburl/root/etc/init.d/weburl b/luci-app-control-weburl/root/etc/init.d/weburl index 1785abf73..16966da48 100755 --- a/luci-app-control-weburl/root/etc/init.d/weburl +++ b/luci-app-control-weburl/root/etc/init.d/weburl @@ -67,7 +67,7 @@ add_rule(){ iptables -t filter -I WEBURL $settime -m string --string "$keyword" --algo $(get_algo_mode $algos) -j DROP else iptables -t filter -I WEBURL $settime -m mac --mac-source $macaddr -m string --string "$keyword" --algo $(get_algo_mode $algos) -j DROP - unset "$macaddr" + unset macaddr fi fi done @@ -79,6 +79,7 @@ start(){ iptables -t filter -N WEBURL iptables -t filter -I FORWARD -m comment --comment "Rule For Control" -j WEBURL add_rule + iptables -t filter -I WEBURL -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT } stop(){ iptables -t filter -D FORWARD -m comment --comment "Rule For Control" -j WEBURL diff --git a/luci-app-fileassistant/Makefile b/luci-app-fileassistant/Makefile index 5c16f4306..112b1e2e0 100644 --- a/luci-app-fileassistant/Makefile +++ b/luci-app-fileassistant/Makefile @@ -6,8 +6,8 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI support for Fileassistant LUCI_PKGARCH:=all -PKG_VERSION:=1.0 -PKG_RELEASE:=2 +PKG_VERSION:=1.0-4 +PKG_RELEASE:= include $(TOPDIR)/feeds/luci/luci.mk diff --git a/luci-app-fileassistant/htdocs/luci-static/resources/fileassistant/fb.js b/luci-app-fileassistant/htdocs/luci-static/resources/fileassistant/fb.js index 2e3addef8..616919d24 100644 --- a/luci-app-fileassistant/htdocs/luci-static/resources/fileassistant/fb.js +++ b/luci-app-fileassistant/htdocs/luci-static/resources/fileassistant/fb.js @@ -91,6 +91,40 @@ String.prototype.replaceAll = function(search, replacement) { } } + function chmodPath(filename, isdir) { + var newmod = prompt('请输入新的权限位(支持八进制权限位或者a+x格式):', isdir === "1" ? "0755" : "0644"); + if (newmod) { + iwxhr.get('/cgi-bin/luci/admin/nas/fileassistant/chmod', + { + filepath: concatPath(currentPath, filename), + newmod: newmod + }, + function (x, res) { + if (res.ec === 0) { + refresh_list(res.data, currentPath); + } + } + ); + } + } + + function chownPath(filename) { + var newown = prompt('请输入新的用户名(支持用户名或用户名:群组格式):', "root"); + if (newown) { + iwxhr.get('/cgi-bin/luci/admin/nas/fileassistant/chown', + { + filepath: concatPath(currentPath, filename), + newown: newown + }, + function (x, res) { + if (res.ec === 0) { + refresh_list(res.data, currentPath); + } + } + ); + } + } + function openpath(filename, dirname) { dirname = dirname || currentPath; window.open('/cgi-bin/luci/admin/nas/fileassistant/open?path=' @@ -130,6 +164,13 @@ String.prototype.replaceAll = function(search, replacement) { else if (targetElem.className.indexOf('cbi-button-edit') > -1) { renamePath(targetElem.parentNode.parentNode.dataset['filename']); } + else if (targetElem.className.indexOf('cbi-button-chmod') > -1) { + infoElem = targetElem.parentNode.parentNode; + chmodPath(infoElem.dataset['filename'] , infoElem.dataset['isdir']); + } + else if (targetElem.className.indexOf('cbi-button-chown') > -1) { + chownPath(targetElem.parentNode.parentNode.dataset['filename']); + } else if (targetElem = getFileElem(targetElem)) { if (targetElem.className.indexOf('parent-icon') > -1) { update_list(currentPath.replace(/\/[^/]+($|\/$)/, '')); @@ -156,7 +197,14 @@ String.prototype.replaceAll = function(search, replacement) { } } function refresh_list(filenames, path) { - var listHtml = ''; + var listHtml = '
' + +'' + +'' + +'' + +'' + +'' + +'' + +''; if (path !== '/') { listHtml += ''; } @@ -196,7 +244,9 @@ String.prototype.replaceAll = function(search, replacement) { + '' + '' + ''; @@ -270,6 +320,26 @@ String.prototype.replaceAll = function(search, replacement) { } }; + document.getElementById('mkdir-toggle').onclick = function() { + var dirname = null; + if (dirname = prompt("请输入文件夹名称:")) { + var formData = new FormData(); + formData.append('path', currentPath); + formData.append('dirname', dirname); + var xhr = new XMLHttpRequest(); + xhr.open("POST", "/cgi-bin/luci/admin/nas/fileassistant/mkdir", true); + xhr.onload = function() { + if (xhr.status == 200) { + var res = JSON.parse(xhr.responseText); + refresh_list(res.data, currentPath); + } + else { + alert('创建失败,请稍后再试...'); + } + }; + xhr.send(formData); + } + }; document.addEventListener('DOMContentLoaded', function(evt) { var initPath = '/'; if (/path=([/\w]+)/.test(location.search)) { diff --git a/luci-app-fileassistant/luasrc/controller/fileassistant.lua b/luci-app-fileassistant/luasrc/controller/fileassistant.lua index 72228a19d..601ab064e 100644 --- a/luci-app-fileassistant/luasrc/controller/fileassistant.lua +++ b/luci-app-fileassistant/luasrc/controller/fileassistant.lua @@ -27,6 +27,14 @@ function index() page = entry({"admin", "nas", "fileassistant", "install"}, call("fileassistant_install"), nil) page.leaf = true + page = entry({"admin", "nas", "fileassistant", "mkdir"}, call("fileassistant_mkdir"), nil) + page.leaf = true + + page = entry({"admin", "nas", "fileassistant", "chmod"}, call("fileassistant_chmod"), nil) + page.leaf = true + + page = entry({"admin", "nas", "fileassistant", "chown"}, call("fileassistant_chown"), nil) + page.leaf = true end function list_response(path, success) @@ -133,6 +141,27 @@ function fileassistant_upload() list_response(uploaddir, true) end +function fileassistant_mkdir() + local path = luci.http.formvalue("path") + local dirname = luci.http.formvalue("dirname") + local success = os.execute('sh -c \'cd "'..path..'" && mkdir -p "'..dirname..'"\'') + list_response(path, success) +end + +function fileassistant_chmod() + local path = luci.http.formvalue("filepath") + local newmod = luci.http.formvalue("newmod") + local success = os.execute('chmod '..newmod..' "'..path..'"') + list_response(nixio.fs.dirname(path), success) +end + +function fileassistant_chown() + local path = luci.http.formvalue("filepath") + local newown = luci.http.formvalue("newown") + local success = os.execute('chown '..newown..' "'..path..'"') + list_response(nixio.fs.dirname(path), success) +end + function scandir(directory) local i, t, popen = 0, {}, io.popen diff --git a/luci-app-fileassistant/luasrc/view/fileassistant.htm b/luci-app-fileassistant/luasrc/view/fileassistant.htm index 15f069b95..3d760b40a 100644 --- a/luci-app-fileassistant/luasrc/view/fileassistant.htm +++ b/luci-app-fileassistant/luasrc/view/fileassistant.htm @@ -1,12 +1,13 @@ <%+header%> - +

文件助手

文件列表
+
@@ -15,6 +16,6 @@
- + <%+footer%> diff --git a/luci-app-timecontrol/Makefile b/luci-app-timecontrol/Makefile index fe312a6a6..a9e6d85fb 100644 --- a/luci-app-timecontrol/Makefile +++ b/luci-app-timecontrol/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI support for Time Control LUCI_PKGARCH:=all PKG_VERSION:=1.0 -PKG_RELEASE:=1-20200402 +PKG_RELEASE:=1-20220406 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/luci-app-timecontrol/po/zh-cn/timecontrol.po b/luci-app-timecontrol/po/zh-cn/timecontrol.po index fc68f6202..e80b3f7ac 100644 --- a/luci-app-timecontrol/po/zh-cn/timecontrol.po +++ b/luci-app-timecontrol/po/zh-cn/timecontrol.po @@ -39,3 +39,9 @@ msgstr "周六" msgid "Sunday" msgstr "周日" + +msgid "NOT RUNNING" +msgstr "未运行" + +msgid "RUNNING" +msgstr "运行中"
文件所有者修改时间大小权限操作
..
'+o.perms+'\ \ - ' + \ + \ + ' + install_btn + '