惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LINUX DO - 热门话题
Stack Overflow Blog
Stack Overflow Blog
B
Blog
WordPress大学
WordPress大学
Project Zero
Project Zero
P
Palo Alto Networks Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 司徒正美
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
小众软件
小众软件
T
Tailwind CSS Blog
Forbes - Security
Forbes - Security
F
Full Disclosure
SecWiki News
SecWiki News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hacker News: Ask HN
Hacker News: Ask HN
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
F
Fortinet All Blogs
Cisco Talos Blog
Cisco Talos Blog
G
Google Developers Blog
J
Java Code Geeks
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recorded Future
Recorded Future
O
OpenAI News
Spread Privacy
Spread Privacy
MongoDB | Blog
MongoDB | Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Cybersecurity and Infrastructure Security Agency CISA
S
Securelist
V
Vulnerabilities – Threatpost
Y
Y Combinator Blog
IT之家
IT之家
U
Unit 42
腾讯CDC
S
Security Affairs
C
Cisco Blogs
Schneier on Security
Schneier on Security
The Last Watchdog
The Last Watchdog
B
Blog RSS Feed
宝玉的分享
宝玉的分享
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security @ Cisco Blogs
Cyberwarzone
Cyberwarzone
T
The Blog of Author Tim Ferriss

Rat's Blog

189List:一个全新的天翼云网盘的目录列表程序,CTList升级版 - Rat's Blog unlock-music:支持解密网易云/QQ音乐的加密文件和ID3信息补全 - Rat's Blog Proxyer:一款简单且带Web面板的内网穿透工具 - Rat's Blog CTList:一个可以绑定多个天翼云网盘的目录列表程序,支持视频播放 - Rat's Blog TopDocs:一款美观实用的在线文档编辑系统,支持Markdown语法 - Rat's Blog live-torrent:一个支持磁力链和种子的在线搜索云播Web客户端 - Rat's Blog 视频切片后自动上传至国内免费CDN,无成本加速视频播放 - Rat's Blog 多种功能强大的BT离线下载程序Docker镜像及安装 - Rat's Blog Simple Torrent:一个支持边下边播、无版权限制和自动上传的BT离线下载程序 - Rat's Blog
一个可以绑定多个OneDrive网盘的极简目录列表:OneList - Rat's Blog
博主: Rat's · 2022-03-30 · via Rat's Blog

说明:OneList以前介绍过,主要的特色就是解决了因OneDrive API抽风导致的很多问题,稳定性和访问速度都是不错的。不过由于使用Python写的,而Py单线程容易阻塞,响应不够迅速,刷新缓存时,Web端请求基本不可用,所以在整体性能上有点瑕疵。基于Golang的性能更好,效率更高,多盘并发缓存等众多好处,于是萌咖大佬就弃用Python版本,使用Golang重写了OneList,同时支持国际版、个人免费版(家庭版)、中国版(世纪互联)及多网盘绑定。

截图

请输入图片描述

更新

【2020.01.09】
修复内存占用过大。
新增支持在线视频播放的移动端自适应主题。

【2019.12.29】
新增隐藏目录或者文件。直接跳过缓存,减少API调用。
新增目录加密,支持不同目录不同账户密码。HTTP 401认证。

【2019.12.28】
新增搜索功能。

功能

  • 支持国际版、个人免费版(家庭版)、中国版(世纪互联)。
  • 支持同时列出多个盘的目录。(要求每个盘的SubPath唯一)
  • 支持文件夹内超过200个项目。
  • 支持后台自动刷新缓存。
  • 支持路径中含有特殊字符。
  • 数据储存在内存中,响应更加迅速。

安装

Github地址:https://github.com/MoeClub/OneList/tree/master/Rewrite

1、授权认证
点击右侧URL登录并授权,授权【国际版、个人版(家庭版)】、【中国版(世纪互联)】。

授权后会获取一个localhost开头打不开的链接,这里复制好整个链接地址,包括localhost

2、安装OneList

#新建并进入OneList目录
mkdir /opt/OneList && cd $_

#64位系统下载
wget https://raw.githubusercontent.com/MoeClub/OneList/master/Rewrite/amd64/linux/OneList
#32位系统下载
wget https://raw.githubusercontent.com/MoeClub/OneList//master/Rewrite/i386/linux/OneList
#arm架构下载
wget https://raw.githubusercontent.com/MoeClub/OneList/master/Rewrite/arm/linux/OneList
    
#给予权限
chmod +x OneList

3、使用命令

Usage of OneList:
  -a string
        // 初始化配置文件,添加新配置
        Setup and Init auth.json.
  -bind string
        // 绑定IP地址(公网: 0.0.0.0)
        Bind Address (default "127.0.0.1")
  -port string
        // 绑定端口(HTTP:80)
        Port (default "5288")
  -s string
        // 设置 SubPath 项, 需要与 -a 一起使用.
        Set SubPath. [unique per account] (default "/")
  -c string
        // 配置文件
        Config file. (default "config.json")
  -t string
        // Index.html 目录样式文件
        Index file. (default "index.html")
  -cn
        // 开关
        // 授权中国版(世纪互联), 需要此参数.
        OneDrive by 21Vianet.
  -ms
        // 开关
        // 授权个人版(家庭版), 需要此参数.
        OneDrive by Microsoft.

4、生成配置文件

#国际版,将url换成你上面复制的授权地址,包括http://loaclhost。
./OneList -a "url" -s "/onedrive01"

