mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-26 19:02:52 +08:00
update 2026-05-27 23:25:57
This commit is contained in:
1 parent
84f707b52b
commit
d0159b49a5
759 files changed
+362365
No files matched your search
@@ -0,0 +1,56 @@
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gowebdav
|
||||
PKG_VERSION:=5.7.4
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/hacdias/webdav/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=5462eaf18292727e7af66d77c1723f729c97a31d4dfe4b47343f0644a5e63454
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=ElonH <elonhhuang@gmail.com>
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/webdav-$(PKG_VERSION)
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/hacdias/webdav
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include ../../lang/golang/golang-package.mk
|
||||
|
||||
define Package/gowebdav
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=File Transfer
|
||||
TITLE:=Simple Go WebDAV server
|
||||
URL:=https://github.com/hacdias/webdav
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS)
|
||||
endef
|
||||
|
||||
define Package/gowebdav/description
|
||||
Webdav command line interface is really easy to use so you can easily create
|
||||
a WebDAV server for your own user. By default, it runs on a random free port
|
||||
and supports JSON, YAML and TOML configuration.
|
||||
endef
|
||||
|
||||
define Package/gowebdav/install
|
||||
$(call GoPackage/Package/Install/Bin,$(1))
|
||||
|
||||
# $(INSTALL_DIR) $(1)/etc/config/ $(1)/etc/init.d/ $(1)/etc/webdav/
|
||||
# $(INSTALL_BIN) $(CURDIR)/files/webdav.init $(1)/etc/init.d/webdav
|
||||
# $(INSTALL_CONF) $(CURDIR)/files/webdav.config $(1)/etc/config/webdav
|
||||
# $(INSTALL_CONF) $(CURDIR)/files/webdav.yaml $(1)/etc/webdav/webdav.yaml
|
||||
endef
|
||||
|
||||
$(eval $(call GoBinPackage,gowebdav))
|
||||
$(eval $(call BuildPackage,gowebdav))
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
config webdav 'config'
|
||||
option enabled '0'
|
||||
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2021 ImmortalWrt
|
||||
|
||||
START=90
|
||||
STOP=10
|
||||
|
||||
WEBDAV="/usr/bin/webdav"
|
||||
|
||||
WEBDAVCONFIG="/etc/webdav/webdav.yaml"
|
||||
|
||||
start() {
|
||||
local enabled="$(uci get webdav.config.enabled)"
|
||||
stop
|
||||
[ "${enabled}" == "1" ] || exit 0
|
||||
export HOME="/root/"
|
||||
"${WEBDAV}" -c "${WEBDAVCONFIG}" >/dev/null 2>&1 &
|
||||
}
|
||||
|
||||
stop() {
|
||||
killall -9 pgrep "${WEBDAV}" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
# Server related settings
|
||||
address: 0.0.0.0
|
||||
port: 10880
|
||||
auth: true
|
||||
tls: false
|
||||
cert: cert.pem
|
||||
key: key.pem
|
||||
prefix: /
|
||||
|
||||
# Default user settings (will be merged)
|
||||
scope: .
|
||||
modify: true
|
||||
rules: []
|
||||
|
||||
# CORS configuration
|
||||
cors:
|
||||
enabled: true
|
||||
credentials: true
|
||||
allowed_headers:
|
||||
- Depth
|
||||
allowed_hosts:
|
||||
- http://localhost:8999
|
||||
allowed_methods:
|
||||
- GET
|
||||
exposed_headers:
|
||||
- Content-Length
|
||||
- Content-Range
|
||||
|
||||
users:
|
||||
- username: video
|
||||
password: 123
|
||||
scope: /mnt/sdb1
|
||||
modify: true
|
||||
rules:
|
||||
- regex: false
|
||||
allow: false
|
||||
path: /some/file
|
||||
Reference in new issue
Block a user