天翼云盘目录列表,下载不需要走服务器流量,有3种方式,适合自己的才是最好的

搭建环境为LNMP一键安装包,其他环境有差异自行修改

Cookie搭建

源码

原文出处:hostloc-lefan谢谢MJJ大佬的奉献精神

原作者删除了

提取码:8was

下载源码解压到网站运行目录,如:/home/wwwroot/ct.imcxx.com

需要赋予www权限

配置

修改index.py,填写对应的账号密码及列表根目录

uname    = '153xxxxxxx'#用户名
passw    = 'xxxxxx'#密码
folderid = '11420xxxxx3405'#列表根目录

运行:

python3 index.py

如果提示缺少模块,pip3安装对应模块即可

没有py3的话,可以执行下面的命令安装:

yum -y install python36 git
ln -s /usr/bin/python3.6 /usr/bin/python3
wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py

注意:
默认监听127.0.0.1:5000
外网无法直接通过IP+端口访问,需要进行反代。
如果需要公网直接访问或修改端口,修改index.py最后一行

app.run(port=5000) #只要内网反代修改端口号即可
app.run(host='0.0.0.0' port=5000) #允许IP直接访问

开机启动

vi /etc/systemd/system/ctyun.service

[Unit]
Description=ctyun
After=network.target

[Service]
Type=simple
WorkingDirectory=/home/wwwroot/ct.imcxx.com
ExecStart=/usr/bin/python3 /home/wwwroot/ct.imcxx.com/index.py
Restart=on-failure

[Install]
WantedBy=multi-user.target

相关命令:

自启:systemctl enable ctyun
启动:systemctl start ctyun
停止:systemctl stop ctyun
禁用:systemctl disable ctyun

反代

反代不能使用子目录,比如ct.imcxx.com/ctyun,只能使用ct.imcxx.com

location / {
proxy_pass            http://127.0.0.1:5000;
proxy_set_header      Host $host;
proxy_set_header      X-Real-IP $remote_addr;
proxy_set_header      X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header      Upgrade $http_upgrade;
proxy_set_header      Connection $connection_upgrade;
client_max_body_size  1m;
}

备注

如果出现ico无法显示,在/templates/index.html头部加入:


#https报错加入,未报错无需加入

#反代必须使用外链ico,目录ico无法使用

CTlist

文章来源:Rat's Blog

安装CTList

#新建并进入CTList目录
wget https://raw.githubusercontent.com//iiiiiii1/CTList/master/exec/amd64/linux/CTList
chmod +x CTList

配置文件

下载配置文件

wget https://raw.githubusercontent.com/MoeClub/CTList/master/config.json

编辑配置文件config.json,大致说明如下:

[
{
"Enable": 1,                  # 0: 关闭, 1: 打开
"UserName": "",               # 天翼云网盘登陆用户名,不需要@189.cn.
"Password": "",               # 天翼云网盘登陆密码
"CaptchaMode": "0",           # 验证码. 0: 遇到验证码拒绝登陆, 1: 手动输入验证, 其他: 自动识别验证码的API.
"RefreshToken": "",           # 天翼网盘会话. 保持默认, 如果出现异常, 请将该值清空.
"SubPath": "/CTList",         # 指定某账户挂载在网站的某个目录, 多账户时每个目录值必须唯一.
"RootPathId": "-11",          # 设置展示天翼网盘目录的ID, 根目录为 -11.
"HideItemId": "0|-16",        # 不展示某个目录或文件, 填写其ID. 每项用"|"分隔.
"AuthItemId": "",             # 加密某个目录或文件. "<文件或者目录的ID>?<加密模式>?<用户名>:<密码>"
"RefreshURL": 180,            # 下载直链缓存的秒数. 超时则被动更新. 
"RefreshInterval": 1800       # 刷新目录结构,如果不常更新,建议设置更长时间.
}
]

下载主题文件

HaorWu

作者
https://github.com/HaorWu

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

下载地址

https://raw.githubusercontent.com/MoeClub/OneList/master/Rewrite/%40Theme/HaorWu/index.html

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

获取到授权码

(AUTH_TOKEN,后面需要用到):
请移步V佬商店购买
(V佬暂时不卖了,破解提示:劫持验证)

启动CTList:

#直接运行
/home/wwwroot/ct.imcxx.com/CTList -a "AUTH_TOKEN" -bind 0.0.0.0 -port 5289

#后台运行
/home/wwwroot/ct.imcxx.com/CTList -a "AUTH_TOKEN" -bind 0.0.0.0 -port 8000 -d

后台&开机自启

vi /etc/systemd/system/ctlist.service

[Unit]
Description=onelist
After=network.target

[Service]
Type=simple
ExecStart=/home/wwwroot/ct.imcxx.co/CTList -a "AUTH_TOKEN" -bind 0.0.0.0 -port 5289 -l
Restart=on-failure

[Install]
WantedBy=multi-user.target

执行启动服务:

systemctl enable ctlist
systemctl start ctlist
systemctl stop ctlist
systemctl disable ctlist

通过ip:5288即可访问
也可以进行域名反代
如果出现ico无法显示,在index.html加入:


#反代必须使用外链ico,目录ico无法使用

加密说明

AuthItemId配置项采用HTTP 401认证方式加密。、

# 单个写法
"AuthItemId": "-11?0?UserName:Password"
# 多个写法
"AuthItemId": "-11?0?UserName:Password|-16?1?UserName:Password"

# 字段解析
<文件或者目录的ID>?<加密模式>?<用户名>:<密码>

# 加密模式,加密文件选0和1效果相同.
0: 只加密这一层文件夹,可以直接访问这层文件夹内部的内容.
1: 加密这个文件夹的所有子项目.

伪授权

略略略,非好友不提供,请去找V佬py


最后修改:2023 年 06 月 23 日
如果觉得我的文章对你有用,请随意赞赏