Coder Social home page Coder Social logo

vlist's Introduction

特征简介

1. 用户名密码鉴权
2. 隐藏/忽略 某文件
3. 隐藏/忽略 某文件夹
4. 正则匹配支持
5. 302 链接 映射成文件
6. 文件断点续传
7. 读取配置文件
8. WebDVA 只读模式
9. index.html

配置文件 (config.json)

{
  "WorkFolder": "/var/www",
  # 展示某个目录(唯一)
  # 示例: /var/www.
  
  "Endpoint": "/",
  # 映射到URL目录, 默认为根目录.
  
  "FolderSize": false,
  # 计算文件夹大小, 递归遍历累加. (开启会影响性能)
  
  "AuthItem": "user1:passwd1@/The/File/Path|user2:passwd2@/The/Folder/Path",
  # 使用 HTTP 401 加密多个目录或者文件.
  # 路径格式为省略掉 Endpoint 的相对路径.
  
  "RedirectItem" : "google.txt;https://google.com|/link/baidu.txt;https://baiud.com",
  # 添加虚拟路径, 302 跳转至指定链接.
  # 路径格式为省略掉 Endpoint 的相对路径.
  
  "IgnoreFile": "",
  # 忽略某个名字的文件, 支持正则.
  
  "IgnoreFolder": "",
  # 忽略某个名字的文件夹, 支持正则.
  
  "HideFile": ".*\\.sh|test\\.txt",
  # 隐藏某个名字的文件, 支持正则. 
  # 示例: 隐藏 sh 后缀的文件和名字为 test.txt 的文件.
  
  "HideFolder": "",
  # 隐藏某个名字的文件夹, 支持正则.
  
  "WebDAV": true
  # 添加只读模式的 WebDAV 访问功能.
  
  # 隐藏: 不显示在列表中, 但能可以访问.
  # 忽略: 不显示在列表中, 且不可以访问.
  # 某一项中填写多个项目, 使用 "|" 分隔.
  # 正则表达式转义符在 json 文件中为 "\\"
}

使用方法

快速使用

./vList -h
./vList -w "/var/www"
./vList -d -w "/var/www" -bind 0.0.0.0 -port 8080
./vList -bind 0.0.0.0 -port 8080 -w "/var/www" -webdav=false -hide=fasle -size=true

# -h 显示帮助
# -q 安静模式(不显示日志)
# -d 后台运行(在Windows下无效)

应用配置文件

如果同目录中有 config.json, 则会自动读取.
如果同目录中有 index.html, 则会自动读取.
./vList
./vList -c "/配置文件绝对路径/config.json" -bind 0.0.0.0 -port 8080

vlist's People

Contributors

moeclub avatar jialezi666 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.