update 2024-03-02 16:39:55

This commit is contained in:
github-actions[bot] 2024-03-02 16:39:55 +08:00
parent 81fc594595
commit 5276c88dc6
9 changed files with 42 additions and 39 deletions

View File

@ -53,7 +53,7 @@ get_adlist() (
) )
adlist_update() { adlist_update() {
[ "$(uci -q get mosdns.config.adblock)" != 1 ] && exit 0 [ "$(uci -q get mosdns.config.adblock)" != 1 ] && return 0
lock_file=/var/lock/mosdns_ad_update.lock lock_file=/var/lock/mosdns_ad_update.lock
ad_source=$(uci -q get mosdns.config.ad_source) ad_source=$(uci -q get mosdns.config.ad_source)
AD_TMPDIR=$(mktemp -d) || exit 1 AD_TMPDIR=$(mktemp -d) || exit 1

View File

@ -142,7 +142,7 @@ o:depends({ [option_name("tls")] = true })
o = s:option(Value, option_name("reality_private_key"), translate("Private Key")) o = s:option(Value, option_name("reality_private_key"), translate("Private Key"))
o:depends({ [option_name("reality")] = true }) o:depends({ [option_name("reality")] = true })
o = s:option(Value, option_name("reality_shortId"), translate("Short Id")) o = s:option(DynamicList, option_name("reality_shortId"), translate("Short Id"))
o:depends({ [option_name("reality")] = true }) o:depends({ [option_name("reality")] = true })
o = s:option(Value, option_name("reality_dest"), translate("Dest")) o = s:option(Value, option_name("reality_dest"), translate("Dest"))
@ -300,8 +300,7 @@ o = s:option(Value, option_name("grpc_serviceName"), "ServiceName")
o:depends({ [option_name("transport")] = "grpc" }) o:depends({ [option_name("transport")] = "grpc" })
o = s:option(Flag, option_name("acceptProxyProtocol"), translate("acceptProxyProtocol"), translate("Whether to receive PROXY protocol, when this node want to be fallback or forwarded by proxy, it must be enable, otherwise it cannot be used.")) o = s:option(Flag, option_name("acceptProxyProtocol"), translate("acceptProxyProtocol"), translate("Whether to receive PROXY protocol, when this node want to be fallback or forwarded by proxy, it must be enable, otherwise it cannot be used."))
o:depends({ [option_name("transport")] = "tcp" }) o.default = "0"
o:depends({ [option_name("transport")] = "ws" })
-- [[ Fallback部分 ]]-- -- [[ Fallback部分 ]]--
o = s:option(Flag, option_name("fallback"), translate("Fallback")) o = s:option(Flag, option_name("fallback"), translate("Fallback"))

View File

@ -430,7 +430,6 @@ function gen_config_server(node)
} }
} or nil, } or nil,
tcpSettings = (node.transport == "tcp") and { tcpSettings = (node.transport == "tcp") and {
acceptProxyProtocol = (node.acceptProxyProtocol and node.acceptProxyProtocol == "1") and true or false,
header = { header = {
type = node.tcp_guise, type = node.tcp_guise,
request = (node.tcp_guise == "http") and { request = (node.tcp_guise == "http") and {
@ -453,7 +452,6 @@ function gen_config_server(node)
header = {type = node.mkcp_guise} header = {type = node.mkcp_guise}
} or nil, } or nil,
wsSettings = (node.transport == "ws") and { wsSettings = (node.transport == "ws") and {
acceptProxyProtocol = (node.acceptProxyProtocol and node.acceptProxyProtocol == "1") and true or false,
headers = (node.ws_host) and {Host = node.ws_host} or nil, headers = (node.ws_host) and {Host = node.ws_host} or nil,
path = node.ws_path path = node.ws_path
} or nil, } or nil,
@ -470,7 +468,10 @@ function gen_config_server(node)
} or nil, } or nil,
grpcSettings = (node.transport == "grpc") and { grpcSettings = (node.transport == "grpc") and {
serviceName = node.grpc_serviceName serviceName = node.grpc_serviceName
} or nil } or nil,
sockopt = {
acceptProxyProtocol = (node.acceptProxyProtocol and node.acceptProxyProtocol == "1") and true or false
}
} }
} }
}, },
@ -503,9 +504,7 @@ function gen_config_server(node)
node.reality_serverNames node.reality_serverNames
}, },
privateKey = node.reality_private_key, privateKey = node.reality_private_key,
shortIds = { shortIds = node.reality_shortId or ""
node.reality_shortId
}
} or nil } or nil
end end
end end

