From d644f8715d1c57598c03dba7e024e4aae79b3a51 Mon Sep 17 00:00:00 2001 From: wcbing Date: Mon, 6 Oct 2025 19:14:47 +0800 Subject: [PATCH] revert: remove debiancn repo, restore wps-office --- README.md | 2 +- data/repo_list.json | 6 ------ get/wps-office.sh | 31 +++++++++++++++++++++++++++++++ get/wps-office.sh.bak | 27 --------------------------- 4 files changed, 32 insertions(+), 34 deletions(-) create mode 100644 get/wps-office.sh delete mode 100644 get/wps-office.sh.bak diff --git a/README.md b/README.md index d817639..ffbb7a5 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ | [QQ音乐](https://y.qq.com/download/download.html) | qqmusic | ✅ | | | [腾讯会议](https://meeting.tencent.com/download/) | wemeet | ✅ | ✅ | | [腾讯文档](https://docs.qq.com/home/download) | tdappdesktop | ✅ | ✅ | +| [WPS Office](https://linux.wps.cn/) | wps-office | ✅ | | | [百度网盘](https://pan.baidu.com/download) | baidunetdisk | ✅ | | | [钉钉](https://www.dingtalk.com/download/) | com.alibabainc.dingtalk | ✅ | ✅ | | [飞书](https://www.feishu.cn/download) | bytedance-feishu-stable | ✅ | ✅ | @@ -112,7 +113,6 @@ | [lazydocker: wcbing 打包](https://github.com/wcbing-build/lazydocker-debs) | lazydocker | ✅ | ✅ | | [lazygit: wcbing 打包](https://github.com/wcbing-build/lazygit-debs) | lazygit | ✅ | ✅ | | [NextTrace](https://github.com/nxtrace/nexttrace-debs) | nexttrace | ✅ | ✅ | -| [Debian 中文社区软件源](https://github.com/debiancn/repo)([镜像](https://help.mirrors.cernet.edu.cn/debiancn/)) | anydesk
marktext
wps-office
[更多](https://github.com/debiancn/repo) | ✅ | | | [Gitea](https://gitlab.com/packaging/gitea)([镜像](https://mirrors.ustc.edu.cn/help/packaging-gitea.html)) | gitea | ✅ | ✅ | | [AnyDesk](https://deb.anydesk.com/howto.html) | anydesk | ✅ | ✅ | | [Spotify](https://www.spotify.com/sg-zh/download/linux/) | spotify-client | ✅ | | diff --git a/data/repo_list.json b/data/repo_list.json index d4a5b59..497ef87 100644 --- a/data/repo_list.json +++ b/data/repo_list.json @@ -117,12 +117,6 @@ "mix": "Packages" } }, - "debiancn": { - "repo": "https://mirrors.cernet.edu.cn/debiancn/", - "path": { - "amd64": "dists/bookworm/main/binary-amd64/Packages.gz" - } - }, "gitea": { "repo": "https://mirrors.ustc.edu.cn/packaging-gitea/", "path": { diff --git a/get/wps-office.sh b/get/wps-office.sh new file mode 100644 index 0000000..c6f3c2a --- /dev/null +++ b/get/wps-office.sh @@ -0,0 +1,31 @@ +# decrypt() { +# url=$1 +# pathname="/$(echo $url | cut -d '/' -f 4-)" +# secrity_key="7f8faaaa468174dc1c9cd62e5f218a5b" +# timestamp10=$(date '+%s') +# md5hash=$(echo -n "${secrity_key}${pathname}${timestamp10}" | md5sum | cut -d " " -f 1 ) +# url="$url?t=${timestamp10}&k=${md5hash}" +# echo $url +# } + +# WPS 官网 JS 代码大致逻辑如下: +# function downLoad(url) { +# var urlObj=new URL(url); +# var uri=urlObj.pathname; +# var secrityKey="7f8faaaa468174dc1c9cd62e5f218a5b"; +# var timestamp10=Math.floor(new Date().getTime() / 1000); +# var md5hash=CryptoJS.MD5(secrityKey + uri + timestamp10); +# url += '?t=' + timestamp10 + '&k=' + md5hash +# console.log(url); +# } + +WEB_CONTENT=$(curl -fs https://linux.wps.cn/) +VERSION=$(echo $WEB_CONTENT | grep -o "

[0-9.]*

" | sed 's/

\(.*\)<\/p>/\1/') +AMD64_ORI_URL=$(echo $WEB_CONTENT | grep -o "https://[0-9a-zA-Z_\/\.\-]*amd64\.deb" | head -n 1) + +# AMD64_URL=$(decrypt $AMD64_ORI_URL) +# 使用 CloudFlare Workers 动态生成重定向链接,其基本逻辑如上方 JS 代码所示。 +# 这样 Packages 中固定链接也可重定向至官网,不给官方白嫖流量的机会。 +AMD64_URL="https://wps302.wcbing.workers.dev/$AMD64_ORI_URL" + +./check_downloader.py wps-office $VERSION $AMD64_URL amd64 \ No newline at end of file diff --git a/get/wps-office.sh.bak b/get/wps-office.sh.bak deleted file mode 100644 index 9af92e5..0000000 --- a/get/wps-office.sh.bak +++ /dev/null @@ -1,27 +0,0 @@ -decrypt() { - url=$1 - pathname="/$(echo $url | cut -d '/' -f 4-)" - secrity_key="7f8faaaa468174dc1c9cd62e5f218a5b" - timestamp10=$(date '+%s') - md5hash=$(echo -n "${secrity_key}${pathname}${timestamp10}" | md5sum | cut -d " " -f 1 ) - url="$url?t=${timestamp10}&k=${md5hash}" - echo $url - - # # js - # function downLoad(url) { - # var urlObj=new URL(url); - # var uri=urlObj.pathname; - # var secrityKey="7f8faaaa468174dc1c9cd62e5f218a5b"; - # var timestamp10=Math.floor(new Date().getTime() / 1000); - # var md5hash=CryptoJS.MD5(secrityKey + uri + timestamp10); - # url += '?t=' + timestamp10 + '&k=' + md5hash - # console.log(url); - # } -} - -WEB_CONTENT=$(curl -fs https://linux.wps.cn/) -VERSION=$(echo $WEB_CONTENT | grep -o "

[0-9.]*

" | sed 's/

\(.*\)<\/p>/\1/') -X64_ORI_URL=$(echo $WEB_CONTENT | grep -o "https://[0-9a-zA-Z_\/\.\-]*amd64\.deb" | head -n 1) -X64_URL=$(decrypt $X64_ORI_URL) - -./check_downloader.py wps-office $VERSION $X64_URL \ No newline at end of file