From cfbfea073481711ce681009f10e66fbd1e4f6ced Mon Sep 17 00:00:00 2001 From: monlor Date: Thu, 20 Jun 2024 11:58:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20=E9=80=82=E9=85=8D?= =?UTF-8?q?=E5=B0=8F=E9=9B=85=E5=A4=B8=E5=85=8B=E7=BD=91=E7=9B=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alist/README.md | 4 ++++ alist/start.sh | 23 +++++++++++++++++++++++ env | 2 ++ install.sh | 8 ++++++++ 4 files changed, 37 insertions(+) diff --git a/alist/README.md b/alist/README.md index df7f213..0538f19 100644 --- a/alist/README.md +++ b/alist/README.md @@ -22,6 +22,8 @@ docker run -d -p 5678:80 -p 2345:2345 -p 2346:2346 --restart=unless-stopped --na `ALIYUN_FOLDER_ID`: 进入阿里云盘网页版,资源盘里面创建一个文件夹,点击文件夹,复制浏览器阿里云盘地址末尾的文件夹ID(最后一个斜杠/后面的一串字符串) +`QUARK_COOKIE`: 夸克的cookie,登陆夸克网盘,F12找一个请求,查看请求中的Cookie信息 + `PIKPAK_USER`: pikpak 账号,用来观看小雅中pikpak分享给你的资源,格式:`qqq@qq.com:aaadds` `PIKPAK_LIST`: 挂载你自己 pikpak 账号,格式:`挂载名:qqq@qq.com:aaadds,aaa:+8613111111111:dasf`,密码中不支持符号,: @@ -30,6 +32,8 @@ docker run -d -p 5678:80 -p 2345:2345 -p 2346:2346 --restart=unless-stopped --na `ALI_SHARE_LIST`: 挂载额外的阿里云盘分享内容,格式:`挂载名1:分享ID1:文件夹ID1,挂载名2:分享ID2:文件夹ID2` +`QUARK_SHARE_LIST`: 挂载额外的夸克网盘分享内容,格式:`挂载名1:分享ID1:文件夹ID1(不存在填root):提取码1(没有留空),挂载名2:分享ID2:文件夹ID2(不存在填root):提取码2` + `TVBOX_SECURITY`: 开启tvbox随机订阅地址,true/false,默认:false `PROXY`: 使用代理,支持http、https、socks5协议,格式:http://ip:7890 或 socks5://ip:7890 diff --git a/alist/start.sh b/alist/start.sh index 383a645..95bbef5 100644 --- a/alist/start.sh +++ b/alist/start.sh @@ -42,6 +42,14 @@ else echo "${ALIYUN_FOLDER_ID}" > /data/temp_transfer_folder_id.txt fi +# 设置夸克网盘cookie +if [ -n "${QUARK_COOKIE:-}" ]; then + echo "添加夸克网盘 Cookie..." + echo "${QUARK_COOKIE}" > /data/quark_cookie.txt +else + rm -rf /data/quark_cookie.txt +fi + # 设置pikpak用户密码观看pikpak资源 if [ -n "${PIKPAK_USER:-}" ]; then echo "设置PIKPAK用户密码..." @@ -95,6 +103,21 @@ else rm -rf /data/alishare_list.txt fi +# 挂载额外的夸克网盘分享 +if [ -n "${QUARK_SHARE_LIST:-}" ]; then + echo "挂载额外的夸克网盘分享..." + rm -rf /data/quarkshare_list.txt + echo "${QUARK_SHARE_LIST}" | tr ',' '\n' | while read -r line; do + name=$(echo "$line" | cut -d':' -f1) + share_id=$(echo "$line" | cut -d':' -f2) + folder_id=$(echo "$line" | cut -d':' -f3) + code=$(echo "$line" | cut -d':' -f4) + echo "${name} ${share_id} ${folder_id} ${code}" >> /data/quarkshare_list.txt + done +else + rm -rf /data/quarkshare_list.txt +fi + # 开启tvbox随机订阅 if [ "${TVBOX_SECURITY:=false}" = "true" ]; then echo "已开启TVBOX安全模式..." diff --git a/env b/env index 53c8c98..5d897c9 100644 --- a/env +++ b/env @@ -5,6 +5,8 @@ ALIYUN_TOKEN= ALIYUN_OPEN_TOKEN= # 阿里云盘文件夹ID ALIYUN_FOLDER_ID= +# 夸克网盘的cookie +QUARK_COOKIE= # 自动更新小雅alist文件 AUTO_UPDATE_ENABLED=true # 自动清理阿里云盘 diff --git a/install.sh b/install.sh index fa0c6d1..38e4664 100644 --- a/install.sh +++ b/install.sh @@ -124,12 +124,14 @@ data_location=${res:-${data_location}} token="" open_token="" folder_id="" +quark_cookie="" # 如果是更新服务,则从原有的compose配置中获取token等信息 if [ "${update}" != "0" ]; then token=$(grep ALIYUN_TOKEN "$install_path/env" 2> /dev/null | awk -F '=' '{print $2}') open_token=$(grep ALIYUN_OPEN_TOKEN "$install_path/env" 2> /dev/null | awk -F '=' '{print $2}') folder_id=$(grep ALIYUN_FOLDER_ID "$install_path/env" 2> /dev/null | awk -F '=' '{print $2}') + quark_cookie=$(grep QUARK_COOKIE "$install_path/env" 2> /dev/null | awk -F '=' '{print $2}') fi # 让用户输入阿里云盘TOKEN,token获取方式教程:https://alist.nn.ci/zh/guide/drivers/aliyundrive.html @@ -162,6 +164,11 @@ if [ ${#folder_id} -ne 40 ]; then exit 1 fi +echo +echo "登陆夸克网盘,浏览器F12,点击network,随便点一个请求,找到里面的Cookie值" +read -rp "请输入夸克网盘Cookie值: " res +quark_cookie=${res:=quark_cookie} + # 选择部署服务类型,alist + emby (默认), alist, alist + jellyfin, alist + emby + jellyfin echo echo "部署类型:" @@ -204,6 +211,7 @@ fi sedsh "s#ALIYUN_TOKEN=.*#ALIYUN_TOKEN=$token#g" env sedsh "s#ALIYUN_OPEN_TOKEN=.*#ALIYUN_OPEN_TOKEN=$open_token#g" env sedsh "s#ALIYUN_FOLDER_ID=.*#ALIYUN_FOLDER_ID=$folder_id#g" env +sedsh "s#QUARK_COOKIE=.*#QUARK_COOKIE=$quark_cookie#g" env if [ -n "$IMAGE_PROXY" ]; then sedsh -E "s#image: [^/]+#image: ${IMAGE_PROXY}#g" docker-compose.yml