View File

@ -3,8 +3,8 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-webd PKG_NAME:=luci-app-webd
PKG_VERSION:=1.3 PKG_VERSION:=1.4
PKG_RELEASE:=3 PKG_RELEASE:=1
LUCI_TITLE:=LuCI support for Webd Netdisk LUCI_TITLE:=LuCI support for Webd Netdisk
LUCI_PKGARCH:=all LUCI_PKGARCH:=all
@ -17,7 +17,6 @@ define Package/$(PKG_NAME)/config
config PACKAGE_$(PKG_NAME)_INCLUDE_WEBD_BINARY config PACKAGE_$(PKG_NAME)_INCLUDE_WEBD_BINARY
bool "Include webd Binary" bool "Include webd Binary"
default y default y
endef endef
include $(TOPDIR)/feeds/luci/luci.mk include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -7,7 +7,7 @@ translate("Webd - A lightweight self hosted netdisk")
m:section(SimpleSection).template = "webd/webd_status" m:section(SimpleSection).template = "webd/webd_status"
s = m:section(TypedSection, "webd", translate("Basic Settings"), translate("Set the basic settings of Webd Netdisk")) s = m:section(TypedSection, "webd", translate("Basic Settings"), translate("Set the basic settings of Webd"))
s.anonymous = true s.anonymous = true
enable = s:option(Flag, "enable", translate("Enable")) enable = s:option(Flag, "enable", translate("Enable"))
@ -21,7 +21,7 @@ port.rmempty = false
enable_ipv6 = s:option(Flag, "enable_ipv6", translate("Listen IPv6"), translatef("Listen both IPv4 and IPv6 Address")) enable_ipv6 = s:option(Flag, "enable_ipv6", translate("Listen IPv6"), translatef("Listen both IPv4 and IPv6 Address"))
enable_ipv6.default = 0 enable_ipv6.default = 0
root = s:option(Value, "webd_root", translate("Local Directory"), translatef("Directory of Webd Netdisk")) root = s:option(Value, "webd_root", translate("Local Directory"), translatef("Directory of Webd"))
root.default = "/mnt" root.default = "/mnt"
root.rmempty = false root.rmempty = false
@ -37,15 +37,16 @@ anonymous_perm:value("l", translate("Obtain file list"))
anonymous_perm:value("u", translate("Upload files")) anonymous_perm:value("u", translate("Upload files"))
anonymous_perm:value("m", translate("Remove files")) anonymous_perm:value("m", translate("Remove files"))
anonymous_perm:value("S", translate("Show hidden files")) anonymous_perm:value("S", translate("Show hidden files"))
anonymous_perm:value("D", translate("Append download attribute"))
anonymous_perm:value("T", translate("Play media")) anonymous_perm:value("T", translate("Play media"))
anonymous_perm:depends("enable_anonymous", "1") anonymous_perm:depends("enable_anonymous", "1")
anonymous_perm.description = translate("At least one permission must be choosed to allow anonymous access") anonymous_perm.description = translate("At least one permission must be choosed to allow anonymous access")
webd_bin = s:option(Value, "webd_bin", translate("Binary Path"), translatef("Webd Netdisk binary Path")) webd_bin = s:option(Value, "webd_bin", translate("Binary Path"), translatef("Webd binary Path"))
webd_bin.default = "/usr/bin/webd" webd_bin.default = "/usr/bin/webd"
webd_bin.rmempty = false webd_bin.rmempty = false
webd_conf = s:option(Value, "webd_conf", translate("Config Path"), translatef("Webd Netdisk config Path")) webd_conf = s:option(Value, "webd_conf", translate("Config Path"), translatef("Webd config Path"))
webd_conf.default = "/etc/webd.conf" webd_conf.default = "/etc/webd.conf"
webd_conf.rmempty = false webd_conf.rmempty = false

View File

