光猫折腾6.1 美化weborf&全面支持mime&全套webdav功能

in 前后端开发 with 0 comment

WebORF是一个很不错的项目

可是如何自定义呢?那只能修改源码了
抱着既然改代码了,一定要改全!!的心态,我发布了WebList

美化

WebDAV

What's new?

首先是全面支持MimeType了,使用后缀名法而不是magic块

mime和样式表

然后是抛弃了<table>布局,学习借鉴了alist的UI

标签

最后是减少了参数列表,删除了没必要的内容

localhost:~/weborf# ./weborf -h
Usage: weblist [OPTIONS]
        Start the weblist webserver

        (*) Compiled for IPv6
        (*) Has webdav support
 # Default port is        8080
 # Default base directory /mnt
 # Signature used         WebList/1.0 (GNU/Linux)

  -b, --basedir followed by absolute path of basedir
  -C, --cache   sets the directory to use for cache files
  -c, --cgi     list of cgi files and binary to execute them comma-separated
  -h, --help    display this help and exit
  -I, --index   list of index files, comma-separated
  -i, --ip  followed by IP address to listen (dotted format)
  -k, --caps    lists the capabilities of the binary
  -p, --port    followed by port number to listen
  -T  --inetd   must be specified when using weblist with inetd or xinetd
  -t  --tar     will send the directories as .tar.gz files
  -V, --virtual list of virtualhosts in the form host=basedir, comma-separated
  -v, --version print program version

很好用!

必须更改的内容

账号密码

更改你喜欢的账号密码。
默认内网设备无需认证,但是对于公网访问那就很危险了!

同理附上我编译的版本.gz (建议只用于内网)

.service配置示例

#!/usr/data/bash

export SERVICE_NAME="WebDav Services"
export SERVICE_CMD=("./webdav" "-c" "lua,/usr/data/lua,sh,/usr/data/bash" "-b" "/mnt" "-p" "81")
SERVICE_WORK_DIR="/usr/data/webdav/"
#SERVICE_ON_START=()
#SERVICE_ON_FINISH=()

export PID_FILE_PATH="/run/.webdav.pid"
export LOG_FILE_PATH="/run/.webdav.log"

放在/usr/data/webdav/

Responses