update 04-07 23:41

This commit is contained in:
github-actions[bot] 2022-04-07 23:41:34 +08:00
parent 60b0cfa48f
commit 02d539a3dd
14 changed files with 152 additions and 50 deletions

View File

@ -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 <cnsztl@immortalwrt.org>
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

View File

@ -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

View File

@ -1,2 +1,11 @@
msgid "Control"
msgstr "管控"
msgid "Running Status"
msgstr "运行状态"
msgid "NOT RUNNING"
msgstr "未运行"
msgid "RUNNING"
msgstr "运行中"

View File

@ -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

View File

@ -1,2 +1,14 @@
msgid "Control"
msgstr "管控"
msgid "Running Status"
msgstr "运行状态"
msgid "NOT RUNNING"
msgstr "未运行"
msgid "RUNNING"
msgstr "运行中"
msgid "Blacklist"
msgstr "黑名单"

View File

@ -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

View File

@ -1,2 +1,11 @@
msgid "Control"
msgstr "管控"
msgid "Running Status"
msgstr "运行状态"
msgid "NOT RUNNING"
msgstr "未运行"
msgid "RUNNING"
msgstr "运行中"

View File

@ -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

View File

@ -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

View File

@ -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 = '<table class="cbi-section-table"><tbody>';
var listHtml = '<table class="cbi-section-table"><thead><tr class="cbi-section-table-row cbi-rowstyle-2">'
+'<td class="cbi-value-field">文件</td>'
+'<td class="cbi-value-field">所有者</td>'
+'<td class="cbi-value-field">修改时间</td>'
+'<td class="cbi-value-field">大小</td>'
+'<td class="cbi-value-field">权限</td>'
+'<td class="cbi-section-table-cell">操作</td>'
+'</tr></thead><tbody>';
if (path !== '/') {
listHtml += '<tr class="cbi-section-table-row cbi-rowstyle-2"><td class="parent-icon" colspan="6"><strong>..</strong></td></tr>';
}
@ -196,7 +244,9 @@ String.prototype.replaceAll = function(search, replacement) {
+ '<td class="cbi-value-field cbi-value-perm">'+o.perms+'</td>'
+ '<td class="cbi-section-table-cell">\
<button class="cbi-button cbi-button-edit">重命名</button>\
<button class="cbi-button cbi-button-remove">删除</button>'
<button class="cbi-button cbi-button-remove">删除</button>\
<button class="cbi-button cbi-button-apply cbi-button-chmod">改权限</button>\
<button class="cbi-button cbi-button-apply cbi-button-chown">改用户</button>'
+ install_btn
+ '</td>'
+ '</tr>';
@ -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)) {

View File

@ -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

View File

@ -1,12 +1,13 @@
<%+header%>
<link rel="stylesheet" href="/luci-static/resources/fileassistant/fb.css?v=@ver">
<link rel="stylesheet" href="/luci-static/resources/fileassistant/fb.css<%# ?v=PKG_VERSION %>">
<h2 name="content">文件助手</h2>
<fieldset class="cbi-section fb-container">
<input id="current-path" type="text" class="current-path cbi-input-text" value="/"/>
<div class="panel-container">
<div class="panel-title">文件列表</div>
<button id="upload-toggle" class="upload-toggle cbi-button cbi-button-edit">上传</button>
<button id="mkdir-toggle" class="upload-toggle cbi-button cbi-button-edit">新建文件夹&hellip; </button>
</div>
<div class="upload-container" id="upload-container">
<input id="upload-file" name="upload-file" class="upload-file" type="file">
@ -15,6 +16,6 @@
<div id="list-content"></div>
</fieldset>
<script src="/luci-static/resources/fileassistant/fb.js?v=@ver"></script>
<script src="/luci-static/resources/fileassistant/fb.js<%# ?v=PKG_VERSION %>"></script>
<%+footer%>

View File

@ -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

View File

@ -39,3 +39,9 @@ msgstr "周六"
msgid "Sunday"
msgstr "周日"
msgid "NOT RUNNING"
msgstr "未运行"
msgid "RUNNING"
msgstr "运行中"