mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-29 23:15:13 +08:00
⛅ Sync 2026-05-25 22:10:00
This commit is contained in:
1 parent
bf7ca11926
commit
346033fcdf
11 files changed
+3
-276
No files matched your search
@@ -0,0 +1,45 @@
|
||||
#
|
||||
# Copyright (C) 2015-2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=quickfile
|
||||
PKG_VERSION:=1.0.16
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=quickfile-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://r2.cooluc.com/source
|
||||
PKG_HASH:=skip
|
||||
|
||||
PKG_MAINTAINER:=sbwml <admin@cooluc.com>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/quickfile
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=Quick File Manager
|
||||
DEPENDS:=@(arm||aarch64||x86_64)
|
||||
URL:=https://git.cooluc.com/sbwml/quickfile
|
||||
endef
|
||||
|
||||
define Package/quickfile/description
|
||||
Lightweight web-based file manager for OpenWrt/LuCI with minimal resource usage.
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/quickfile/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/quickfile.$(ARCH) $(1)/usr/bin/quickfile
|
||||
$(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/nginx/conf.d
|
||||
$(INSTALL_BIN) $(CURDIR)/files/quickfile.init $(1)/etc/init.d/quickfile
|
||||
$(INSTALL_CONF) $(CURDIR)/files/quickfile.locations $(1)/etc/nginx/conf.d/quickfile.locations
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,quickfile))
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=90
|
||||
USE_PROCD=1
|
||||
PROG=/usr/bin/quickfile
|
||||
|
||||
start_service() {
|
||||
procd_open_instance quickfile
|
||||
procd_set_param command $PROG
|
||||
procd_append_param command -dir /
|
||||
procd_append_param command -api /cgi-bin/luci/quickfile/api/
|
||||
procd_append_param command -static /cgi-bin/luci/quickfile-static/
|
||||
procd_append_param command -sock /tmp/run/quickfile/quickfile.sock
|
||||
procd_set_param stdout 0
|
||||
procd_set_param stderr 0
|
||||
procd_set_param respawn
|
||||
procd_set_param limits core="unlimited"
|
||||
procd_set_param limits nofile="200000 200000"
|
||||
procd_close_instance quickfile
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
# The default temporary storage space in OpenWrt may be limited.
|
||||
# To upload large files, please modify the `client_body_temp_path`
|
||||
# directory to a location with larger storage capacity.
|
||||
|
||||
client_max_body_size 0;
|
||||
client_body_buffer_size 128k;
|
||||
#client_body_temp_path /mnt/quickfile_tmp;
|
||||
|
||||
location /cgi-bin/luci/quickfile {
|
||||
proxy_cache off;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_connect_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
proxy_send_timeout 300;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://unix:/tmp/run/quickfile/quickfile.sock:;
|
||||
}
|
||||
|
||||
location /cgi-bin/luci/quickfile/api/ {
|
||||
proxy_cache off;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_connect_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
proxy_send_timeout 300;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
rewrite ^/cgi-bin/luci/quickfile/api/(.*) /api/$1?host=$scheme://$host break;
|
||||
proxy_pass http://unix:/tmp/run/quickfile/quickfile.sock:/api/;
|
||||
}
|
||||
|
||||
location /cgi-bin/luci/quickfile-static/ {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
rewrite ^/cgi-bin/luci/quickfile-static/(.*) /static/$1?host=$scheme://$host break;
|
||||
proxy_pass http://unix:/tmp/run/quickfile/quickfile.sock:/static/;
|
||||
}
|
||||
Reference in new issue
Block a user