@ -7,8 +7,8 @@ msgstr "官网"
msgid "Basic Settings" msgid "Basic Settings"
msgstr "基础设置" msgstr "基础设置"
msgid "Set the basic settings of Webd Netdisk" msgid "Set the basic settings of Webd"
msgstr "配置 Webd 网盘的基础设置" msgstr "配置 Webd 的基础设置"
msgid "Listening Port" msgid "Listening Port"
msgstr "监听端口" msgstr "监听端口"
@ -37,20 +37,20 @@ msgstr "若要允许匿名访问则勾选至少一个权限"
msgid "Binary Path" msgid "Binary Path"
msgstr "程序路径" msgstr "程序路径"
msgid "Webd Netdisk binary Path" msgid "Webd binary Path"
msgstr "Webd 网盘二进制程序路径" msgstr "Webd 程序路径"
msgid "Config Path" msgid "Config Path"
msgstr "配置文件路径" msgstr "配置文件路径"
msgid "Webd Netdisk config Path" msgid "Webd config Path"
msgstr "Webd 网盘配置文件路径" msgstr "Webd 配置文件路径"
msgid "Local Directory" msgid "Local Directory"
msgstr "本地路径" msgstr "本地路径"
msgid "Directory of Webd Netdisk" msgid "Directory of Webd"
msgstr "Webd 网盘监听路径" msgstr "Webd 监听路径"
msgid "Recycle Bin" msgid "Recycle Bin"
msgstr "回收站" msgstr "回收站"
@ -78,3 +78,6 @@ msgstr "显示隐藏文件"
msgid "Play media" msgid "Play media"
msgstr "播放媒体" msgstr "播放媒体"
msgid "Append download attribute"
msgstr "附加下载属性"

View File

@ -7,8 +7,8 @@ msgstr "官网"
msgid "Basic Settings" msgid "Basic Settings"
msgstr "基础设置" msgstr "基础设置"
msgid "Set the basic settings of Webd Netdisk" msgid "Set the basic settings of Webd"
msgstr "配置 Webd 网盘的基础设置" msgstr "配置 Webd 的基础设置"
msgid "Listening Port" msgid "Listening Port"
msgstr "监听端口" msgstr "监听端口"
@ -37,20 +37,20 @@ msgstr "若要允许匿名访问则勾选至少一个权限"
msgid "Binary Path" msgid "Binary Path"
msgstr "程序路径" msgstr "程序路径"
msgid "Webd Netdisk binary Path" msgid "Webd binary Path"
msgstr "Webd 网盘二进制程序路径" msgstr "Webd 程序路径"
msgid "Config Path" msgid "Config Path"
msgstr "配置文件路径" msgstr "配置文件路径"
msgid "Webd Netdisk config Path" msgid "Webd config Path"
msgstr "Webd 网盘配置文件路径" msgstr "Webd 配置文件路径"
msgid "Local Directory" msgid "Local Directory"
msgstr "本地路径" msgstr "本地路径"
msgid "Directory of Webd Netdisk" msgid "Directory of Webd"
msgstr "Webd 网盘监听路径" msgstr "Webd 监听路径"
msgid "Recycle Bin" msgid "Recycle Bin"
msgstr "回收站" msgstr "回收站"
@ -78,3 +78,6 @@ msgstr "显示隐藏文件"
msgid "Play media" msgid "Play media"
msgstr "播放媒体" msgstr "播放媒体"
msgid "Append download attribute"
msgstr "附加下载属性"

View File

@ -68,21 +68,20 @@ start_service() {
fi fi
done done
unset u unset u
${LOGGER} "Killing old processes ..."
ps -efww | grep "$webd_bin" | awk '{print $1}' | xargs kill -9 2> /dev/null ps -efww | grep "$webd_bin" | awk '{print $1}' | xargs kill -9 2> /dev/null
${LOGGER} "Starting Webd Netdisk Service ..." ${LOGGER} "Starting Webd Service ..."
procd_open_instance procd_open_instance
procd_set_param command $webd_bin -c $webd_conf procd_set_param command $webd_bin -c $webd_conf
procd_set_param respawn procd_set_param respawn
procd_close_instance procd_close_instance
else else
stop_service stop_service
${LOGGER} "Webd Netdisk Service is now disabled ..." ${LOGGER} "Webd Service is now disabled ..."
fi fi
} }
stop_service() { stop_service() {
${LOGGER} "Stopping Webd Netdisk Service ..." ${LOGGER} "Stopping Webd Service ..."
} }
service_triggers() { service_triggers() {

View File

@ -4,7 +4,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=webd PKG_NAME:=webd
PKG_VERSION:=20230604 PKG_VERSION:=20240302
PKG_RELEASE:=$(AUTORELESE) PKG_RELEASE:=$(AUTORELESE)
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
@ -19,7 +19,7 @@ endef
ifeq ($(ARCH),x86_64) ifeq ($(ARCH),x86_64)
TARGET_ARCH:=x86_64 TARGET_ARCH:=x86_64
TARGET_BOARD:=musl.x86-64 TARGET_BOARD:=musl
endif endif
ifeq ($(ARCH),mipsel) ifeq ($(ARCH),mipsel)