#个人版(家庭版),将url换成你上面复制的授权地址,包括http://loaclhost。
./OneList -ms -a "url" -s "/onedrive02"

#中国版(世纪互联),将url换成你上面复制的授权地址,包括http://loaclhost。
./OneList -cn -a "url" -s "/onedrive03"

提示Success! Add config. '/path/to/config.json'信息,则添加成功。

这里要注意的是:

1、授权url地址只能用一次,超过需要重新授权。
2、命令中的/onedrive01参数为指定网盘地址后缀,比如http://domain.com/onedrive01。
3、授权多个网盘的话,重复授权多次即可,参数均会添加到一个配置文件,且后缀不能重复。
4、地址后缀填错了的,可以稍后在配置文件中修改。

本文默认的配置文件路径/opt/OneList/config.json,参数详解,可自行修改:

[
  {
    // 如果是家庭版或者个人免费版, 此项应为 true.
    "MSAccount": false,
    // 如果是中国版(世纪互联), 此项应为 true.
    "MainLand": false,
    // 授权令牌
    "RefreshToken": "1234564567890ABCDEF",
    // 单配置文件中,此项要唯一.将此OneDrive中设置为`RootPath`目录映射在`http://127.0.0.1:5288/onedrive` 下.
    // (只推荐一个盘位的时候使用根目录"/".)
    "SubPath": "/onedrive",
    // 读取OneDrive的某个目录作为根目录. (支持根目录"/")
    "RootPath": "/Test",
    // 隐藏OneDrive目录中的文件夹和文件, 条目间使用 "|" 分割. (跳过缓存设置的条目.)
    "HidePath": "/Test/Obj01|/Test/Obj02",
    // 使用用户名和密码加密OneDrive目录. 目录和用户名密码间使用 "?" 分割, 用户名密码使用 ":" 分割, 条目间使用 "|" 分割. 无效条目将跳过.
    "AuthPath": "/Test/Auth01?user01:pwd01|/Test/Auth02?user02:pwd02",
    // 缓存刷新间隔.(所有项目中的刷新时间取最小值为有效刷新间隔)
    "RefreshInterval": 900
  }
]

这里注意,挂载多个盘符的时候,SubPath参数请不要为/,单个网盘建议为/

5、运行OneList

#下载默认的index.html主题,与config.json同目录,即本文默认的/opt/OneList
wget https://raw.githubusercontent.com/MoeClub/OneList/master/Rewrite/index.html -P /opt/OneList
#监听8000地址,自行修改
/opt/OneList/OneList -bind 0.0.0.0 -port 8000

最后打开ip:端口访问即可,如果你挂载网盘的时候SubPath/,那么直接通过根目录查看,如果为/onedrive1,那么通过ip:端口/onedrive1查看,如果该路径不存在,则会提示No Found.

且首次运行会异步缓存,也就是至少有一个盘缓存成功了,才会显示。

6、开机自启
这里新建一个简单的systemd配置文件,适用CentOS 7Debian 8+Ubuntu 16+

使用命令:

#设置你的运行监听端口,即你可以通过ip:端口访问程序,这里默认8000。
port="8000"
#将以下代码一起复制到SSH运行
cat > /etc/systemd/system/onelist.service <<EOF
[Unit]
Description=onelist
After=network.target

[Service]
Type=simple
ExecStart=/opt/OneList/OneList -bind 0.0.0.0 -port ${port}
Restart=on-failure

[Install]
WantedBy=multi-user.target
EOF
#启动并设置开机自启
systemctl start onelist
systemctl enable onelist

更换主题

提示:下载主题的index.html文件,覆盖默认index.html文件,本文默认存放/opt/OneList,然后重启程序即可

主题地址:https://github.com/MoeClub/OneList/tree/master/Rewrite/@Theme

1、HaorWu

#作者
https://github.com/HaorWu

#特点
支持移动端自适应
支持当页搜索
支持按文件名, 日期, 大小排序
支持主动查看图片
支持在线播放视频

#下载地址
https://raw.githubusercontent.com/MoeClub/OneList/master/Rewrite/%40Theme/HaorWu/index.html

2、jackjieYYY

#作者
https://github.com/jackjieYYY
https://www.hostloc.com/space-uid-38920.html

#特点
支持移动端自适应
支持当页搜索
支持按文件名, 日期, 大小排序
支持在线播放视频

#下载地址
https://raw.githubusercontent.com/MoeClub/OneList/master/Rewrite/%40Theme/jackjieYYY/index.html

相关命令

启动:systemctl start onelist
停止:systemctl stop onelist
重启:systemctl restart onelist
查看状态:systemctl status onelist

卸载

#未设置开机自启
rm -rf /opt/OneList

#设置过开机自启
systemctl stop onelist
systemctl disable onelist
rm -rf /opt/OneList /etc/systemd/system/onelist.service

最后如果我们只想显示网盘的某些文件夹,那么可以分别挂载该网盘的不同目录即可,具体操作看配置文件说明。

如果有发现该程序存在BUG,可以提下,方便修复,有会前端的热心大佬,也可以自荐下,帮忙美化下该前端。


版权声明:本文为原创文章,版权归 Rat's Blog 所有,转载请注明出处!

本文链接:https://www.moerats.com/archives/1016/

如教程需要更新,或者相关链接出现404,可以在文章下面评论留言。