mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2025-12-16 20:33:03 +00:00
Compare commits
140 Commits
0.1.7-rele
...
0.1.6-rele
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8441954075 | ||
|
|
5e0568fa0e | ||
|
|
594e9af71d | ||
|
|
9bc7e9aa26 | ||
|
|
5805edf0a9 | ||
|
|
9614a36fc2 | ||
|
|
f45031c3f1 | ||
|
|
28e0542c8e | ||
|
|
b78a8300c6 | ||
|
|
ca06d5ae98 | ||
|
|
0c5e53b86e | ||
|
|
f45e6f3468 | ||
|
|
08ffec524e | ||
|
|
62dea67d69 | ||
|
|
8108a4dd3f | ||
|
|
56334fa4a2 | ||
|
|
093b337396 | ||
|
|
4bedf4486b | ||
|
|
b700493a6c | ||
|
|
44b1168bb5 | ||
|
|
a351364faf | ||
|
|
6bd075e17c | ||
|
|
1e77b20e44 | ||
|
|
0c2165dbf3 | ||
|
|
7595345e7b | ||
|
|
d13fe1fc21 | ||
|
|
f0269b1687 | ||
|
|
257147dd75 | ||
|
|
6fe824e705 | ||
|
|
f482982a25 | ||
|
|
e3ec81bd9b | ||
|
|
4771a5b5ce | ||
|
|
1292440f95 | ||
|
|
c2052ddbd8 | ||
|
|
f65dfacf4b | ||
|
|
27c2c1ab29 | ||
|
|
b4471dd9c3 | ||
|
|
69d8b645a4 | ||
|
|
67dc452819 | ||
|
|
60df94ce86 | ||
|
|
d6575d5b81 | ||
|
|
2ffa31f655 | ||
|
|
1ae2c89d4f | ||
|
|
2de5790b2a | ||
|
|
e5b892c9d1 | ||
|
|
1ab5059a41 | ||
|
|
1d10e7ab50 | ||
|
|
0477cc4815 | ||
|
|
9d3fce3dee | ||
|
|
e07d427f85 | ||
|
|
998c6e4627 | ||
|
|
e284dfca63 | ||
|
|
cccacde288 | ||
|
|
ee99599d4f | ||
|
|
574d5861f5 | ||
|
|
c3173b7f93 | ||
|
|
6dc647d0be | ||
|
|
ba5ad53529 | ||
|
|
3c5a0d9c9d | ||
|
|
bb1c296872 | ||
|
|
b36e3628bd | ||
|
|
837a265fd8 | ||
|
|
208c430875 | ||
|
|
639f8df534 | ||
|
|
4f5e23ebb6 | ||
|
|
d86c67314c | ||
|
|
d1ba790d05 | ||
|
|
63b1cad839 | ||
|
|
610c6c8d2a | ||
|
|
7f50ee5217 | ||
|
|
5883c7c174 | ||
|
|
0b73738e39 | ||
|
|
4e11b61fdb | ||
|
|
853246d363 | ||
|
|
e1d880318a | ||
|
|
533f6f8596 | ||
|
|
68b7c57384 | ||
|
|
089dc5713b | ||
|
|
2596e58943 | ||
|
|
7d8b39ad92 | ||
|
|
9419c7e0ca | ||
|
|
f492e3c031 | ||
|
|
8973a0e4b2 | ||
|
|
fff8cfe460 | ||
|
|
3b3dd0634f | ||
|
|
e2945b8f34 | ||
|
|
5343c68603 | ||
|
|
daadb6e9cc | ||
|
|
b8057135a9 | ||
|
|
e9ed8715af | ||
|
|
e941d76507 | ||
|
|
f2280c8e86 | ||
|
|
b189614d29 | ||
|
|
ea9d1067ed | ||
|
|
70fe0c23ae | ||
|
|
03c4c8c581 | ||
|
|
9a3baebec9 | ||
|
|
3574b58d21 | ||
|
|
74e95d0f12 | ||
|
|
a14db13485 | ||
|
|
37f5f2a30d | ||
|
|
e7ebb7c8c3 | ||
|
|
11decadb4c | ||
|
|
34c6d26581 | ||
|
|
2155c3e0c0 | ||
|
|
0bc23e76bf | ||
|
|
095040efce | ||
|
|
d98751b0e3 | ||
|
|
3e31e97c35 | ||
|
|
eebce94e88 | ||
|
|
2ca7a78920 | ||
|
|
2c243650f6 | ||
|
|
a257cd2f69 | ||
|
|
d0d5c96b9e | ||
|
|
00af483239 | ||
|
|
25534452ae | ||
|
|
804266d5af | ||
|
|
7fa2ea59a5 | ||
|
|
c9e714418e | ||
|
|
b3beb61337 | ||
|
|
2270a05631 | ||
|
|
5fb3d2a2d6 | ||
|
|
34f2670700 | ||
|
|
d4586b342e | ||
|
|
1651f1ea93 | ||
|
|
11a054dc2c | ||
|
|
fc233bcea3 | ||
|
|
e7e3888b13 | ||
|
|
91845cc08c | ||
|
|
94cde1e953 | ||
|
|
678866f654 | ||
|
|
f7ccc3c3e3 | ||
|
|
1799763f7f | ||
|
|
5ba38f4f1d | ||
|
|
07d8ed19b0 | ||
|
|
15b6468333 | ||
|
|
2457ded158 | ||
|
|
54a1a6b7f4 | ||
|
|
167149f410 | ||
|
|
2c7a17c3b0 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -38,4 +38,3 @@ gradlew
|
||||
gradlew.bat
|
||||
unused.txt
|
||||
/web-service/src/main/generated/
|
||||
/db
|
||||
|
||||
176
README.md
176
README.md
@@ -1,36 +1,27 @@
|
||||
云盘解析服务 (nfd云解析)
|
||||
预览地址 https://lz.qaiu.top
|
||||
**注意: 请不要过度依赖lz.qaiu.top预览地址服务,建议本地搭建或者云服务器自行搭建。
|
||||
解析次数过多IP会被部分网盘厂商限制,不推荐做公共解析。**
|
||||
# netdisk-fast-download
|
||||
预览地址 https://lz.qaiu.top
|
||||
|
||||
[](https://github.com/qaiu/netdisk-fast-download/actions/workflows/maven.yml)
|
||||
[](https://www.oracle.com/cn/java/technologies/downloads/)
|
||||
[](https://vertx-china.github.io/)
|
||||
[](https://vertx-china.github.io/)
|
||||
[](https://github.com/qaiu/netdisk-fast-download/releases/tag/0.1.6-releases)
|
||||
|
||||
## 项目介绍
|
||||
网盘直链解析工具能把网盘分享下载链接转化为直链,已支持蓝奏云/蓝奏云优享/奶牛快传/移动云云空间/小飞机盘/亿方云/123云盘/Cloudreve等,支持加密分享。
|
||||
|
||||
|
||||
*重要声明:本项目仅供学习参考;请不要将此项目用于任何商业用途,否则可能带来严重的后果。*
|
||||
|
||||
## 网盘支持情况:
|
||||
> 20230905 奶牛云直链做了防盗链,需加入请求头:Referer: https://cowtransfer.com/
|
||||
> 20230824 123云盘解析大文件(>100MB)失效,需要登录
|
||||
> 20230722 UC网盘解析失效,需要登录
|
||||
> 20230722 UC网盘解析失效,需要登录
|
||||
|
||||
|
||||
`网盘名称(网盘标识):`
|
||||
|
||||
- [蓝奏云 (lz)](https://pc.woozooo.com/)
|
||||
- [ ] 登录, 上传, 下载, 分享
|
||||
- [X] 直链解析
|
||||
- [蓝奏云优享 (iz)](https://www.ilanzou.com/)
|
||||
- [ ] 登录, 上传, 下载, 分享
|
||||
- [X] 直链解析
|
||||
- [奶牛快传 (cow)](https://cowtransfer.com/)
|
||||
- [ ] 登录, 上传, 下载, 分享
|
||||
- [X] 直链解析
|
||||
- [移动云云空间 (ec)](https://www.ecpan.cn/web)
|
||||
- [移动云空间 (ec)](https://www.ecpan.cn/web)
|
||||
- [ ] 登录, 上传, 下载, 分享
|
||||
- [X] 直链解析
|
||||
- [UC网盘 (uc)似乎已经失效,需要登录](https://fast.uc.cn/)
|
||||
- [ ] 登录, 上传, 下载, 分享
|
||||
- [X] 直链解析
|
||||
- [小飞机网盘 (fj)](https://www.feijipan.com/)
|
||||
@@ -42,60 +33,39 @@
|
||||
- [123云盘 (ye)](https://www.123pan.com/)
|
||||
- [ ] 登录, 上传, 下载, 分享
|
||||
- [X] 直链解析
|
||||
- [文叔叔 (ws)](https://www.wenshushu.cn/)
|
||||
- [ ] 登录, 上传, 下载, 分享
|
||||
- [X] 直链解析
|
||||
- [Cloudreve自建网盘 (ce)](https://github.com/cloudreve/Cloudreve)
|
||||
- [ ] 登录, 上传, 下载, 分享
|
||||
- [X] 直链解析
|
||||
- [QQ邮箱 (qq) 暂不可用-存在cookie问题](https://wx.mail.qq.com/)
|
||||
- [ ] 登录, 上传, 下载, 分享
|
||||
- [X] 直链解析(用户无法直接使用直链)
|
||||
- [夸克网盘 (qk) 寄了](https://pan.quark.cn/)
|
||||
- [UC网盘 (uc) 寄了](https://fast.uc.cn/)
|
||||
- [文叔叔 (ws) 开发中](https://www.wenshushu.cn/)
|
||||
- [夸克网盘 (qk) 开发中](https://pan.quark.cn/)
|
||||
|
||||
**TODO:**
|
||||
- 登录接口, 文件上传/下载/分享后端接口
|
||||
- 短地址服务
|
||||
- 前端界面(建设中...)
|
||||
|
||||
### API接口说明
|
||||
your_host指的是您的域名或者IP,实际使用时替换为实际域名或者IP,端口默认6400,可以使用nginx代理来做域名访问。
|
||||
解析方式分为两种类型直接跳转下载链接和获取下载链接(JSON),每一种都提供了两种接口形式parser和网盘标志/分享key拼接的短地址(标志短链),所有规则参考示例。
|
||||
- 通用接口: `/parser?url=分享链接`,加密分享需要加上参数pwd=密码;
|
||||
- 标志短链: `/网盘标识/分享key` 在分享Key后面加上@密码;
|
||||
- 直链JSON: `通用接口`和`标志短链`前加上`/json` 加密分享的密码规则同上;
|
||||
- 网盘标识参考上面网盘支持情况
|
||||
- 括号内是可选内容: 表示当带有分享密码时需要加上密码参数
|
||||
- 移动云云空间,小飞机网盘的加密分享的密码可以忽略
|
||||
- 移动云空间分享key取分享链接中的data参数,比如`&data=xxx`的参数就是xxx
|
||||
**技术栈:**
|
||||
Jdk17+Vert.x4.4.1
|
||||
Core模块集成Vert.x实现类似spring的注解式路由API
|
||||
|
||||
API接口
|
||||
|
||||
规则示例:
|
||||
```
|
||||
网盘标识参考上面网盘支持情况, 括号内是可选内容: 表示当带有分享密码时需要加上密码参数
|
||||
parser接口可以直接解析分享链接: 加密分享需要加上参数pwd=密码;
|
||||
其他接口在分享Key后面加上@密码;
|
||||
|
||||
1. 解析并自动302跳转 :
|
||||
http://your_host/parser?url=分享链接(&pwd=xxx)
|
||||
http://your_host/网盘标识/分享key(@分享密码)
|
||||
1. 解析并自动302跳转 :
|
||||
http(s)://your_host/parser?url=分享链接(&pwd=xxx)
|
||||
http(s)://your_host/网盘标识/分享key(@分享密码)
|
||||
2. 获取解析后的直链--JSON格式
|
||||
http://your_host/json/parser?url=分享链接(&pwd=xxx)
|
||||
http://your_host/json/网盘标识/分享key(@分享密码)
|
||||
3. 需要特殊处理的网盘分享:
|
||||
1. 移动云云空间(ec)使用parser?url= 解析时因为分享链接比较特殊(链接带有参数且含有#符号)所以要么对#进行转义%23要么直接去掉# 或者URL直接是主机名+'/'跟一个data参数
|
||||
http(s)://your_host/json/parser?url=分享链接(&pwd=xxx)
|
||||
http(s)://your_host/json/网盘标识/分享key(@分享密码)
|
||||
3. 特别注意的地方:
|
||||
- 有些网盘的加密分享的密码可以忽略: 如移动云空间,小飞机网盘
|
||||
- 移动云空间(ec)使用parser?url= 解析时因为分享链接比较特殊(链接带有参数且含有#符号)所以要么对#进行转义%23要么直接去掉# 或者URL直接是主机名+'/'跟一个data参数
|
||||
比如 http://your_host/parser?url=https://www.ecpan.cn/web//yunpanProxy?path=%2F%23%2Fdrive%2Foutside&data=81027a5c99af5b11ca004966c945cce6W9Bf2&isShare=1
|
||||
http://your_host/parser?url=https://www.ecpan.cn/web/%23/yunpanProxy?path=%2F%23%2Fdrive%2Foutside&data=81027a5c99af5b11ca004966c945cce6W9Bf2&isShare=1
|
||||
http://your_host/parser?url=https://www.ecpan.cn/&data=81027a5c99af5b11ca004966c945cce6W9Bf2&isShare=1
|
||||
|
||||
2. Cloudreve自建网盘解析规则:
|
||||
1. 标志短链: 根据网盘使用https和http选择 http://your_host/ce/https_网盘域名_s_wDz5TK 或 http://your_host/ce/http_网盘域名_s_wDz5TK
|
||||
网盘域名指的是Cloudreve搭建网盘的主域名比如pan.huang1111.cn,如果存在子路径需要将/替换为_,是否存在子路径看分享链接格式是否是://网盘域名/子路径/s/xxx,一般不存在子路径:网盘域名/s/xxx,
|
||||
比如: http://127.0.0.1:6400/ce/https_pan.huang1111.cn_s_wDz5TK
|
||||
2. parser接口 -> http://your_host/parser?url=分享链接(&pwd=xxx)
|
||||
比如: http://127.0.0.1:6400/parser?url=https://pan.huang1111.cn/s/wDz5TK
|
||||
|
||||
|
||||
|
||||
```
|
||||
json返回数据格式示例:
|
||||
json返回数据格式示例:
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
@@ -146,94 +116,70 @@ GET http://127.0.0.1:6400/json/fc/e5079007dc31226096628870c7@QAIU
|
||||
# 网盘对比
|
||||
|
||||
|
||||
| 网盘名称 | 免登陆下载分享 | 加密分享 | 初始网盘空间 | 单文件大小限制 |
|
||||
|-------------|---------|----------|-----------|-----------------|
|
||||
| 蓝奏云 | √ | √ | 不限空间 | 100M |
|
||||
| 奶牛快传 | √ | X | 10G | 不限大小 |
|
||||
| 移动云云空间(个人版) | √ | √(密码可忽略) | 5G(个人) | 不限大小 |
|
||||
| 小飞机网盘 | √ | √(密码可忽略) | 10G | 不限大小 |
|
||||
| 360亿方云 | √ | √(密码可忽略) | 100G(须实名) | 不限大小 |
|
||||
| 123云盘 | √ | √ | 2T | 100G(>100M需要登录) |
|
||||
| 文叔叔 | √ | √ | 10G | 5GB |
|
||||
| 夸克网盘 | x | √ | 10G | 不限大小 |
|
||||
| UC网盘 | x | √ | 10G | 不限大小 |
|
||||
| 网盘名称 | 可直接下载分享 | 加密分享 | 初始网盘空间 | 单文件大小限制 | 登录接口 |
|
||||
|------------|------------------------|----------|-----------|---------|------|
|
||||
| 蓝奏云 | √ | √ | 不限空间 | 100M | TODO |
|
||||
| 奶牛快传 | √ | X | 10G | 不限大小 | TODO |
|
||||
| 移动云空间 | √ | √(密码可忽略) | 5G(个人) | 不限大小 | TODO |
|
||||
| UC网盘 | 需要登录 | √ | 10G | 不限大小 | TODO |
|
||||
| 小飞机网盘 | √ | √(密码可忽略) | 10G | 不限大小 | TODO |
|
||||
| 360亿方云 | √(试用账号有时间限制企业版需要599续费) | √(密码可忽略) | 100G(须实名) | 不限大小 | TODO |
|
||||
| 123云盘 | √ | √ | 2T | 100G | TODO |
|
||||
| 文叔叔(TODO) | √(注意有时间限制) | √ | 10G | 5GB | TODO |
|
||||
| 夸克网盘(TODO) | 需要登录 | √ | 10G | 不限大小 | TODO |
|
||||
|
||||
# 打包部署
|
||||
|
||||
## JDK下载(lz.qaiu.top提供直链云解析服务)
|
||||
- [阿里jdk17(Dragonwell17-windows-x86)](https://lz.qaiu.top/ec/e957acef36ce89e1053979672a90d219n)
|
||||
- [阿里jdk17(Dragonwell17-linux-x86)](https://lz.qaiu.top/ec/6ebc9f2e0bbd53b4c4d5b11013f40a80NHvcYU)
|
||||
- [阿里jdk17(Dragonwell17-linux-aarch64)](https://lz.qaiu.top/ec/d14c2d06296f61b52a876b525265e0f8tzxTc5)
|
||||
- [解析有效性测试-移动云云空间-阿里jdk17-linux-x86](https://lz.qaiu.top/json/ec/6ebc9f2e0bbd53b4c4d5b11013f40a80NHvcYU)
|
||||
- [阿里jdk17(Dragonwell17-windows-x86)](https://lz.qaiu.top/ye/iaKtVv-hbECd)
|
||||
- [阿里jdk17(Dragonwell17-linux-x86)](https://lz.qaiu.top/ye/iaKtVv-AbECd)
|
||||
- [阿里jdk17(Dragonwell17-linux-aarch64)](https://lz.qaiu.top/ye/iaKtVv-HbECd)
|
||||
- [123云盘解析有效性测试用-阿里jdk17(Dragonwell17-linux-aarch64)](https://lz.qaiu.top/json/ye/iaKtVv-HbECd)
|
||||
|
||||
## 开发和打包
|
||||
|
||||
```shell
|
||||
# 环境要求: Jdk17 + maven;
|
||||
mvn clean
|
||||
# 环境要求: Jdk17 + maven;
|
||||
mvn clean
|
||||
mvn package
|
||||
|
||||
```
|
||||
打包好的文件位于 web-service/target/netdisk-fast-download-bin.zip
|
||||
打包好的文件位于 web-service/target/netdisk-fast-download-x.x.x-bin.zip
|
||||
## Linux服务部署
|
||||
> 注意: netdisk-fast-download.service中的ExecStart的路径改为实际路径
|
||||
```shell
|
||||
cd ~
|
||||
wget -O netdisk-fast-download.zip https://github.com/qaiu/netdisk-fast-download/releases/download/0.1.7-release-fixed2/netdisk-fast-download-bin-fixed2.zip
|
||||
unzip netdisk-fast-download-bin.zip
|
||||
cd netdisk-fast-download
|
||||
wget -O netdisk-fast-download-0.1.6-bin.zip https://github.com/qaiu/netdisk-fast-download/releases/download/0.1.6-releases/netdisk-fast-download-0.1.6-bin.zip
|
||||
unzip netdisk-fast-download-*-bin.zip
|
||||
cd netdisk-fast-download-*-bin
|
||||
bash service-install.sh
|
||||
```
|
||||
服务相关命令:
|
||||
1、查看服务状态
|
||||
systemctl status netdisk-fast-download.service
|
||||
|
||||
查看服务状态
|
||||
`systemctl status netdisk-fast-download.service`
|
||||
|
||||
2、控制服务
|
||||
启动服务
|
||||
`systemctl start netdisk-fast-download.service`
|
||||
systemctl start netdisk-fast-download.service
|
||||
|
||||
重启服务
|
||||
`systemctl restart netdisk-fast-download.service`
|
||||
systemctl restart netdisk-fast-download.service
|
||||
|
||||
停止服务
|
||||
`systemctl stop netdisk-fast-download.service`
|
||||
systemctl stop netdisk-fast-download.service
|
||||
|
||||
开机启动服务
|
||||
`systemctl enable netdisk-fast-download.servic`
|
||||
systemctl enable netdisk-fast-download.servic
|
||||
|
||||
停止开机启动
|
||||
`systemctl disable netdisk-fast-download.servic`
|
||||
systemctl disable netdisk-fast-download.servic
|
||||
|
||||
## Windows服务部署
|
||||
1. 下载并解压releases版本netdisk-fast-download-bin.zip
|
||||
2. 进入netdisk-fast-download下的bin目录
|
||||
1. 下载并解压releases版本netdisk-fast-download-0.1.6-bin.zip
|
||||
2. 进入netdisk-fast-download-0.1.6-bin目录
|
||||
3. 使用管理员权限运行nfd-service-install.bat
|
||||
如果不想使用服务运行可以直接运行run.bat
|
||||
> 注意: 如果jdk环境变量的java版本不是17请修改nfd-service-template.xml中的java命令的路径改为实际路径
|
||||
|
||||
## 0.1.8 开发计划
|
||||
- Docker部署
|
||||
- 联想乐云解析
|
||||
- 直链缓存
|
||||
- 日志优化
|
||||
|
||||
|
||||
**技术栈:**
|
||||
Jdk17+Vert.x4.4.1
|
||||
Core模块集成Vert.x实现类似spring的注解式路由API
|
||||
|
||||
|
||||
## Star History
|
||||
|
||||
[](https://star-history.com/#qaiu/netdisk-fast-download&Date)
|
||||
|
||||
|
||||
## 支持该项目
|
||||
本项目长期维护如果觉得有帮助, 可以请作者喝杯咖啡, 感谢支持
|
||||

|
||||
|
||||
[手机端支付宝打赏跳转链接](https://qr.alipay.com/fkx01882dnoxxtjenhlxt53)
|
||||
|
||||
|
||||
|
||||
|
||||
## Docker部署
|
||||
TODO
|
||||
|
||||
@@ -8,7 +8,7 @@ Wants=network-online.target
|
||||
Type=simple
|
||||
# User=USER
|
||||
# 需要JDK17及以上版本 注意修改为自己的路径
|
||||
ExecStart=/root/java/jdk-17.0.2/bin/java -server -Xmx128m -jar /root/java/netdisk-fast-download/netdisk-fast-download.jar
|
||||
ExecStart=/root/java/jdk-17.0.2/bin/java -server -Xmx128m -jar /root/java/netdisk-fast-download-0.1.6/netdisk-fast-download-0.1.6.jar
|
||||
ExecStop=/bin/kill -s QUIT $MAINPID
|
||||
Restart=always
|
||||
StandOutput=syslog
|
||||
|
||||
@@ -7,7 +7,7 @@ pushd %~dp0
|
||||
set MY_DIR=%~dp0
|
||||
set MY_DIR=%MY_DIR:~0,-1%
|
||||
|
||||
for /f "delims=X" %%i in ('dir /b %MY_DIR%\netdisk-fast-download.jar') do (
|
||||
for /f "delims=X" %%i in ('dir /b %MY_DIR%\netdisk-fast-download-*.jar') do (
|
||||
set LAUNCH_JAR=%MY_DIR%\%%i
|
||||
)
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
@echo off && @chcp 65001 > nul
|
||||
pushd %~dp0
|
||||
set LIB_DIR=%~dp0
|
||||
for /f "delims=X" %%i in ('dir /b %LIB_DIR%\netdisk-fast-download.jar') do (
|
||||
for /f "delims=X" %%i in ('dir /b %LIB_DIR%\netdisk-fast-download-*.jar') do (
|
||||
set LAUNCH_JAR=%LIB_DIR%%%i
|
||||
)
|
||||
|
||||
set "JAVA_HOME=D:\App\dragonwell-17.0.3.0.3+7-GA"
|
||||
"%JAVA_HOME%\bin\java.exe" -Xmx512M -Dfile.encoding=utf8 -jar %LAUNCH_JAR% %*
|
||||
|
||||
pause
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# set -x
|
||||
LAUNCH_JAR="netdisk-fast-download.jar"
|
||||
LAUNCH_JAR="netdisk-fast-download-0.1.6.jar"
|
||||
nohup java -Xmx512M -jar "$LAUNCH_JAR" "$@" >startup.log 2>&1 &
|
||||
tail -f startup.log
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>netdisk-fast-download</artifactId>
|
||||
<groupId>cn.qaiu</groupId>
|
||||
<version>0.1.7</version>
|
||||
<version>0.1.6</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<slf4j.version>2.0.5</slf4j.version>
|
||||
<commons-lang3.version>3.12.0</commons-lang3.version>
|
||||
<vertx.version>4.5.6</vertx.version>
|
||||
<vertx.version>4.4.1</vertx.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package cn.qaiu;
|
||||
|
||||
public class StartH2DatabaseServer {
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello world!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@ public class CreateTable {
|
||||
javaProperty2SqlColumnMap.put(Boolean.class, "BOOLEAN");
|
||||
javaProperty2SqlColumnMap.put(String.class, "VARCHAR");
|
||||
javaProperty2SqlColumnMap.put(java.util.Date.class, "TIMESTAMP");
|
||||
javaProperty2SqlColumnMap.put(java.time.LocalDateTime.class, "TIMESTAMP");
|
||||
javaProperty2SqlColumnMap.put(java.sql.Timestamp.class, "TIMESTAMP");
|
||||
javaProperty2SqlColumnMap.put(java.sql.Date.class, "DATE");
|
||||
javaProperty2SqlColumnMap.put(java.sql.Time.class, "TIME");
|
||||
@@ -158,8 +157,8 @@ public class CreateTable {
|
||||
return sql.substring(0, sql.length() - 1) + ");\r\n";
|
||||
}
|
||||
|
||||
public static void createTable(JDBCPool pool) {
|
||||
Set<Class<?>> tableClassList = ReflectionUtil.getReflections().getTypesAnnotatedWith(Table.class);
|
||||
public static void createTable(JDBCPool pool, String tableClassPath) {
|
||||
Set<Class<?>> tableClassList = ReflectionUtil.getReflections(tableClassPath).getTypesAnnotatedWith(Table.class);
|
||||
if (tableClassList.isEmpty()) LOGGER.info("Table model class not fount");
|
||||
tableClassList.forEach(clazz -> {
|
||||
String createTableSQL = getCreateTableSQL(clazz);
|
||||
|
||||
@@ -92,7 +92,7 @@ public class JDBCPoolInit {
|
||||
private void poolInitExecute(Promise<String> promise) {
|
||||
// 初始化连接池
|
||||
pool = JDBCPool.pool(vertx, dbConfig);
|
||||
CreateTable.createTable(pool);
|
||||
CreateTable.createTable(pool, dbConfig.getString("tableClassPath"));
|
||||
promise.complete("init jdbc pool success");
|
||||
|
||||
}
|
||||
|
||||
17
core/pom.xml
17
core/pom.xml
@@ -5,14 +5,21 @@
|
||||
<parent>
|
||||
<artifactId>netdisk-fast-download</artifactId>
|
||||
<groupId>cn.qaiu</groupId>
|
||||
<version>0.1.7</version>
|
||||
<version>0.1.6</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>1.0.8</version>
|
||||
<artifactId>core</artifactId>
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<vertx.version>4.4.1</vertx.version>
|
||||
<org.reflections.version>0.10.2</org.reflections.version>
|
||||
<lombok.version>1.18.12</lombok.version>
|
||||
<slf4j.version>2.0.5</slf4j.version>
|
||||
<commons-lang3.version>3.12.0</commons-lang3.version>
|
||||
<jackson.version>2.14.2</jackson.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
@@ -32,7 +39,7 @@
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>${logback.version}</version>
|
||||
<version>1.4.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
@@ -83,12 +90,6 @@
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package cn.qaiu.vx.core;
|
||||
|
||||
import cn.qaiu.vx.core.util.ConfigConstant;
|
||||
import cn.qaiu.vx.core.util.ConfigUtil;
|
||||
import cn.qaiu.vx.core.util.VertxHolder;
|
||||
import cn.qaiu.vx.core.verticle.ReverseProxyVerticle;
|
||||
@@ -17,8 +18,6 @@ import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.concurrent.locks.LockSupport;
|
||||
|
||||
import static cn.qaiu.vx.core.util.ConfigConstant.*;
|
||||
|
||||
/**
|
||||
* vertx启动类 需要在主启动类完成回调
|
||||
* <br>Create date 2021-05-07 10:26:54
|
||||
@@ -44,11 +43,6 @@ public final class Deploy {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param args 启动参数
|
||||
* @param handle 启动完成后回调处理函数
|
||||
*/
|
||||
public void start(String[] args, Handler<JsonObject> handle) {
|
||||
this.mainThread = Thread.currentThread();
|
||||
this.handle = handle;
|
||||
@@ -87,7 +81,7 @@ public final class Deploy {
|
||||
var calendar = Calendar.getInstance();
|
||||
calendar.setTime(new Date());
|
||||
var year = calendar.get(Calendar.YEAR);
|
||||
var logoTemplate = """
|
||||
var logoTemplete = """
|
||||
|
||||
Web Server powered by:\s
|
||||
____ ____ _ _ _ \s
|
||||
@@ -100,7 +94,7 @@ public final class Deploy {
|
||||
|
||||
""";
|
||||
|
||||
System.out.printf(logoTemplate,
|
||||
System.out.printf(logoTemplete,
|
||||
conf.getString("version_app"),
|
||||
VersionCommand.getVersion(),
|
||||
conf.getString("copyright"),
|
||||
@@ -114,10 +108,10 @@ public final class Deploy {
|
||||
private void deployVerticle() {
|
||||
tempVertx.close();
|
||||
LOGGER.info("配置读取成功");
|
||||
customConfig = globalConfig.getJsonObject(CUSTOM);
|
||||
customConfig = globalConfig.getJsonObject(ConfigConstant.CUSTOM);
|
||||
|
||||
JsonObject vertxConfig = globalConfig.getJsonObject(VERTX);
|
||||
Integer vertxConfigELPS = vertxConfig.getInteger(EVENT_LOOP_POOL_SIZE);
|
||||
JsonObject vertxConfig = globalConfig.getJsonObject(ConfigConstant.VERTX);
|
||||
Integer vertxConfigELPS = vertxConfig.getInteger(ConfigConstant.EVENT_LOOP_POOL_SIZE);
|
||||
var vertxOptions = vertxConfigELPS == 0 ?
|
||||
new VertxOptions() : new VertxOptions(vertxConfig);
|
||||
|
||||
@@ -128,10 +122,10 @@ public final class Deploy {
|
||||
VertxHolder.init(vertx);
|
||||
//配置保存在共享数据中
|
||||
var sharedData = vertx.sharedData();
|
||||
LocalMap<String, Object> localMap = sharedData.getLocalMap(LOCAL);
|
||||
localMap.put(GLOBAL_CONFIG, globalConfig);
|
||||
localMap.put(CUSTOM_CONFIG, customConfig);
|
||||
localMap.put(SERVER, globalConfig.getJsonObject(SERVER));
|
||||
LocalMap<String, Object> localMap = sharedData.getLocalMap(ConfigConstant.LOCAL);
|
||||
localMap.put(ConfigConstant.GLOBAL_CONFIG, globalConfig);
|
||||
localMap.put(ConfigConstant.CUSTOM_CONFIG, customConfig);
|
||||
localMap.put(ConfigConstant.SERVER, globalConfig.getJsonObject(ConfigConstant.SERVER));
|
||||
var future0 = vertx.createSharedWorkerExecutor("other-handle").executeBlocking(bch -> {
|
||||
handle.handle(globalConfig);
|
||||
bch.complete("other handle complete");
|
||||
@@ -175,7 +169,7 @@ public final class Deploy {
|
||||
* @return Deployment Options
|
||||
*/
|
||||
private DeploymentOptions getWorkDeploymentOptions(String name) {
|
||||
return getWorkDeploymentOptions(name, customConfig.getInteger(ASYNC_SERVICE_INSTANCES));
|
||||
return getWorkDeploymentOptions(name, customConfig.getInteger(ConfigConstant.ASYNC_SERVICE_INSTANCES));
|
||||
}
|
||||
|
||||
private DeploymentOptions getWorkDeploymentOptions(String name, int ins) {
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package cn.qaiu.vx.core.annotaions;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Documented
|
||||
@Inherited
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface HandleSortFilter {
|
||||
/**
|
||||
* 注册顺序,数字越大越先注册<br>
|
||||
* 值<0时会过滤掉该处理器
|
||||
*/
|
||||
int value() default 0;
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package cn.qaiu.vx.core.annotaions;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 拦截器配置注解
|
||||
* 正则匹配拦截途径
|
||||
*
|
||||
* @author <a href="https://qaiu.top">QAIU</a>
|
||||
*/
|
||||
@Documented
|
||||
@Inherited
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface InterceptorConfig {
|
||||
|
||||
String pattern() default "";
|
||||
|
||||
/**
|
||||
* 注册顺序,数字越大越先注册
|
||||
*/
|
||||
int order() default 0;
|
||||
}
|
||||
@@ -1,16 +1,9 @@
|
||||
package cn.qaiu.vx.core.base;
|
||||
|
||||
import cn.qaiu.vx.core.interceptor.AfterInterceptor;
|
||||
import cn.qaiu.vx.core.model.JsonResult;
|
||||
import cn.qaiu.vx.core.util.CommonUtil;
|
||||
import cn.qaiu.vx.core.util.ReflectionUtil;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.RoutingContext;
|
||||
import org.reflections.Reflections;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import static cn.qaiu.vx.core.util.ResponseUtil.*;
|
||||
import static io.vertx.core.http.HttpHeaders.CONTENT_TYPE;
|
||||
|
||||
/**
|
||||
* 统一响应处理
|
||||
@@ -20,43 +13,22 @@ import static cn.qaiu.vx.core.util.ResponseUtil.*;
|
||||
*/
|
||||
public interface BaseHttpApi {
|
||||
|
||||
// 需要扫描注册的Router路径
|
||||
Reflections reflections = ReflectionUtil.getReflections();
|
||||
|
||||
default void doFireJsonObjectResponse(RoutingContext ctx, JsonObject jsonObject) {
|
||||
if (!ctx.response().ended()) {
|
||||
fireJsonObjectResponse(ctx, jsonObject);
|
||||
}
|
||||
handleAfterInterceptor(ctx, jsonObject);
|
||||
default void fireJsonResponse(RoutingContext ctx, JsonObject jsonResult) {
|
||||
ctx.response().putHeader(CONTENT_TYPE, "application/json; charset=utf-8")
|
||||
.setStatusCode(200)
|
||||
.end(jsonResult.encode());
|
||||
}
|
||||
|
||||
|
||||
default <T> void doFireJsonResultResponse(RoutingContext ctx, JsonResult<T> jsonResult) {
|
||||
if (!ctx.response().ended()) {
|
||||
fireJsonResultResponse(ctx, jsonResult);
|
||||
}
|
||||
handleAfterInterceptor(ctx, jsonResult.toJsonObject());
|
||||
default <T> void fireJsonResponse(RoutingContext ctx, T jsonResult) {
|
||||
JsonObject jsonObject = JsonObject.mapFrom(jsonResult);
|
||||
fireJsonResponse(ctx, jsonObject);
|
||||
}
|
||||
|
||||
|
||||
default Set<AfterInterceptor> getAfterInterceptor() {
|
||||
|
||||
Set<Class<? extends AfterInterceptor>> afterInterceptorClassSet =
|
||||
reflections.getSubTypesOf(AfterInterceptor.class);
|
||||
if (afterInterceptorClassSet == null) {
|
||||
return null;
|
||||
}
|
||||
return CommonUtil.sortClassSet(afterInterceptorClassSet);
|
||||
default void fireTextResponse(RoutingContext ctx, String text) {
|
||||
ctx.response().putHeader("content-type", "text/html; charset=utf-8").end(text);
|
||||
}
|
||||
|
||||
default void handleAfterInterceptor(RoutingContext ctx, JsonObject jsonObject) {
|
||||
Set<AfterInterceptor> afterInterceptor = getAfterInterceptor();
|
||||
if (afterInterceptor != null) {
|
||||
afterInterceptor.forEach(ai -> ai.handle(ctx, jsonObject));
|
||||
}
|
||||
if (!ctx.response().ended()) {
|
||||
fireTextResponse(ctx, "handleAfterInterceptor: response not end");
|
||||
}
|
||||
default void sendError(int statusCode, RoutingContext ctx) {
|
||||
ctx.response().setStatusCode(statusCode).end();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,10 +5,9 @@ import cn.qaiu.vx.core.annotaions.RouteHandler;
|
||||
import cn.qaiu.vx.core.annotaions.RouteMapping;
|
||||
import cn.qaiu.vx.core.annotaions.SockRouteMapper;
|
||||
import cn.qaiu.vx.core.base.BaseHttpApi;
|
||||
import cn.qaiu.vx.core.interceptor.BeforeInterceptor;
|
||||
import cn.qaiu.vx.core.enums.MIMEType;
|
||||
import cn.qaiu.vx.core.model.JsonResult;
|
||||
import cn.qaiu.vx.core.util.*;
|
||||
import io.netty.handler.codec.http.HttpHeaderValues;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.core.MultiMap;
|
||||
@@ -20,12 +19,15 @@ import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.Route;
|
||||
import io.vertx.ext.web.Router;
|
||||
import io.vertx.ext.web.RoutingContext;
|
||||
import io.vertx.ext.web.handler.*;
|
||||
import io.vertx.ext.web.handler.BodyHandler;
|
||||
import io.vertx.ext.web.handler.CorsHandler;
|
||||
import io.vertx.ext.web.handler.StaticHandler;
|
||||
import io.vertx.ext.web.handler.sockjs.SockJSHandler;
|
||||
import io.vertx.ext.web.handler.sockjs.SockJSHandlerOptions;
|
||||
import javassist.CtClass;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.reflections.Reflections;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -36,7 +38,6 @@ import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static cn.qaiu.vx.core.util.ConfigConstant.ROUTE_TIME_OUT;
|
||||
import static io.vertx.core.http.HttpHeaders.*;
|
||||
|
||||
/**
|
||||
@@ -56,11 +57,15 @@ public class RouterHandlerFactory implements BaseHttpApi {
|
||||
add(HttpMethod.DELETE);
|
||||
add(HttpMethod.HEAD);
|
||||
}};
|
||||
// 需要扫描注册的Router路径
|
||||
private static volatile Reflections reflections;
|
||||
|
||||
private final String gatewayPrefix;
|
||||
|
||||
public RouterHandlerFactory(String gatewayPrefix) {
|
||||
public RouterHandlerFactory(String routerScanAddress, String gatewayPrefix) {
|
||||
Objects.requireNonNull(routerScanAddress, "The router package address scan is empty.");
|
||||
Objects.requireNonNull(gatewayPrefix, "The gateway prefix is empty.");
|
||||
reflections = ReflectionUtil.getReflections(routerScanAddress);
|
||||
this.gatewayPrefix = gatewayPrefix;
|
||||
}
|
||||
|
||||
@@ -68,22 +73,21 @@ public class RouterHandlerFactory implements BaseHttpApi {
|
||||
* 开始扫描并注册handler
|
||||
*/
|
||||
public Router createRouter() {
|
||||
// 主路由
|
||||
Router mainRouter = Router.router(VertxHolder.getVertxInstance());
|
||||
Router router = Router.router(VertxHolder.getVertxInstance());
|
||||
|
||||
// 静态资源
|
||||
String path = SharedDataUtil.getJsonConfig("server")
|
||||
.getString("staticResourcePath");
|
||||
if (!StringUtils.isEmpty(path)) {
|
||||
// 静态资源
|
||||
mainRouter.route("/*").handler(StaticHandler
|
||||
router.route("/*").handler(StaticHandler
|
||||
.create(path)
|
||||
.setCachingEnabled(true)
|
||||
.setDefaultContentEncoding("UTF-8"));
|
||||
}
|
||||
|
||||
|
||||
mainRouter.route().handler(ctx -> {
|
||||
router.route().handler(ctx -> {
|
||||
LOGGER.debug("The HTTP service request address information ===>path:{}, uri:{}, method:{}",
|
||||
ctx.request().path(), ctx.request().absoluteURI(), ctx.request().method());
|
||||
ctx.response().headers().add(ACCESS_CONTROL_ALLOW_ORIGIN, "*");
|
||||
@@ -94,15 +98,11 @@ public class RouterHandlerFactory implements BaseHttpApi {
|
||||
ctx.next();
|
||||
});
|
||||
// 添加跨域的方法
|
||||
mainRouter.route().handler(CorsHandler.create().addRelativeOrigin(".*").allowCredentials(true).allowedMethods(httpMethods));
|
||||
router.route().handler(CorsHandler.create().addRelativeOrigin(".*").allowCredentials(true).allowedMethods(httpMethods));
|
||||
|
||||
// 配置文件上传路径
|
||||
mainRouter.route().handler(BodyHandler.create().setUploadsDirectory("uploads"));
|
||||
router.route().handler(BodyHandler.create().setUploadsDirectory("uploads"));
|
||||
|
||||
// 拦截器
|
||||
Set<Handler<RoutingContext>> interceptorSet = getInterceptorSet();
|
||||
Route route0 = mainRouter.route("/*");
|
||||
interceptorSet.forEach(route0::handler);
|
||||
|
||||
try {
|
||||
Set<Class<?>> handlers = reflections.getTypesAnnotatedWith(RouteHandler.class);
|
||||
@@ -116,7 +116,7 @@ public class RouterHandlerFactory implements BaseHttpApi {
|
||||
for (Class<?> handler : sortedHandlers) {
|
||||
try {
|
||||
// 注册请求处理方法
|
||||
registerNewHandler(mainRouter, handler);
|
||||
registerNewHandler(router, handler);
|
||||
} catch (Throwable e) {
|
||||
LOGGER.error("Error register {}, Error details:", handler, e.getCause());
|
||||
|
||||
@@ -126,12 +126,12 @@ public class RouterHandlerFactory implements BaseHttpApi {
|
||||
LOGGER.error("Manually Register Handler Fail, Error details:" + e.getMessage());
|
||||
}
|
||||
// 错误请求处理
|
||||
mainRouter.errorHandler(405, ctx -> doFireJsonResultResponse(ctx, JsonResult
|
||||
router.errorHandler(405, ctx -> fireJsonResponse(ctx, JsonResult
|
||||
.error("Method Not Allowed", 405)));
|
||||
mainRouter.errorHandler(404, ctx -> ctx.response().setStatusCode(404).setChunked(true)
|
||||
router.errorHandler(404, ctx -> ctx.response().setStatusCode(404).setChunked(true)
|
||||
.end("Internal server error: 404 not found"));
|
||||
|
||||
return mainRouter;
|
||||
return router;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -155,13 +155,15 @@ public class RouterHandlerFactory implements BaseHttpApi {
|
||||
method -> method.isAnnotationPresent(SockRouteMapper.class)
|
||||
).toList());
|
||||
|
||||
// 拦截器
|
||||
Handler<RoutingContext> interceptor = getInterceptor();
|
||||
// 依次注册处理方法
|
||||
for (Method method : methodList) {
|
||||
if (method.isAnnotationPresent(RouteMapping.class)) {
|
||||
// 普通路由
|
||||
RouteMapping mapping = method.getAnnotation(RouteMapping.class);
|
||||
HttpMethod routeMethod = HttpMethod.valueOf(mapping.method().name());
|
||||
String routeUrl = getRouteUrl(mapping.value());
|
||||
String routeUrl = getRouteUrl(method.getName(), mapping.value());
|
||||
String url = root.concat(routeUrl);
|
||||
// 匹配方法
|
||||
Route route = router.route(routeMethod, url);
|
||||
@@ -171,18 +173,17 @@ public class RouterHandlerFactory implements BaseHttpApi {
|
||||
route.consumes(mineType);
|
||||
}
|
||||
|
||||
// 设置默认超时
|
||||
route.handler(TimeoutHandler.create(SharedDataUtil.getCustomConfig().getInteger(ROUTE_TIME_OUT)));
|
||||
route.handler(ResponseTimeHandler.create());
|
||||
// 先执行拦截方法, 再进入业务请求
|
||||
route.handler(interceptor);
|
||||
route.handler(ctx -> handlerMethod(instance, method, ctx)).failureHandler(ctx -> {
|
||||
if (ctx.response().ended()) return;
|
||||
ctx.failure().printStackTrace();
|
||||
doFireJsonResultResponse(ctx, JsonResult.error(ctx.failure().getMessage(), 500));
|
||||
fireJsonResponse(ctx, JsonResult.error(ctx.failure().getMessage(), 500));
|
||||
});
|
||||
} else if (method.isAnnotationPresent(SockRouteMapper.class)) {
|
||||
// websocket 基于sockJs
|
||||
SockRouteMapper mapping = method.getAnnotation(SockRouteMapper.class);
|
||||
String routeUrl = getRouteUrl(mapping.value());
|
||||
String routeUrl = getRouteUrl(method.getName(), mapping.value());
|
||||
String url = root.concat(routeUrl);
|
||||
LOGGER.info("Register New Websocket Handler -> {}", url);
|
||||
SockJSHandlerOptions options = new SockJSHandlerOptions()
|
||||
@@ -209,9 +210,10 @@ public class RouterHandlerFactory implements BaseHttpApi {
|
||||
/**
|
||||
* 获取并处理路由URL分隔符
|
||||
*
|
||||
* @param methodName 路由method
|
||||
* @return String
|
||||
*/
|
||||
private String getRouteUrl(String mapperValue) {
|
||||
private String getRouteUrl(String methodName, String mapperValue) {
|
||||
String routeUrl;
|
||||
if ("/".equals(mapperValue)) {
|
||||
routeUrl = mapperValue;
|
||||
@@ -227,10 +229,15 @@ public class RouterHandlerFactory implements BaseHttpApi {
|
||||
* 配置拦截
|
||||
*
|
||||
* @return Handler
|
||||
* @throws Throwable Throwable
|
||||
*/
|
||||
private Set<Handler<RoutingContext>> getInterceptorSet() {
|
||||
private Handler<RoutingContext> getInterceptor() throws Throwable {
|
||||
// 配置拦截
|
||||
return getBeforeInterceptor().stream().map(BeforeInterceptor::doHandle).collect(Collectors.toSet());
|
||||
Class<?> interceptorClass = Class.forName(SharedDataUtil.getValueForCustomConfig("interceptorClassPath"));
|
||||
Object handleInstance = ReflectionUtil.newWithNoParam(interceptorClass);
|
||||
Method doHandle = interceptorClass.getMethod("doHandle");
|
||||
// 反射调用
|
||||
return CastUtil.cast(ReflectionUtil.invoke(doHandle, handleInstance));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -252,7 +259,7 @@ public class RouterHandlerFactory implements BaseHttpApi {
|
||||
if (handler.isAnnotationPresent(RouteHandler.class)) {
|
||||
RouteHandler routeHandler = handler.getAnnotation(RouteHandler.class);
|
||||
String value = routeHandler.value();
|
||||
root += (value.startsWith("/") ? value.substring(1) : value);
|
||||
root += ("/".equals(value) ? "" : value);
|
||||
}
|
||||
if (!root.endsWith("/")) {
|
||||
root = root + "/";
|
||||
@@ -295,12 +302,37 @@ public class RouterHandlerFactory implements BaseHttpApi {
|
||||
});
|
||||
}
|
||||
|
||||
JsonArray entityPackagesReg = SharedDataUtil.getJsonArrayForCustomConfig("entityPackagesReg");
|
||||
|
||||
final MultiMap queryParams = ctx.queryParams();
|
||||
if ("POST".equals(ctx.request().method().name())) {
|
||||
queryParams.addAll(ctx.request().params());
|
||||
}
|
||||
|
||||
JsonArray entityPackagesReg = SharedDataUtil.getJsonArrayForCustomConfig("entityPackagesReg");
|
||||
// 绑定get或post请求头的请求参数
|
||||
methodParametersTemp.forEach((k, v) -> {
|
||||
if (ReflectionUtil.isBasicType(v.getRight())) {
|
||||
String fmt = getFmt(v.getLeft(), v.getRight());
|
||||
String value = queryParams.get(k);
|
||||
parameterValueList.put(k, ReflectionUtil.conversion(v.getRight(), value, fmt));
|
||||
} else if (RoutingContext.class.getName().equals(v.getRight().getName())) {
|
||||
parameterValueList.put(k, ctx);
|
||||
} else if (HttpServerRequest.class.getName().equals(v.getRight().getName())) {
|
||||
parameterValueList.put(k, ctx.request());
|
||||
} else if (HttpServerResponse.class.getName().equals(v.getRight().getName())) {
|
||||
parameterValueList.put(k, ctx.response());
|
||||
} else if (CommonUtil.matchRegList(entityPackagesReg.getList(), v.getRight().getName())) {
|
||||
// 绑定实体类
|
||||
try {
|
||||
Class<?> aClass = Class.forName(v.getRight().getName());
|
||||
Object entity = ParamUtil.multiMapToEntity(queryParams, aClass);
|
||||
parameterValueList.put(k, entity);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
// 解析body-json参数
|
||||
if (HttpHeaderValues.APPLICATION_JSON.toString().equals(ctx.parsedHeaders().contentType().value())
|
||||
&& ctx.body().asJsonObject() != null) {
|
||||
if ("application/json".equals(ctx.parsedHeaders().contentType().value()) && ctx.body().asJsonObject() != null) {
|
||||
JsonObject body = ctx.body().asJsonObject();
|
||||
if (body != null) {
|
||||
methodParametersTemp.forEach((k, v) -> {
|
||||
@@ -320,66 +352,26 @@ public class RouterHandlerFactory implements BaseHttpApi {
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (ctx.body() != null) {
|
||||
queryParams.addAll(ParamUtil.paramsToMap(ctx.body().asString()));
|
||||
}
|
||||
|
||||
// 解析其他参数
|
||||
if ("POST".equals(ctx.request().method().name())) {
|
||||
queryParams.addAll(ctx.request().params());
|
||||
}
|
||||
// 绑定get或post请求头的请求参数
|
||||
methodParametersTemp.forEach((k, v) -> {
|
||||
if (ReflectionUtil.isBasicType(v.getRight())) {
|
||||
String fmt = getFmt(v.getLeft(), v.getRight());
|
||||
String value = queryParams.get(k);
|
||||
parameterValueList.put(k, ReflectionUtil.conversion(v.getRight(), value, fmt));
|
||||
} else if (RoutingContext.class.getName().equals(v.getRight().getName())) {
|
||||
parameterValueList.put(k, ctx);
|
||||
} else if (HttpServerRequest.class.getName().equals(v.getRight().getName())) {
|
||||
parameterValueList.put(k, ctx.request());
|
||||
} else if (HttpServerResponse.class.getName().equals(v.getRight().getName())) {
|
||||
parameterValueList.put(k, ctx.response());
|
||||
} else if (parameterValueList.get(k) == null
|
||||
&& CommonUtil.matchRegList(entityPackagesReg.getList(), v.getRight().getName())) {
|
||||
// 绑定实体类
|
||||
try {
|
||||
Class<?> aClass = Class.forName(v.getRight().getName());
|
||||
Object entity = ParamUtil.multiMapToEntity(queryParams, aClass);
|
||||
parameterValueList.put(k, entity);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
// 调用handle 获取响应对象
|
||||
Object[] parameterValueArray = parameterValueList.values().toArray(new Object[0]);
|
||||
try {
|
||||
// 反射调用
|
||||
Object data = ReflectionUtil.invokeWithArguments(method, instance, parameterValueArray);
|
||||
if (data != null) {
|
||||
|
||||
if (data instanceof JsonResult) {
|
||||
doFireJsonResultResponse(ctx, (JsonResult<?>) data);
|
||||
}
|
||||
if (data instanceof JsonObject) {
|
||||
doFireJsonObjectResponse(ctx, ((JsonObject) data));
|
||||
fireJsonResponse(ctx, data);
|
||||
} else if (data instanceof Future) { // 处理异步响应
|
||||
((Future<?>) data).onSuccess(res -> {
|
||||
if (res instanceof JsonResult) {
|
||||
doFireJsonResultResponse(ctx, (JsonResult<?>) res);
|
||||
}
|
||||
if (res instanceof JsonObject) {
|
||||
doFireJsonObjectResponse(ctx, ((JsonObject) res));
|
||||
fireJsonResponse(ctx, res);
|
||||
} else if (res != null) {
|
||||
doFireJsonResultResponse(ctx, JsonResult.data(res));
|
||||
} else {
|
||||
handleAfterInterceptor(ctx, null);
|
||||
fireJsonResponse(ctx, JsonResult.data(res));
|
||||
}
|
||||
|
||||
}).onFailure(e -> doFireJsonResultResponse(ctx, JsonResult.error(e.getMessage())));
|
||||
}).onFailure(e -> fireJsonResponse(ctx, JsonResult.error(e.getMessage())));
|
||||
} else {
|
||||
doFireJsonResultResponse(ctx, JsonResult.data(data));
|
||||
ctx.response().headers().set(CONTENT_TYPE, MIMEType.TEXT_HTML.getValue());
|
||||
ctx.end(data.toString());
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
@@ -392,7 +384,7 @@ public class RouterHandlerFactory implements BaseHttpApi {
|
||||
err = e.getCause().getMessage();
|
||||
}
|
||||
}
|
||||
doFireJsonResultResponse(ctx, JsonResult.error(err));
|
||||
fireJsonResponse(ctx, JsonResult.error(err));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -410,13 +402,4 @@ public class RouterHandlerFactory implements BaseHttpApi {
|
||||
}
|
||||
return fmt;
|
||||
}
|
||||
|
||||
private Set<BeforeInterceptor> getBeforeInterceptor() {
|
||||
Set<Class<? extends BeforeInterceptor>> interceptorClassSet =
|
||||
reflections.getSubTypesOf(BeforeInterceptor.class);
|
||||
if (interceptorClassSet == null) {
|
||||
return new HashSet<>();
|
||||
}
|
||||
return CommonUtil.sortClassSet(interceptorClassSet);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package cn.qaiu.vx.core.interceptor;
|
||||
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.RoutingContext;
|
||||
|
||||
/**
|
||||
* 后置拦截器接口
|
||||
*
|
||||
* @author <a href="https://qaiu.top">QAIU</a>
|
||||
*/
|
||||
public interface AfterInterceptor {
|
||||
|
||||
void handle(RoutingContext ctx, JsonObject responseData);
|
||||
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
package cn.qaiu.vx.core.interceptor;
|
||||
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.ext.web.RoutingContext;
|
||||
|
||||
import static cn.qaiu.vx.core.util.ResponseUtil.sendError;
|
||||
|
||||
/**
|
||||
* 前置拦截器接口
|
||||
*
|
||||
* @author <a href="https://qaiu.top">QAIU</a>
|
||||
*/
|
||||
public interface BeforeInterceptor extends Handler<RoutingContext> {
|
||||
String IS_NEXT = "RoutingContextIsNext";
|
||||
|
||||
default Handler<RoutingContext> doHandle() {
|
||||
|
||||
return ctx -> {
|
||||
ctx.put(IS_NEXT, false);
|
||||
BeforeInterceptor.this.handle(ctx);
|
||||
if (!(Boolean) ctx.get(IS_NEXT) && !ctx.response().ended()) {
|
||||
sendError(ctx, 403);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
default void doNext(RoutingContext context) {
|
||||
context.put(IS_NEXT, true);
|
||||
context.next();
|
||||
}
|
||||
|
||||
void handle(RoutingContext context);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package cn.qaiu.vx.core.interceptor;
|
||||
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.ext.web.RoutingContext;
|
||||
|
||||
/**
|
||||
* 拦截器接口
|
||||
* <br>Create date 2021-05-06 09:20:37
|
||||
*
|
||||
* @author <a href="https://qaiu.top">QAIU</a>
|
||||
*/
|
||||
public interface Interceptor {
|
||||
|
||||
default Handler<RoutingContext> doHandle() {
|
||||
return this::beforeHandle;
|
||||
}
|
||||
|
||||
void beforeHandle(RoutingContext context);
|
||||
|
||||
void afterHandle(RoutingContext context);
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
package cn.qaiu.vx.core.model;
|
||||
|
||||
|
||||
import cn.qaiu.vx.core.util.CastUtil;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.io.Serial;
|
||||
@@ -162,16 +159,4 @@ public class JsonResult<T> implements Serializable {
|
||||
public static <T> JsonResult<T> success() {
|
||||
return new JsonResult<>(SUCCESS_CODE, SUCCESS_MESSAGE, true, null);
|
||||
}
|
||||
|
||||
// 转为json对象
|
||||
public JsonObject toJsonObject() {
|
||||
return JsonObject.mapFrom(this);
|
||||
}
|
||||
|
||||
private static final ObjectMapper mapper = new ObjectMapper();
|
||||
|
||||
// 转为json对象
|
||||
public static JsonResult<?> toJsonResult(JsonObject json) {
|
||||
return CastUtil.cast(json.mapTo(JsonResult.class));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package cn.qaiu.vx.core.util;
|
||||
|
||||
import cn.qaiu.vx.core.annotaions.HandleSortFilter;
|
||||
import io.vertx.core.buffer.Buffer;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import org.apache.commons.beanutils.ConvertUtils;
|
||||
@@ -16,8 +15,6 @@ import java.net.URL;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* CommonUtil
|
||||
@@ -73,11 +70,10 @@ public class CommonUtil {
|
||||
} catch (UnknownHostException e) {
|
||||
return false;
|
||||
}
|
||||
try (Socket ignored = new Socket(Address, port)) {
|
||||
//建立一个Socket连接
|
||||
try(Socket ignored = new Socket(Address, port)) {
|
||||
//建立一个Socket连接
|
||||
flag = true;
|
||||
} catch (IOException ignoredException) {
|
||||
}
|
||||
} catch (IOException ignoredException) {}
|
||||
return flag;
|
||||
}
|
||||
|
||||
@@ -130,32 +126,4 @@ public class CommonUtil {
|
||||
LocalConstant.put(configName, map);
|
||||
LOGGER.info("读取配置{}成功", configName);
|
||||
}
|
||||
|
||||
public static <T> Set<T> sortClassSet(Set<Class<? extends T>> set) {
|
||||
return set.stream().filter(c1 -> {
|
||||
HandleSortFilter s1 = c1.getAnnotation(HandleSortFilter.class);
|
||||
if (s1 != null) {
|
||||
return s1.value() > 0;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}).sorted((c1, c2) -> {
|
||||
HandleSortFilter s1 = c1.getAnnotation(HandleSortFilter.class);
|
||||
HandleSortFilter s2 = c2.getAnnotation(HandleSortFilter.class);
|
||||
int n1 = 0, n2 = 0;
|
||||
if (s1 != null) {
|
||||
n1 = s1.value();
|
||||
}
|
||||
if (s2 != null) {
|
||||
n2 = s2.value();
|
||||
}
|
||||
return n1 - n2;
|
||||
}).map(c -> {
|
||||
try {
|
||||
return ReflectionUtil.newWithNoParam(c);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}).collect(Collectors.toSet());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,14 +3,11 @@ package cn.qaiu.vx.core.util;
|
||||
public interface ConfigConstant {
|
||||
String CUSTOM = "custom";
|
||||
String VERTX = "vertx";
|
||||
|
||||
String EVENT_LOOP_POOL_SIZE = "eventLoopPoolSize";
|
||||
String LOCAL = "local";
|
||||
String SERVER = "server";
|
||||
String GLOBAL_CONFIG = "globalConfig";
|
||||
String CUSTOM_CONFIG = "customConfig";
|
||||
String ASYNC_SERVICE_INSTANCES = "asyncServiceInstances";
|
||||
String IGNORES_REG="ignoresReg";
|
||||
String BASE_LOCATIONS="baseLocations";
|
||||
|
||||
String ROUTE_TIME_OUT="routeTimeOut";
|
||||
}
|
||||
|
||||
@@ -27,12 +27,12 @@ public final class ParamUtil {
|
||||
return map;
|
||||
}
|
||||
|
||||
public static <T> T multiMapToEntity(MultiMap multiMap, Class<T> tClass) throws NoSuchMethodException {
|
||||
Map<String, String> map = multiMapToMap(multiMap);
|
||||
public static <T> T multiMapToEntity(MultiMap multiMap,Class<T> tClass) throws NoSuchMethodException {
|
||||
Map<String,String> map = multiMapToMap(multiMap);
|
||||
T obj = null;
|
||||
try {
|
||||
obj = tClass.getDeclaredConstructor().newInstance();
|
||||
BeanUtils.populate(obj, map);
|
||||
BeanUtils.populate(obj,map);
|
||||
} catch (InstantiationException | IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
LOGGER.error("实例化异常");
|
||||
@@ -42,21 +42,4 @@ public final class ParamUtil {
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
public static MultiMap paramsToMap(String paramString) {
|
||||
MultiMap entries = MultiMap.caseInsensitiveMultiMap();
|
||||
if (paramString == null) return entries;
|
||||
String[] params = paramString.split("&");
|
||||
if (params.length == 0) return entries;
|
||||
for (String param : params) {
|
||||
String[] kv = param.split("=");
|
||||
if (kv.length == 2) {
|
||||
entries.set(kv[0], kv[1]);
|
||||
} else {
|
||||
entries.set(kv[0], "");
|
||||
}
|
||||
}
|
||||
return entries;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,8 +24,6 @@ import java.net.URL;
|
||||
import java.text.ParseException;
|
||||
import java.util.*;
|
||||
|
||||
import static cn.qaiu.vx.core.util.ConfigConstant.BASE_LOCATIONS;
|
||||
|
||||
/**
|
||||
* 基于org.reflection和javassist的反射工具包
|
||||
* 通过包扫描实现路由地址的注解映射
|
||||
@@ -35,16 +33,6 @@ import static cn.qaiu.vx.core.util.ConfigConstant.BASE_LOCATIONS;
|
||||
*/
|
||||
public final class ReflectionUtil {
|
||||
|
||||
|
||||
/**
|
||||
* 以默认配置的基础包路径获取反射器
|
||||
*
|
||||
* @return Reflections object
|
||||
*/
|
||||
public static Reflections getReflections() {
|
||||
return getReflections(SharedDataUtil.getStringForCustomConfig(BASE_LOCATIONS));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取反射器
|
||||
*
|
||||
@@ -60,7 +48,6 @@ public final class ReflectionUtil {
|
||||
} else {
|
||||
packageAddressList = Collections.singletonList(packageAddress);
|
||||
}
|
||||
|
||||
return getReflections(packageAddressList);
|
||||
}
|
||||
|
||||
@@ -83,11 +70,10 @@ public final class ReflectionUtil {
|
||||
// 发现注解api层 没有继承父类时 这里反射一直有问题(Scanner SubTypesScanner was not configured)
|
||||
// 因此这里需要手动配置各种Scanner扫描器 -- https://blog.csdn.net/qq_29499107/article/details/106889781
|
||||
configurationBuilder.setScanners(
|
||||
Scanners.SubTypes.filterResultsBy(s -> true), //允许getAllTypes获取所有Object的子类, 不设置为false则 getAllTypes
|
||||
// 会报错.默认为true.
|
||||
Scanners.SubTypes.filterResultsBy(s -> true), //允许getAllTypes获取所有Object的子类, 不设置为false则 getAllTypes 会报错.默认为true.
|
||||
new MethodParameterNamesScanner(), //设置方法参数名称 扫描器,否则调用getConstructorParamNames 会报错
|
||||
Scanners.MethodsAnnotated, //设置方法注解 扫描器, 否则getConstructorsAnnotatedWith,getMethodsAnnotatedWith 会报错
|
||||
new MemberUsageScanner(), //设置 member 扫描器,否则 getMethodUsage 会报错
|
||||
new MemberUsageScanner(), //设置 member 扫描器,否则 getMethodUsage 会报错, 不推荐使用,有可能会报错 Caused by: java.lang.ClassCastException: javassist.bytecode.InterfaceMethodrefInfo cannot be cast to javassist.bytecode.MethodrefInfo
|
||||
Scanners.TypesAnnotated //设置类注解 扫描器 ,否则 getTypesAnnotatedWith 会报错
|
||||
);
|
||||
|
||||
@@ -112,8 +98,7 @@ public final class ReflectionUtil {
|
||||
MethodInfo methodInfo = cm.getMethodInfo();
|
||||
CtClass[] parameterTypes = cm.getParameterTypes();
|
||||
CodeAttribute codeAttribute = methodInfo.getCodeAttribute();
|
||||
LocalVariableAttribute attr =
|
||||
(LocalVariableAttribute) codeAttribute.getAttribute(LocalVariableAttribute.tag);
|
||||
LocalVariableAttribute attr = (LocalVariableAttribute) codeAttribute.getAttribute(LocalVariableAttribute.tag);
|
||||
|
||||
boolean flag = true;
|
||||
boolean flag2 = cm.getModifiers() - 1 != AccessFlag.STATIC;
|
||||
@@ -125,8 +110,7 @@ public final class ReflectionUtil {
|
||||
continue;
|
||||
}
|
||||
flag = false;
|
||||
paramMap.put(attr.variableName(j + (flag2 ? 1 : 0)), Pair.of(parameterAnnotations[j - k],
|
||||
parameterTypes[j - k]));
|
||||
paramMap.put(attr.variableName(j + (flag2 ? 1 : 0)), Pair.of(parameterAnnotations[j - k], parameterTypes[j - k]));
|
||||
}
|
||||
} catch (NotFoundException e) {
|
||||
e.printStackTrace();
|
||||
@@ -230,8 +214,7 @@ public final class ReflectionUtil {
|
||||
if (ctClass.isPrimitive() || "java.util.Date".equals(ctClass.getName())) {
|
||||
return true;
|
||||
}
|
||||
return ctClass.getName().matches("^java\\.lang\\.((Boolean)|(Character)|(Byte)|(Short)|(Integer)|(Long)|" +
|
||||
"(Float)|(Double)|(String))$");
|
||||
return ctClass.getName().matches("^java\\.lang\\.((Boolean)|(Character)|(Byte)|(Short)|(Integer)|(Long)|(Float)|(Double)|(String))$");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -255,8 +238,7 @@ public final class ReflectionUtil {
|
||||
* @throws InstantiationException InstantiationException
|
||||
* @throws IllegalAccessException IllegalAccessException
|
||||
*/
|
||||
public static <T> T newWithNoParam(Class<T> handler) throws NoSuchMethodException, InvocationTargetException,
|
||||
InstantiationException, IllegalAccessException {
|
||||
public static <T> T newWithNoParam(Class<T> handler) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
|
||||
return handler.getConstructor().newInstance();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
package cn.qaiu.vx.core.util;
|
||||
|
||||
import cn.qaiu.vx.core.model.JsonResult;
|
||||
import io.vertx.core.Promise;
|
||||
import io.vertx.core.http.HttpHeaders;
|
||||
import io.vertx.core.http.HttpServerResponse;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.RoutingContext;
|
||||
|
||||
import static io.vertx.core.http.HttpHeaders.CONTENT_TYPE;
|
||||
|
||||
public class ResponseUtil {
|
||||
|
||||
public static void redirect(HttpServerResponse response, String url) {
|
||||
response.putHeader(HttpHeaders.LOCATION, url).setStatusCode(302).end();
|
||||
}
|
||||
|
||||
public static void redirect(HttpServerResponse response, String url, Promise<?> promise) {
|
||||
redirect(response, url);
|
||||
promise.complete();
|
||||
}
|
||||
|
||||
public static void fireJsonObjectResponse(RoutingContext ctx, JsonObject jsonObject) {
|
||||
ctx.response().putHeader(CONTENT_TYPE, "application/json; charset=utf-8")
|
||||
.setStatusCode(200)
|
||||
.end(jsonObject.encode());
|
||||
}
|
||||
|
||||
public static <T> void fireJsonResultResponse(RoutingContext ctx, JsonResult<T> jsonResult) {
|
||||
fireJsonObjectResponse(ctx, jsonResult.toJsonObject());
|
||||
}
|
||||
|
||||
public static void fireTextResponse(RoutingContext ctx, String text) {
|
||||
ctx.response().putHeader(CONTENT_TYPE, "text/html; charset=utf-8").end(text);
|
||||
}
|
||||
|
||||
public static void sendError(RoutingContext ctx, int statusCode) {
|
||||
ctx.response().setStatusCode(statusCode).end();
|
||||
}
|
||||
}
|
||||
@@ -32,11 +32,11 @@ public class SharedDataUtil {
|
||||
return (JsonObject) localMap.get(key);
|
||||
}
|
||||
|
||||
public static JsonObject getCustomConfig() {
|
||||
return getJsonConfig("customConfig");
|
||||
public static JsonObject getJsonObjectForCustomConfig(String key) {
|
||||
return getJsonConfig("customConfig").getJsonObject(key);
|
||||
}
|
||||
|
||||
public static String getStringForCustomConfig(String key) {
|
||||
public static String getJsonStringForCustomConfig(String key) {
|
||||
return getJsonConfig("customConfig").getString(key);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.qaiu.lz.common.util;
|
||||
package cn.qaiu.vx.core.util;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
@@ -30,8 +30,6 @@ public class SnowflakeIdWorker {
|
||||
|
||||
// ==============================Fields===========================================
|
||||
|
||||
//开始时间截 (2021-01-01)
|
||||
private static final long EPOCH = 1609459200000L;
|
||||
/**
|
||||
* 机器id所占的位数
|
||||
*/
|
||||
@@ -96,7 +94,7 @@ public class SnowflakeIdWorker {
|
||||
*
|
||||
* @return SnowflakeId
|
||||
*/
|
||||
public synchronized Long nextId() {
|
||||
public synchronized long nextId() {
|
||||
long timestamp = timeGen();
|
||||
|
||||
//如果当前时间小于上一次ID生成的时间戳,说明系统时钟回退过这个时候应当抛出异常
|
||||
@@ -135,7 +133,9 @@ public class SnowflakeIdWorker {
|
||||
//时间截向左移22位(5+5+12)
|
||||
long timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits;
|
||||
|
||||
return ((timestamp - EPOCH) << timestampLeftShift) //
|
||||
//开始时间截 (2021-01-01)
|
||||
long twepoch = 1609459200000L;
|
||||
return ((timestamp - twepoch) << timestampLeftShift) //
|
||||
| (datacenterId << datacenterIdShift) //
|
||||
| (workerId << sequenceBits) //
|
||||
| sequence;
|
||||
@@ -214,18 +214,30 @@ public class SnowflakeIdWorker {
|
||||
return snowflakeIdWorker;
|
||||
}
|
||||
|
||||
synchronized public static Long getLongId() {
|
||||
return snowflakeIdWorker.nextId();
|
||||
}
|
||||
|
||||
synchronized public static String getStringId() {
|
||||
return snowflakeIdWorker.nextId().toString();
|
||||
}
|
||||
|
||||
synchronized public static SnowflakeIdWorker idWorkerCluster(long workerId, long datacenterId) {
|
||||
if (snowflakeIdWorkerCluster == null) {
|
||||
snowflakeIdWorkerCluster = new SnowflakeIdWorker(workerId, datacenterId);
|
||||
}
|
||||
return snowflakeIdWorkerCluster;
|
||||
}
|
||||
//==============================Test=============================================
|
||||
|
||||
/**
|
||||
* 测试
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
final SnowflakeIdWorker snowflakeIdWorkerCluster = idWorkerCluster(0, 1);
|
||||
final SnowflakeIdWorker idWorker = idWorker();
|
||||
for (int i = 0; i < 100; i++) {
|
||||
long id = idWorker.nextId();
|
||||
System.out.println(Long.toBinaryString(id));
|
||||
System.out.println(id);
|
||||
System.out.println("------------");
|
||||
id = snowflakeIdWorkerCluster.nextId();
|
||||
System.out.println(Long.toBinaryString(id));
|
||||
System.out.println(id);
|
||||
System.out.println("------------\n");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ public class RouterVerticle extends AbstractVerticle {
|
||||
|
||||
private static final int port = SharedDataUtil.getValueForServerConfig("port");
|
||||
private static final Router router = new RouterHandlerFactory(
|
||||
SharedDataUtil.getJsonStringForCustomConfig("routerLocations"),
|
||||
SharedDataUtil.getJsonStringForServerConfig("contextPath")).createRouter();
|
||||
|
||||
private static final JsonObject globalConfig = SharedDataUtil.getJsonConfig("globalConfig");
|
||||
|
||||
@@ -3,6 +3,7 @@ package cn.qaiu.vx.core.verticle;
|
||||
import cn.qaiu.vx.core.annotaions.Service;
|
||||
import cn.qaiu.vx.core.base.BaseAsyncService;
|
||||
import cn.qaiu.vx.core.util.ReflectionUtil;
|
||||
import cn.qaiu.vx.core.util.SharedDataUtil;
|
||||
import io.vertx.core.AbstractVerticle;
|
||||
import io.vertx.core.Promise;
|
||||
import io.vertx.serviceproxy.ServiceBinder;
|
||||
@@ -26,7 +27,8 @@ public class ServiceVerticle extends AbstractVerticle {
|
||||
private static final Set<Class<?>> handlers;
|
||||
|
||||
static {
|
||||
Reflections reflections = ReflectionUtil.getReflections();
|
||||
String handlerLocations = SharedDataUtil.getJsonStringForCustomConfig("handlerLocations");
|
||||
Reflections reflections = ReflectionUtil.getReflections(handlerLocations);
|
||||
handlers = reflections.getTypesAnnotatedWith(Service.class);
|
||||
}
|
||||
|
||||
|
||||
24
note.txt
24
note.txt
@@ -1,24 +0,0 @@
|
||||
直链缓存设计
|
||||
每个网盘对应的标准分享URL如下
|
||||
|
||||
蓝奏云 (lz) https://lanzoux.com/{shareKey}
|
||||
蓝奏云优享 (iz) https://www.ilanzou.com/s/{shareKey}
|
||||
奶牛快传 (cow) https://cowtransfer.com/s/{shareKey}
|
||||
移动云云空间 (ec) https://www.ecpan.cn/web/#/yunpanProxy?path=%2F%23%2Fdrive%2Foutside&data={shareKey}&isShare=1
|
||||
小飞机网盘 (fj) https://share.feijipan.com/s/{shareKey}
|
||||
亿方云 (fc) https://v2.fangcloud.com/sharing/{shareKey}
|
||||
123云盘 (ye) https://www.123pan.com/s/{shareKey}.html
|
||||
文叔叔 (ws) https://f.ws59.cn/f/{shareKey}
|
||||
联想乐云 (le) https://lecloud.lenovo.com/share/{shareKey}
|
||||
|
||||
私有化网盘需要自己的域名也就是origin地址.
|
||||
Cloudreve自建网盘 (ce) {origin}/s/{shareKey}
|
||||
|
||||
分享URL -> 类型+key
|
||||
类型+key -> 标准分享URL
|
||||
|
||||
缓存key -> 下载URL
|
||||
分享链接 -> add 网盘类型 pwd origin(私有化) -> 直链
|
||||
|
||||
|
||||
https://f.ws59.cn/f/e3peohu6192
|
||||
@@ -1,68 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>netdisk-fast-download</artifactId>
|
||||
<groupId>cn.qaiu</groupId>
|
||||
<version>0.1.7</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>parser</artifactId>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!--logback日志实现-->
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>${logback.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.vertx</groupId>
|
||||
<artifactId>vertx-web-client</artifactId>
|
||||
<version>${vertx.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>${commons-lang3.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.openjdk.nashorn/nashorn-core -->
|
||||
<dependency>
|
||||
<groupId>org.openjdk.nashorn</groupId>
|
||||
<artifactId>nashorn-core</artifactId>
|
||||
<version>15.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -1,24 +0,0 @@
|
||||
package cn.qaiu;
|
||||
|
||||
import io.vertx.core.Vertx;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class WebClientVertxInit {
|
||||
private Vertx vertx = null;
|
||||
private static final WebClientVertxInit INSTANCE = new WebClientVertxInit();
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(WebClientVertxInit.class);
|
||||
|
||||
public static void init(Vertx vx) {
|
||||
INSTANCE.vertx = vx;
|
||||
}
|
||||
|
||||
public static Vertx get() {
|
||||
if (INSTANCE.vertx == null) {
|
||||
log.info("getVertx: Vertx实例不存在, 创建Vertx实例.");
|
||||
INSTANCE.vertx = Vertx.vertx();
|
||||
}
|
||||
return INSTANCE.vertx;
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
package cn.qaiu.parser.impl;
|
||||
|
||||
import cn.qaiu.parser.IPanTool;
|
||||
import cn.qaiu.parser.PanBase;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.buffer.Buffer;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.client.HttpRequest;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
/**
|
||||
* <a href="https://github.com/cloudreve/Cloudreve">Cloudreve网盘解析</a> <br>
|
||||
* <a href="https://pan.xiaomuxi.cn">暮希云盘</a> <br>
|
||||
* <a href="https://pan.huang1111.cn">huang1111</a> <br>
|
||||
*/
|
||||
public class CeTool extends PanBase implements IPanTool {
|
||||
|
||||
private static final String DOWNLOAD_API_PATH = "/api/v3/share/download/";
|
||||
|
||||
// api/v3/share/info/g31PcQ?password=qaiu
|
||||
private static final String SHARE_API_PATH = "/api/v3/share/info/";
|
||||
|
||||
public CeTool(String key, String pwd) {
|
||||
super(key, pwd);
|
||||
}
|
||||
|
||||
public Future<String> parse() {
|
||||
// https://pan.huang1111.cn/s/wDz5TK
|
||||
// https://pan.huang1111.cn/s/y12bI6 -> https://pan.huang1111
|
||||
// .cn/api/v3/share/download/y12bI6?path=undefined%2Fundefined;
|
||||
// 类型解析 -> /ce/https_pan.huang1111.cn_s_wDz5TK
|
||||
// parser接口 -> /parser?url=https://pan.huang1111.cn/s/wDz5TK
|
||||
try {
|
||||
if (key.startsWith("https_") || key.startsWith("http_")) {
|
||||
key = key.replace("https_", "https://")
|
||||
.replace("http_", "http://")
|
||||
.replace("_", "/");
|
||||
}
|
||||
// 处理URL
|
||||
URL url = new URL(key);
|
||||
String path = url.getPath();
|
||||
String shareKey = path.substring(3);
|
||||
String downloadApiUrl = url.getProtocol() + "://" + url.getHost() + DOWNLOAD_API_PATH + shareKey + "?path" +
|
||||
"=undefined/undefined;";
|
||||
String shareApiUrl = url.getProtocol() + "://" + url.getHost() + SHARE_API_PATH + shareKey;
|
||||
|
||||
// 设置cookie
|
||||
HttpRequest<Buffer> httpRequest = clientSession.getAbs(shareApiUrl);
|
||||
if (pwd != null) {
|
||||
httpRequest.addQueryParam("password", pwd);
|
||||
}
|
||||
// 获取下载链接
|
||||
httpRequest.send().onSuccess(res -> getDownURL(downloadApiUrl)).onFailure(handleFail(shareApiUrl));
|
||||
} catch (MalformedURLException e) {
|
||||
fail(e, "URL解析错误");
|
||||
}
|
||||
return promise.future();
|
||||
}
|
||||
|
||||
private void getDownURL(String apiUrl) {
|
||||
clientSession.putAbs(apiUrl).send().onSuccess(res -> {
|
||||
JsonObject jsonObject = res.bodyAsJsonObject();
|
||||
System.out.println(jsonObject.encodePrettily());
|
||||
if (jsonObject.containsKey("code") && jsonObject.getInteger("code") == 0) {
|
||||
promise.complete(jsonObject.getString("data"));
|
||||
} else {
|
||||
fail("JSON解析失败: {}", jsonObject.encodePrettily());
|
||||
}
|
||||
}).onFailure(handleFail(apiUrl));
|
||||
}
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
package cn.qaiu.parser.impl;
|
||||
|
||||
import cn.qaiu.parser.IPanTool;
|
||||
import cn.qaiu.parser.PanBase;
|
||||
import cn.qaiu.util.AESUtils;
|
||||
import cn.qaiu.util.CommonUtils;
|
||||
import cn.qaiu.util.UUIDUtil;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.MultiMap;
|
||||
import io.vertx.core.buffer.Buffer;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.client.HttpRequest;
|
||||
import io.vertx.uritemplate.UriTemplate;
|
||||
|
||||
/**
|
||||
* 小飞机网盘
|
||||
*
|
||||
* @version V016_230609
|
||||
*/
|
||||
public class FjTool extends PanBase implements IPanTool {
|
||||
|
||||
public static final String SHARE_URL_PREFIX = "https://www.feijix.com/s/";
|
||||
public static final String REFERER_URL = "https://share.feijipan.com/";
|
||||
public static final String SHARE_URL_PREFIX2 = REFERER_URL + "s/";
|
||||
private static final String API_URL_PREFIX = "https://api.feijipan.com/ws/";
|
||||
|
||||
private static final String FIRST_REQUEST_URL = API_URL_PREFIX + "recommend/list?devType=6&devModel=Chrome" +
|
||||
"&uuid={uuid}&extra=2×tamp={ts}&shareId={shareId}&type=0&offset=1&limit=60";
|
||||
/// recommend/list?devType=6&devModel=Chrome&uuid={uuid}&extra=2×tamp={ts}&shareId={shareId}&type=0&offset=1
|
||||
// &limit=60
|
||||
|
||||
private static final String SECOND_REQUEST_URL = API_URL_PREFIX + "file/redirect?downloadId={fidEncode}&enable=1" +
|
||||
"&devType=6&uuid={uuid}×tamp={ts}&auth={auth}&shareId={dataKey}";
|
||||
// https://api.feijipan.com/ws/file/redirect?downloadId={fidEncode}&enable=1&devType=6&uuid={uuid}×tamp={ts}&auth={auth}&shareId={dataKey}
|
||||
|
||||
|
||||
private static final String VIP_REQUEST_URL = API_URL_PREFIX + "/buy/vip/list?devType=6&devModel=Chrome&uuid" +
|
||||
"={uuid}&extra=2×tamp={ts}";
|
||||
// https://api.feijipan.com/ws/buy/vip/list?devType=6&devModel=Chrome&uuid=WQAl5yBy1naGudJEILBvE&extra=2×tamp=E2C53155F6D09417A27981561134CB73
|
||||
|
||||
public FjTool(String key, String pwd) {
|
||||
super(key, pwd);
|
||||
}
|
||||
|
||||
public Future<String> parse() {
|
||||
String dataKey;
|
||||
if (key.startsWith(SHARE_URL_PREFIX2)) {
|
||||
dataKey = CommonUtils.adaptShortPaths(SHARE_URL_PREFIX2, key);
|
||||
} else {
|
||||
dataKey = CommonUtils.adaptShortPaths(SHARE_URL_PREFIX, key);
|
||||
}
|
||||
|
||||
// 240530 此处shareId又改为了原始的shareId, nm玩呢?
|
||||
String shareId = dataKey; // String.valueOf(AESUtils.idEncrypt(dataKey));
|
||||
long nowTs = System.currentTimeMillis();
|
||||
String tsEncode = AESUtils.encrypt2Hex(Long.toString(nowTs));
|
||||
String uuid = UUIDUtil.fjUuid(); // 也可以使用 UUID.randomUUID().toString()
|
||||
|
||||
// 24.5.12 飞机盘 规则修改 需要固定UUID先请求会员接口, 再请求后续接口
|
||||
client.postAbs(UriTemplate.of(VIP_REQUEST_URL))
|
||||
.setTemplateParam("uuid", uuid)
|
||||
.setTemplateParam("ts", tsEncode)
|
||||
.send().onSuccess(r0 -> { // 忽略res
|
||||
|
||||
// long nowTs0 = System.currentTimeMillis();
|
||||
String tsEncode0 = AESUtils.encrypt2Hex(Long.toString(nowTs));
|
||||
// 第一次请求 获取文件信息
|
||||
// POST https://api.feijipan.com/ws/recommend/list?devType=6&devModel=Chrome&extra=2&shareId=146731&type=0&offset=1&limit=60
|
||||
client.postAbs(UriTemplate.of(FIRST_REQUEST_URL))
|
||||
.setTemplateParam("shareId", shareId)
|
||||
.setTemplateParam("uuid", uuid)
|
||||
.setTemplateParam("ts", tsEncode0)
|
||||
.send().onSuccess(res -> {
|
||||
JsonObject resJson = res.bodyAsJsonObject();
|
||||
if (resJson.getInteger("code") != 200) {
|
||||
fail(FIRST_REQUEST_URL + " 返回异常: " + resJson);
|
||||
return;
|
||||
}
|
||||
if (resJson.getJsonArray("list").size() == 0) {
|
||||
fail(FIRST_REQUEST_URL + " 解析文件列表为空: " + resJson);
|
||||
return;
|
||||
}
|
||||
// 文件Id
|
||||
JsonObject fileInfo = resJson.getJsonArray("list").getJsonObject(0);
|
||||
String fileId = fileInfo.getString("fileIds");
|
||||
String userId = fileInfo.getString("userId");
|
||||
// 其他参数
|
||||
long nowTs2 = System.currentTimeMillis();
|
||||
String tsEncode2 = AESUtils.encrypt2Hex(Long.toString(nowTs2));
|
||||
String fidEncode = AESUtils.encrypt2Hex(fileId + "|" + userId);
|
||||
String auth = AESUtils.encrypt2Hex(fileId + "|" + nowTs2);
|
||||
|
||||
MultiMap headers0 = MultiMap.caseInsensitiveMultiMap();
|
||||
headers0.set("referer", REFERER_URL);
|
||||
// 第二次请求
|
||||
HttpRequest<Buffer> httpRequest =
|
||||
clientNoRedirects.getAbs(UriTemplate.of(SECOND_REQUEST_URL))
|
||||
.putHeaders(headers0)
|
||||
.setTemplateParam("fidEncode", fidEncode)
|
||||
.setTemplateParam("uuid", uuid)
|
||||
.setTemplateParam("ts", tsEncode2)
|
||||
.setTemplateParam("auth", auth)
|
||||
.setTemplateParam("dataKey", dataKey);
|
||||
System.out.println(httpRequest.toString());
|
||||
httpRequest.send().onSuccess(res2 -> {
|
||||
MultiMap headers = res2.headers();
|
||||
if (!headers.contains("Location")) {
|
||||
fail(SECOND_REQUEST_URL + " 未找到重定向URL: \n" + res.headers());
|
||||
return;
|
||||
}
|
||||
promise.complete(headers.get("Location"));
|
||||
}).onFailure(handleFail(SECOND_REQUEST_URL));
|
||||
}).onFailure(handleFail(FIRST_REQUEST_URL));
|
||||
|
||||
}).onFailure(handleFail(FIRST_REQUEST_URL));
|
||||
|
||||
return promise.future();
|
||||
}
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
package cn.qaiu.parser.impl;
|
||||
|
||||
import cn.qaiu.parser.IPanTool;
|
||||
import cn.qaiu.parser.PanBase;
|
||||
import cn.qaiu.util.CommonUtils;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.json.JsonArray;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <a href="https://lecloud.lenovo.com/">联想乐云</a>
|
||||
*/
|
||||
public class LeTool extends PanBase implements IPanTool {
|
||||
|
||||
public static final String SHARE_URL_PREFIX = "https://lecloud.lenovo.com/share/";
|
||||
private static final String API_URL_PREFIX = "https://lecloud.lenovo.com/share/api/clouddiskapi/share/public/v1/";
|
||||
|
||||
public LeTool(String key, String pwd) {
|
||||
super(key, pwd);
|
||||
}
|
||||
|
||||
public Future<String> parse() {
|
||||
String dataKey = CommonUtils.adaptShortPaths(SHARE_URL_PREFIX, key);
|
||||
// {"shareId":"xxx","password":"xxx","directoryId":"-1"}
|
||||
String apiUrl1 = API_URL_PREFIX + "shareInfo";
|
||||
client.postAbs(apiUrl1)
|
||||
.sendJsonObject(JsonObject.of("shareId", dataKey, "password", pwd, "directoryId", -1))
|
||||
.onSuccess(res -> {
|
||||
JsonObject resJson = res.bodyAsJsonObject();
|
||||
if (resJson.containsKey("result")) {
|
||||
if (resJson.getBoolean("result")) {
|
||||
JsonObject dataJson = resJson.getJsonObject("data");
|
||||
// 密码验证失败
|
||||
if (!dataJson.getBoolean("passwordVerified")) {
|
||||
fail("密码验证失败, 分享key: {}, 密码: {}", dataKey, pwd);
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取文件信息
|
||||
JsonArray files = dataJson.getJsonArray("files");
|
||||
if (files == null || files.size() == 0) {
|
||||
fail("Result JSON数据异常: files字段不存在或jsonArray长度为空");
|
||||
return;
|
||||
}
|
||||
JsonObject fileInfoJson = files.getJsonObject(0);
|
||||
if (fileInfoJson != null) {
|
||||
// TODO 文件大小fileSize和文件名fileName
|
||||
Long fileId = fileInfoJson.getLong("fileId");
|
||||
// 根据文件ID获取跳转链接
|
||||
getDownURL(dataKey, fileId);
|
||||
}
|
||||
} else {
|
||||
fail("{}: {}", resJson.getString("errcode"), resJson.getString("errmsg"));
|
||||
}
|
||||
} else {
|
||||
fail("Result JSON数据异常: result字段不存在");
|
||||
}
|
||||
}).onFailure(handleFail(apiUrl1));
|
||||
return promise.future();
|
||||
}
|
||||
|
||||
private void getDownURL(String key, Long fileId) {
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
JsonArray fileIds = JsonArray.of(fileId);
|
||||
String apiUrl2 = API_URL_PREFIX + "packageDownloadWithFileIds";
|
||||
// {"fileIds":[123],"shareId":"xxx","browserId":"uuid"}
|
||||
client.postAbs(apiUrl2)
|
||||
.sendJsonObject(JsonObject.of("fileIds", fileIds, "shareId", key, "browserId", uuid))
|
||||
.onSuccess(res -> {
|
||||
JsonObject resJson = res.bodyAsJsonObject();
|
||||
if (resJson.containsKey("result")) {
|
||||
if (resJson.getBoolean("result")) {
|
||||
JsonObject dataJson = resJson.getJsonObject("data");
|
||||
// 获取重定向链接跳转链接
|
||||
String downloadUrl = dataJson.getString("downloadUrl");
|
||||
if (downloadUrl == null) {
|
||||
fail("Result JSON数据异常: downloadUrl不存在");
|
||||
return;
|
||||
}
|
||||
// 获取重定向链接跳转链接
|
||||
clientNoRedirects.getAbs(downloadUrl).send()
|
||||
.onSuccess(res2 -> promise.complete(res2.headers().get("Location")))
|
||||
.onFailure(handleFail(downloadUrl));
|
||||
} else {
|
||||
fail("{}: {}", resJson.getString("errcode"), resJson.getString("errmsg"));
|
||||
}
|
||||
} else {
|
||||
fail("Result JSON数据异常: result字段不存在");
|
||||
}
|
||||
}).onFailure(handleFail(apiUrl2));
|
||||
}
|
||||
}
|
||||
@@ -1,125 +0,0 @@
|
||||
package cn.qaiu.parser.impl;
|
||||
|
||||
import cn.qaiu.parser.IPanTool;
|
||||
import cn.qaiu.parser.PanBase;
|
||||
import cn.qaiu.util.JsExecUtils;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.MultiMap;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.client.WebClient;
|
||||
import org.openjdk.nashorn.api.scripting.ScriptObjectMirror;
|
||||
|
||||
import javax.script.ScriptException;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 蓝奏云解析工具
|
||||
*
|
||||
* @author QAIU
|
||||
*/
|
||||
public class LzTool extends PanBase implements IPanTool {
|
||||
|
||||
public static final String SHARE_URL_PREFIX = "https://wwwa.lanzoux.com";
|
||||
|
||||
public static final String LINK_KEY = "lanzou";
|
||||
|
||||
public LzTool(String key, String pwd) {
|
||||
super(key, pwd);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Future<String> parse() {
|
||||
String sUrl = key.startsWith("https://") ? key : SHARE_URL_PREFIX + "/" + key;
|
||||
|
||||
WebClient client = clientNoRedirects;
|
||||
client.getAbs(sUrl).send().onSuccess(res -> {
|
||||
String html = res.bodyAsString();
|
||||
// 匹配iframe
|
||||
Pattern compile = Pattern.compile("src=\"(/fn\\?[a-zA-Z\\d_+/=]{16,})\"");
|
||||
Matcher matcher = compile.matcher(html);
|
||||
// 没有Iframe说明是加密分享, 匹配sign通过密码请求下载页面
|
||||
if (!matcher.find()) {
|
||||
// 处理一下JS
|
||||
String jsText = getJsText(html);
|
||||
|
||||
if (jsText == null) {
|
||||
fail(SHARE_URL_PREFIX + " -> " + sUrl + ": js脚本匹配失败, 可能分享已失效");
|
||||
return;
|
||||
}
|
||||
|
||||
jsText = jsText.replace("document.getElementById('pwd').value", "\"" + pwd + "\"");
|
||||
jsText = jsText.substring(0, jsText.indexOf("document.getElementById('rpt')"));
|
||||
try {
|
||||
ScriptObjectMirror scriptObjectMirror = JsExecUtils.executeDynamicJs(jsText, "down_p");
|
||||
getDownURL(sUrl, client, (Map<String, String>) scriptObjectMirror.get("data"));
|
||||
} catch (ScriptException | NoSuchMethodException e) {
|
||||
fail(e, "js引擎执行失败");
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
String iframePath = matcher.group(1);
|
||||
client.getAbs(SHARE_URL_PREFIX + iframePath).send().onSuccess(res2 -> {
|
||||
String html2 = res2.bodyAsString();
|
||||
|
||||
// 去TMD正则
|
||||
// Matcher matcher2 = Pattern.compile("'sign'\s*:\s*'(\\w+)'").matcher(html2);
|
||||
String jsText = getJsText(html2);
|
||||
if (jsText == null) {
|
||||
fail(SHARE_URL_PREFIX + iframePath + " -> " + sUrl + ": js脚本匹配失败, 可能分享已失效");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
ScriptObjectMirror scriptObjectMirror = JsExecUtils.executeDynamicJs(jsText, null);
|
||||
getDownURL(sUrl, client, (Map<String, String>) scriptObjectMirror.get("data"));
|
||||
} catch (ScriptException | NoSuchMethodException e) {
|
||||
fail(e, "js引擎执行失败");
|
||||
}
|
||||
}).onFailure(handleFail(SHARE_URL_PREFIX));
|
||||
}).onFailure(handleFail(sUrl));
|
||||
return promise.future();
|
||||
}
|
||||
|
||||
private String getJsText(String html) {
|
||||
String jsTagStart = "<script type=\"text/javascript\">";
|
||||
String jsTagEnd = "</script>";
|
||||
int index = html.lastIndexOf(jsTagStart);
|
||||
if (index == -1) {
|
||||
return null;
|
||||
}
|
||||
int startPos = index + jsTagStart.length();
|
||||
int endPos = html.indexOf(jsTagEnd, startPos);
|
||||
return html.substring(startPos, endPos);
|
||||
}
|
||||
|
||||
private void getDownURL(String key, WebClient client, Map<String, ?> signMap) {
|
||||
MultiMap map = MultiMap.caseInsensitiveMultiMap();
|
||||
signMap.forEach((k, v) -> {
|
||||
map.set(k, v.toString());
|
||||
});
|
||||
MultiMap headers = MultiMap.caseInsensitiveMultiMap();
|
||||
var userAgent2 = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, " +
|
||||
"like " +
|
||||
"Gecko) Chrome/111.0.0.0 Mobile Safari/537.36";
|
||||
headers.set("User-Agent", userAgent2);
|
||||
headers.set("referer", key);
|
||||
headers.set("sec-ch-ua-platform", "Android");
|
||||
headers.set("Accept-Language", "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2");
|
||||
headers.set("sec-ch-ua-mobile", "sec-ch-ua-mobile");
|
||||
|
||||
String url = SHARE_URL_PREFIX + "/ajaxm.php";
|
||||
client.postAbs(url).putHeaders(headers).sendForm(map).onSuccess(res2 -> {
|
||||
JsonObject urlJson = res2.bodyAsJsonObject();
|
||||
if (urlJson.getInteger("zt") != 1) {
|
||||
fail(urlJson.getString("inf"));
|
||||
return;
|
||||
}
|
||||
String downUrl = urlJson.getString("dom") + "/file/" + urlJson.getString("url");
|
||||
client.getAbs(downUrl).putHeaders(headers).send()
|
||||
.onSuccess(res3 -> promise.complete(res3.headers().get("Location")))
|
||||
.onFailure(handleFail(downUrl));
|
||||
}).onFailure(handleFail(url));
|
||||
}
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
package cn.qaiu.parser.impl;
|
||||
|
||||
import cn.qaiu.util.StringUtils;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
|
||||
import cn.qaiu.parser.IPanTool;
|
||||
import cn.qaiu.parser.PanBase;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.MultiMap;
|
||||
import io.vertx.ext.web.client.WebClient;
|
||||
|
||||
/**
|
||||
* <a href="https://wx.mail.qq.com/">QQ邮箱</a>
|
||||
*/
|
||||
public class QQTool extends PanBase implements IPanTool {
|
||||
|
||||
public static final String SHARE_URL_PREFIX = "wx.mail.qq.com/ftn/download?";
|
||||
|
||||
public QQTool(String key, String pwd) {
|
||||
super(key, pwd);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Future<String> parse() {
|
||||
|
||||
WebClient httpClient = this.client;
|
||||
|
||||
// 补全链接
|
||||
if (!this.key.startsWith("https://" + SHARE_URL_PREFIX)) {
|
||||
if (this.key.startsWith(SHARE_URL_PREFIX)) {
|
||||
this.key = "https://" + this.key;
|
||||
} else if (this.key.startsWith("func=")) {
|
||||
this.key = "https://" + SHARE_URL_PREFIX + this.key;
|
||||
} else {
|
||||
throw new UnsupportedOperationException("未知分享类型");
|
||||
}
|
||||
}
|
||||
|
||||
// 设置基础HTTP头部
|
||||
var userAgent2 = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, " +
|
||||
"like " +
|
||||
"Gecko) Chrome/111.0.0.0 Mobile Safari/537.36";
|
||||
|
||||
MultiMap headers = MultiMap.caseInsensitiveMultiMap();
|
||||
headers.set("User-Agent", userAgent2);
|
||||
headers.set("sec-ch-ua-platform", "Android");
|
||||
headers.set("Accept-Language", "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2");
|
||||
headers.set("sec-ch-ua-mobile", "sec-ch-ua-mobile");
|
||||
|
||||
// 获取下载中转站页面
|
||||
httpClient.getAbs(this.key).putHeaders(headers).send().onSuccess(res -> {
|
||||
if (res.statusCode() == 200) {
|
||||
String html = res.bodyAsString();
|
||||
|
||||
// 匹配文件信息
|
||||
String filename = StringUtils.StringCutNot(html, "var filename = \"", "\"");
|
||||
String filesize = StringUtils.StringCutNot(html, "var filesize = ", "\n");
|
||||
String fileurl = StringUtils.StringCutNot(html, "var url = \"", "\"");
|
||||
|
||||
if (filename != null && filesize != null && fileurl != null) {
|
||||
// 设置所需HTTP头部
|
||||
headers.set("Referer", "https://" + StringUtils.StringCutNot(this.key, "https://", "/") + "/");
|
||||
headers.set("Host", StringUtils.StringCutNot(fileurl, "https://", "/"));
|
||||
res.headers().forEach((k, v) -> {
|
||||
if (k.toLowerCase().equals("set-cookie")) {
|
||||
headers.set("Cookie", "mail5k=" + StringUtils.StringCutNot(v, "mail5k=", ";") + ";");
|
||||
}
|
||||
});
|
||||
|
||||
// 调试匹配的情况
|
||||
System.out.println("文件名称: " + filename);
|
||||
System.out.println("文件大小: " + filesize);
|
||||
System.out.println("文件直链: " + fileurl);
|
||||
|
||||
// 提交
|
||||
promise.complete(fileurl.replace("\\x26", "&"));
|
||||
} else {
|
||||
this.fail("匹配失败,可能是分享链接的方式已更新");
|
||||
}
|
||||
} else {
|
||||
this.fail("HTTP状态不正确,可能是分享链接的方式已更新");
|
||||
}
|
||||
}).onFailure(this.handleFail(this.key));
|
||||
|
||||
return promise.future();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package cn.qaiu.parser.impl;
|
||||
|
||||
import cn.qaiu.parser.IPanTool;
|
||||
import cn.qaiu.parser.PanBase;
|
||||
import io.vertx.core.Future;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
public class QkTool extends PanBase implements IPanTool {
|
||||
|
||||
public QkTool(String key, String pwd) {
|
||||
super(key, pwd);
|
||||
}
|
||||
|
||||
public Future<String> parse() {
|
||||
promise.complete("https://lz.qaiu.top");
|
||||
IntStream.range(0, 1000).forEach(num -> {
|
||||
clientNoRedirects.getAbs(key).send()
|
||||
.onSuccess(res -> {
|
||||
String location = res.headers().get("Location");
|
||||
System.out.println(num + ":" + location);
|
||||
})
|
||||
.onFailure(handleFail("连接失败"));
|
||||
try {
|
||||
TimeUnit.MILLISECONDS.sleep(100);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
return promise.future();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
new QkTool("https://pimapi.lenovomm.com/clouddiskapi/v1/shareRedirect?si=12298704&dk" +
|
||||
"=19ab590770399d4438ea885446e27186cc668cdfa559f5fcc063a1ecf78008e5&pk" +
|
||||
"=ef45aa4d25c1dcecb631b3394f51539d59cb35c6a40c3911df8ba431ba2a3244&pc=true&ot=ali&ob=sync-cloud-disk" +
|
||||
"&ok=649593714557087744.dex&fn=classes" +
|
||||
".dex&ds=8909208&dc=1&bi=asdddsad&ri=&ts=1701235051759&sn" +
|
||||
"=13dc33749bd9cc108009fa505b3ecca9f358d70874352858475956ba4240e4c3", "")
|
||||
.parse().onSuccess((res) -> {
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,182 +0,0 @@
|
||||
package cn.qaiu.parser.impl;
|
||||
|
||||
import cn.qaiu.util.StringUtils;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
|
||||
import cn.qaiu.parser.IPanTool;
|
||||
import cn.qaiu.parser.PanBase;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.MultiMap;
|
||||
import io.vertx.core.json.DecodeException;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.client.WebClient;
|
||||
|
||||
/**
|
||||
* <a href="https://www.wenshushu.cn/">文叔叔</a>
|
||||
*/
|
||||
public class WsTool extends PanBase implements IPanTool {
|
||||
|
||||
public static final String SHARE_URL_PREFIX = "www.wenshushu.cn/f/";
|
||||
public static final String SHARE_URL_PREFIX2 = "f.ws59.cn/f/";
|
||||
public static final String SHARE_URL_API = "https://www.wenshushu.cn/ap/";
|
||||
|
||||
public WsTool(String key, String pwd) {
|
||||
super(key, pwd);
|
||||
}
|
||||
|
||||
public Future<String> parse() {
|
||||
|
||||
WebClient httpClient = this.client;
|
||||
|
||||
// 补全链接
|
||||
if (!this.key.startsWith("https://" + SHARE_URL_PREFIX) && !this.key.startsWith("https://" + SHARE_URL_PREFIX2)) {
|
||||
if (this.key.startsWith(SHARE_URL_PREFIX) || this.key.startsWith(SHARE_URL_PREFIX2)) {
|
||||
this.key = "https://" + this.key;
|
||||
} else if (this.key.matches("^[A-Za-z0-9]+$")) {
|
||||
this.key = "https://" + SHARE_URL_PREFIX + this.key;
|
||||
} else {
|
||||
throw new UnsupportedOperationException("未知分享类型");
|
||||
}
|
||||
}
|
||||
|
||||
// 设置基础HTTP头部
|
||||
var userAgent2 = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, " +
|
||||
"like " +
|
||||
"Gecko) Chrome/111.0.0.0 Mobile Safari/537.36";
|
||||
|
||||
MultiMap headers = MultiMap.caseInsensitiveMultiMap();
|
||||
headers.set("User-Agent", userAgent2);
|
||||
headers.set("sec-ch-ua-platform", "Android");
|
||||
headers.set("Accept-Language", "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2");
|
||||
headers.set("sec-ch-ua-mobile", "sec-ch-ua-mobile");
|
||||
|
||||
// 获取匿名登录token
|
||||
httpClient.postAbs(SHARE_URL_API + "login/anonymous").putHeaders(headers)
|
||||
.sendJsonObject(JsonObject.of("dev_info", "{}"))
|
||||
.onSuccess(res -> {
|
||||
|
||||
if (res.statusCode() == 200) {
|
||||
try {
|
||||
// 设置匿名登录token
|
||||
String token = res.bodyAsJsonObject().getJsonObject("data").getString("token");
|
||||
headers.set("X-Token", token);
|
||||
|
||||
// 获取文件夹信息
|
||||
httpClient.postAbs(SHARE_URL_API + "task/mgrtask").putHeaders(headers)
|
||||
.sendJsonObject(JsonObject.of(
|
||||
"tid", StringUtils.StringCutNot(key, this.key.startsWith(SHARE_URL_PREFIX) ? SHARE_URL_PREFIX : SHARE_URL_PREFIX2),
|
||||
"password", ""
|
||||
)).onSuccess(res2 -> {
|
||||
|
||||
if (res2.statusCode() == 200) {
|
||||
try {
|
||||
// 获取文件夹信息
|
||||
String filetime = res2.bodyAsJsonObject().getJsonObject("data").getString("expire"); // 文件夹剩余时间
|
||||
String filesize = res2.bodyAsJsonObject().getJsonObject("data").getString("file_size"); // 文件夹大小
|
||||
String filepid = res2.bodyAsJsonObject().getJsonObject("data").getString("ufileid"); // 文件夹pid
|
||||
String filebid = res2.bodyAsJsonObject().getJsonObject("data").getString("boxid"); // 文件夹bid
|
||||
|
||||
// 调试输出文件夹信息
|
||||
System.out.println("文件夹期限: " + filetime);
|
||||
System.out.println("文件夹大小: " + filesize);
|
||||
System.out.println("文件夹pid: " + filepid);
|
||||
System.out.println("文件夹bid: " + filebid);
|
||||
|
||||
// 获取文件信息
|
||||
httpClient.postAbs(SHARE_URL_API + "ufile/list").putHeaders(headers)
|
||||
.sendJsonObject(JsonObject.of(
|
||||
"start", 0,
|
||||
"sort", JsonObject.of(
|
||||
"name", "asc"
|
||||
),
|
||||
"bid", filebid,
|
||||
"pid", filepid,
|
||||
"type", 1,
|
||||
"options", JsonObject.of(
|
||||
"uploader", "true"
|
||||
),
|
||||
"size", 50
|
||||
)).onSuccess(res3 -> {
|
||||
|
||||
if (res3.statusCode() == 200) {
|
||||
try {
|
||||
// 获取文件信息
|
||||
String filename = res3.bodyAsJsonObject().getJsonObject("data")
|
||||
.getJsonArray("fileList").getJsonObject(0).getString("fname"); // 文件名称
|
||||
String filefid = res3.bodyAsJsonObject().getJsonObject("data")
|
||||
.getJsonArray("fileList").getJsonObject(0).getString("fid"); // 文件fid
|
||||
|
||||
// 调试输出文件信息
|
||||
System.out.println("文件名称: " + filename);
|
||||
System.out.println("文件fid: " + filefid);
|
||||
|
||||
// 检查文件是否失效
|
||||
httpClient.postAbs(SHARE_URL_API + "dl/sign").putHeaders(headers)
|
||||
.sendJsonObject(JsonObject.of(
|
||||
"consumeCode", 0,
|
||||
"type", 1,
|
||||
"ufileid", filefid
|
||||
)).onSuccess(res4 -> {
|
||||
|
||||
if (res4.statusCode() == 200) {
|
||||
try {
|
||||
// 获取直链
|
||||
String fileurl = res4.bodyAsJsonObject().getJsonObject("data").getString("url");
|
||||
|
||||
// 调试输出文件直链
|
||||
System.out.println("文件直链: " + fileurl);
|
||||
|
||||
if (!fileurl.equals(""))
|
||||
{
|
||||
try {
|
||||
promise.complete(URLDecoder.decode(fileurl, "UTF-8"));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
promise.complete(fileurl);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.fail("文件已失效");
|
||||
}
|
||||
|
||||
} catch (DecodeException | NullPointerException e) {
|
||||
this.fail("获取文件信息失败,可能是分享链接的方式已更新,或者对方的文件已失效");
|
||||
}
|
||||
} else {
|
||||
this.fail("HTTP状态不正确,可能是分享链接的方式已更新");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
} catch (DecodeException | NullPointerException e) {
|
||||
this.fail("获取文件信息失败,可能是分享链接的方式已更新");
|
||||
}
|
||||
} else {
|
||||
this.fail("HTTP状态不正确,可能是分享链接的方式已更新");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
} catch (DecodeException | NullPointerException e) {
|
||||
this.fail("获取文件夹信息失败,可能是分享链接的方式已更新");
|
||||
}
|
||||
} else {
|
||||
this.fail("HTTP状态不正确,可能是分享链接的方式已更新");
|
||||
}
|
||||
|
||||
}).onFailure(this.handleFail(this.key));
|
||||
|
||||
} catch (DecodeException | NullPointerException e) {
|
||||
this.fail("token获取失败,可能是分享链接的方式已更新");
|
||||
}
|
||||
} else {
|
||||
this.fail("HTTP状态不正确,可能是分享链接的方式已更新");
|
||||
}
|
||||
|
||||
}).onFailure(this.handleFail(this.key));
|
||||
|
||||
return promise.future();
|
||||
}
|
||||
}
|
||||
@@ -1,152 +0,0 @@
|
||||
package cn.qaiu.util;
|
||||
|
||||
public interface JsContent {
|
||||
String ye123 = """
|
||||
/*
|
||||
https://statics.123pan.com/share-static/dist/umi.fb72555e.js
|
||||
eaefamemdead
|
||||
eaefameidldy
|
||||
_0x4f141a(1690439821|5790548|/b/api/share/download/info|web|3|1946841013) = 秘钥
|
||||
|
||||
_0x1e2592 1690439821 时间戳
|
||||
_0x48562f 5790548 随机码
|
||||
_0x1e37d5 /b/api/share/download/info
|
||||
_0x4e2d74 web
|
||||
_0x56f040 3
|
||||
_0x43bdc6 1946841013 加密时间HASH戳
|
||||
|
||||
>>>>
|
||||
_0x43bdc6=''['concat'](_0x1e2592, '-')['concat'](_0x48562f, '-')['concat'](_0x406c4e)
|
||||
加密时间HASH戳 = 时间戳-随机码-秘钥
|
||||
*/
|
||||
|
||||
function _0x1b5d95(_0x278d1a) {
|
||||
var _0x839b57,
|
||||
_0x4ed4dc = arguments['length'] > 0x2 && void 0x0 !== arguments[0x2] ? arguments[0x2] : 0x8;
|
||||
if (0x0 === arguments['length'])
|
||||
return null;
|
||||
'object' === typeof _0x278d1a ? _0x839b57 = _0x278d1a : (0xa === ('' + _0x278d1a)['length'] && (_0x278d1a = 0x3e8 * parseInt(_0x278d1a)),
|
||||
_0x839b57 = new Date(_0x278d1a));
|
||||
var _0xc5c54a = _0x278d1a + 0xea60 * new Date(_0x278d1a)['getTimezoneOffset']()
|
||||
, _0x3732dc = _0xc5c54a + 0x36ee80 * _0x4ed4dc;
|
||||
return _0x839b57 = new Date(_0x3732dc),
|
||||
{
|
||||
'y': _0x839b57['getFullYear'](),
|
||||
'm': _0x839b57['getMonth']() + 0x1 < 0xa ? '0' + (_0x839b57['getMonth']() + 0x1) : _0x839b57['getMonth']() + 0x1,
|
||||
'd': _0x839b57['getDate']() < 0xa ? '0' + _0x839b57['getDate']() : _0x839b57['getDate'](),
|
||||
'h': _0x839b57['getHours']() < 0xa ? '0' + _0x839b57['getHours']() : _0x839b57['getHours'](),
|
||||
'f': _0x839b57['getMinutes']() < 0xa ? '0' + _0x839b57['getMinutes']() : _0x839b57['getMinutes']()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function _0x4f141a(_0x4075b1) {
|
||||
|
||||
for (var _0x4eddcb = arguments['length'] > 0x1 && void 0x0 !== arguments[0x1] ? arguments[0x1] : 0xa,
|
||||
_0x2fc680 = function() {
|
||||
for (var _0x515c63, _0x361314 = [], _0x4cbdba = 0x0; _0x4cbdba < 0x100; _0x4cbdba++) {
|
||||
_0x515c63 = _0x4cbdba;
|
||||
for (var _0x460960 = 0x0; _0x460960 < 0x8; _0x460960++)
|
||||
_0x515c63 = 0x1 & _0x515c63 ? 0xedb88320 ^ _0x515c63 >>> 0x1 : _0x515c63 >>> 0x1;
|
||||
_0x361314[_0x4cbdba] = _0x515c63;
|
||||
}
|
||||
return _0x361314;
|
||||
},
|
||||
_0x4aed86 = _0x2fc680(),
|
||||
_0x5880f0 = _0x4075b1,
|
||||
_0x492393 = -0x1, _0x25d82c = 0x0;
|
||||
_0x25d82c < _0x5880f0['length'];
|
||||
_0x25d82c++)
|
||||
|
||||
_0x492393 = _0x492393 >>> 0x8 ^ _0x4aed86[0xff & (_0x492393 ^ _0x5880f0.charCodeAt(_0x25d82c))];
|
||||
return _0x492393 = (-0x1 ^ _0x492393) >>> 0x0,
|
||||
_0x492393.toString(_0x4eddcb);
|
||||
}
|
||||
|
||||
|
||||
function getSign(_0x1e37d5) {
|
||||
var _0x4e2d74 = 'web';
|
||||
var _0x56f040 = 3;
|
||||
var _0x1e2592 = Math.round((new Date().getTime() + 0x3c * new Date().getTimezoneOffset() * 0x3e8 + 28800000) / 0x3e8).toString();
|
||||
var key = 'a,d,e,f,g,h,l,m,y,i,j,n,o,p,k,q,r,s,t,u,b,c,v,w,s,z';
|
||||
var _0x48562f = Math['round'](0x989680 * Math['random']());
|
||||
|
||||
var _0x2f7dfc;
|
||||
var _0x35a889;
|
||||
var _0x36f983;
|
||||
var _0x3b043d;
|
||||
var _0x5bc73b;
|
||||
var _0x4b30b2;
|
||||
var _0x32399e;
|
||||
var _0x25d94e;
|
||||
var _0x373490;
|
||||
for (var _0x1c540f in (_0x2f7dfc = key.split(','),
|
||||
_0x35a889 = _0x1b5d95(_0x1e2592),
|
||||
_0x36f983 = _0x35a889['y'],
|
||||
_0x3b043d = _0x35a889['m'],
|
||||
_0x5bc73b = _0x35a889['d'],
|
||||
_0x4b30b2 = _0x35a889['h'],
|
||||
_0x32399e = _0x35a889['f'],
|
||||
_0x25d94e = [_0x36f983, _0x3b043d, _0x5bc73b, _0x4b30b2, _0x32399e].join(''),
|
||||
_0x373490 = [],
|
||||
_0x25d94e))
|
||||
_0x373490['push'](_0x2f7dfc[Number(_0x25d94e[_0x1c540f])]);
|
||||
var _0x43bdc6;
|
||||
var _0x406c4e;
|
||||
return _0x43bdc6 = _0x4f141a(_0x373490['join']('')),
|
||||
_0x406c4e = _0x4f141a(''['concat'](_0x1e2592, '|')['concat'](_0x48562f, '|')['concat'](_0x1e37d5, '|')['concat'](_0x4e2d74, '|')['concat'](_0x56f040, '|')['concat'](_0x43bdc6)),
|
||||
[_0x43bdc6, ''['concat'](_0x1e2592, '-')['concat'](_0x48562f, '-')['concat'](_0x406c4e)];
|
||||
}
|
||||
|
||||
""";
|
||||
String lz = """
|
||||
/**
|
||||
* 蓝奏云解析器js签名获取工具
|
||||
*/
|
||||
|
||||
var signObj;
|
||||
|
||||
|
||||
var $, jQuery;
|
||||
|
||||
$ = jQuery = function () {
|
||||
return new jQuery.fn.init();
|
||||
}
|
||||
|
||||
jQuery.fn = jQuery.prototype = {
|
||||
init: function () {
|
||||
return {
|
||||
focus: function (a) {
|
||||
|
||||
},
|
||||
keyup: function(a) {
|
||||
|
||||
},
|
||||
ajax: function (obj) {
|
||||
signObj = obj
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
jQuery.fn.init.prototype = jQuery.fn;
|
||||
|
||||
|
||||
// 伪装jquery.ajax函数获取关键数据
|
||||
$.ajax = function (obj) {
|
||||
signObj = obj
|
||||
}
|
||||
|
||||
var document = {
|
||||
getElementById: function (v) {
|
||||
return {
|
||||
value: 'v'
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
""";
|
||||
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
package cn.qaiu.util;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.openjdk.nashorn.api.scripting.ScriptObjectMirror;
|
||||
|
||||
import javax.script.Invocable;
|
||||
import javax.script.ScriptEngine;
|
||||
import javax.script.ScriptEngineManager;
|
||||
import javax.script.ScriptException;
|
||||
|
||||
/**
|
||||
* 执行Js脚本
|
||||
*
|
||||
* @author <a href="https://qaiu.top">QAIU</a>
|
||||
* @date 2023/7/29 17:35
|
||||
*/
|
||||
public class JsExecUtils {
|
||||
private static final Invocable inv;
|
||||
|
||||
// 初始化脚本引擎
|
||||
static {
|
||||
ScriptEngineManager engineManager = new ScriptEngineManager();
|
||||
ScriptEngine engine = engineManager.getEngineByName("JavaScript"); // 得到脚本引擎
|
||||
|
||||
try {
|
||||
engine.eval(JsContent.ye123);
|
||||
inv = (Invocable) engine;
|
||||
} catch (ScriptException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 调用js文件
|
||||
*/
|
||||
public static ScriptObjectMirror executeJs(String functionName, Object... args) throws ScriptException,
|
||||
NoSuchMethodException {
|
||||
//调用js中的函数
|
||||
return (ScriptObjectMirror) inv.invokeFunction(functionName, args);
|
||||
}
|
||||
|
||||
/**
|
||||
* 调用执行蓝奏云js文件
|
||||
*/
|
||||
public static ScriptObjectMirror executeDynamicJs(String jsText, String funName) throws ScriptException,
|
||||
NoSuchMethodException {
|
||||
ScriptEngineManager engineManager = new ScriptEngineManager();
|
||||
ScriptEngine engine = engineManager.getEngineByName("JavaScript"); // 得到脚本引擎
|
||||
engine.eval(JsContent.lz + "\n" + jsText);
|
||||
Invocable inv = (Invocable) engine;
|
||||
//调用js中的函数
|
||||
if (StringUtils.isNotEmpty(funName)) {
|
||||
inv.invokeFunction(funName);
|
||||
}
|
||||
|
||||
return (ScriptObjectMirror) engine.get("signObj");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package cn.qaiu.util;
|
||||
|
||||
public class StringUtils {
|
||||
|
||||
// 非贪婪截断匹配
|
||||
public static String StringCutNot(final String strtarget, final String strstart)
|
||||
{
|
||||
int startIdx = strtarget.indexOf(strstart);
|
||||
|
||||
if (startIdx != -1) {
|
||||
startIdx += strstart.length();
|
||||
return strtarget.substring(startIdx);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// 非贪婪截断匹配
|
||||
public static String StringCutNot(final String strtarget, final String strstart, final String strend)
|
||||
{
|
||||
int startIdx = strtarget.indexOf(strstart);
|
||||
int endIdx = -1;
|
||||
|
||||
if (startIdx != -1) {
|
||||
startIdx += strstart.length();
|
||||
endIdx = strtarget.indexOf(strend, startIdx);
|
||||
|
||||
if (endIdx != -1) {
|
||||
return strtarget.substring(startIdx, endIdx);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package cn.qaiu.util;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
|
||||
/**
|
||||
* @author <a href="https://qaiu.top">QAIU</a>
|
||||
* @date 2024/5/13 4:10
|
||||
*/
|
||||
public class UUIDUtil {
|
||||
|
||||
public static String fjUuid() {
|
||||
return generateRandomString(21);
|
||||
}
|
||||
|
||||
public static String generateRandomString(int length) {
|
||||
SecureRandom random = new SecureRandom();
|
||||
byte[] randomBytes = new byte[length];
|
||||
random.nextBytes(randomBytes);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (byte b : randomBytes) {
|
||||
int value = b & 0x3F; // 63 in hexadecimal
|
||||
if (value < 36) {
|
||||
sb.append(Integer.toString(value, 36));
|
||||
} else if (value < 62) {
|
||||
sb.append(Character.toUpperCase(Integer.toString(value - 26, 36).charAt(0)));
|
||||
} else if (value > 62) {
|
||||
sb.append("-");
|
||||
} else { // value == 62 or 63
|
||||
sb.append("_");
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
/**
|
||||
* 蓝奏云解析器js签名获取工具
|
||||
*/
|
||||
|
||||
var signObj;
|
||||
|
||||
|
||||
var $, jQuery;
|
||||
|
||||
$ = jQuery = function () {
|
||||
return new jQuery.fn.init();
|
||||
}
|
||||
|
||||
jQuery.fn = jQuery.prototype = {
|
||||
init: function () {
|
||||
return {
|
||||
focus: function (a) {
|
||||
|
||||
},
|
||||
keyup: function(a) {
|
||||
|
||||
},
|
||||
ajax: function (obj) {
|
||||
signObj = obj
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
jQuery.fn.init.prototype = jQuery.fn;
|
||||
|
||||
|
||||
// 伪装jquery.ajax函数获取关键数据
|
||||
$.ajax = function (obj) {
|
||||
signObj = obj
|
||||
}
|
||||
|
||||
var document = {
|
||||
getElementById: function (v) {
|
||||
return {
|
||||
value: 'v'
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
|
||||
<!-- 日志自定义颜色 -->
|
||||
<!-- https://logback.qos.ch/manual/layouts.html#coloring -->
|
||||
|
||||
<!--日志文件主目录:这里${user.home}为当前服务器用户主目录-->
|
||||
<property name="LOG_HOME" value="logs"/>
|
||||
<!--日志文件名称:这里spring.application.name表示工程名称-->
|
||||
|
||||
<property name="LOGBACK_DEFAULT" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"/>
|
||||
<property name="CUSTOMER_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %magenta([%t]) %highlight(%-5p) %yellow(${PID:-}) %cyan(%-40.40logger{39}) : %green(%m%n)"/>
|
||||
<property name="CUSTOMER_PATTERN2" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %highlight(%-5level) -> %magenta([%15.15thread]) %cyan(%-40.40logger{39}) : %msg%n"/>
|
||||
|
||||
<!--配置日志文件(File)-->
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<!--设置策略-->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!--日志文件路径:这里%d{yyyyMMdd}表示按天分类日志-->
|
||||
<FileNamePattern>${LOG_HOME}/%d{yyyyMMdd}/run.log</FileNamePattern>
|
||||
<!--日志保留天数-->
|
||||
<MaxHistory>15</MaxHistory>
|
||||
</rollingPolicy>
|
||||
<!--设置格式-->
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<!-- 或者使用默认配置 -->
|
||||
<!--<pattern>${FILE_LOG_PATTERN}</pattern>-->
|
||||
<charset>utf8</charset>
|
||||
</encoder>
|
||||
<!--日志文件最大的大小-->
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<MaxFileSize>100MB</MaxFileSize>
|
||||
</triggeringPolicy>
|
||||
</appender>
|
||||
|
||||
<!-- 将文件输出设置成异步输出 -->
|
||||
<appender name="ASYNC-FILE" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
|
||||
<discardingThreshold>0</discardingThreshold>
|
||||
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
|
||||
<queueSize>256</queueSize>
|
||||
<!-- 添加附加的appender,最多只能添加一个 -->
|
||||
<appender-ref ref="FILE"/>
|
||||
</appender>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||
<pattern>${CUSTOMER_PATTERN2}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
<logger name="io.netty" level="warn"/>
|
||||
<logger name="io.vertx" level="info"/>
|
||||
<logger name="com.zaxxer.hikari" level="info"/>
|
||||
<root level="info">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<!-- <appender-ref ref="FILE"/>-->
|
||||
</root>
|
||||
</configuration>
|
||||
@@ -1,24 +0,0 @@
|
||||
package qaiu.web.test;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class TestRegex {
|
||||
|
||||
@Test
|
||||
public void regexYFC() {
|
||||
String html = """
|
||||
<input type="hidden" id="typed_id" value="file_559003251828">
|
||||
<input type="hidden" id="share_link_token" value="9cbe4b73521ba4d65a8cd38a8c">
|
||||
""";
|
||||
|
||||
Pattern compile = Pattern.compile("id=\"typed_id\"\\s+value=\"file_(\\d+)\"");
|
||||
Matcher matcher = compile.matcher(html);
|
||||
if (matcher.find()) {
|
||||
System.out.println(matcher.group(0));
|
||||
System.out.println(matcher.group(1));
|
||||
}
|
||||
}
|
||||
}
|
||||
23
pom.xml
23
pom.xml
@@ -7,31 +7,19 @@
|
||||
<groupId>cn.qaiu</groupId>
|
||||
<artifactId>netdisk-fast-download</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>0.1.7</version>
|
||||
<version>0.1.6</version>
|
||||
|
||||
<modules>
|
||||
<module>core</module>
|
||||
<module>web-service</module>
|
||||
<module>core-database</module>
|
||||
<module>parser</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
<packageDirectory>${project.basedir}/web-service/target/package</packageDirectory>
|
||||
|
||||
<slf4j.version>2.0.5</slf4j.version>
|
||||
<vertx.version>4.5.6</vertx.version>
|
||||
<org.reflections.version>0.10.2</org.reflections.version>
|
||||
<lombok.version>1.18.12</lombok.version>
|
||||
<slf4j.version>2.0.5</slf4j.version>
|
||||
<commons-lang3.version>3.12.0</commons-lang3.version>
|
||||
<jackson.version>2.14.2</jackson.version>
|
||||
<logback.version>1.4.12</logback.version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
@@ -116,7 +104,14 @@
|
||||
<!--<failOnError>false</failOnError>-->
|
||||
<!--当配置true时,只清理filesets里的文件,构建目录中得文件不被清理.默认是flase.-->
|
||||
<excludeDefaultDirectories>false</excludeDefaultDirectories>
|
||||
|
||||
<filesets>
|
||||
<fileset>
|
||||
<!--要清理的目录位置-->
|
||||
<directory>${project.basedir}/logs</directory>
|
||||
<!--是否跟随符号链接 (symbolic links)-->
|
||||
<followSymlinks>false</followSymlinks>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
393
web-front/package-lock.json
generated
393
web-front/package-lock.json
generated
@@ -8,7 +8,7 @@
|
||||
"name": "nfd-web",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"axios": "^1.6.0",
|
||||
"axios": "^1.2.2",
|
||||
"core-js": "^3.8.3",
|
||||
"element-ui": "^2.15.12",
|
||||
"vue": "^2.6.14",
|
||||
@@ -56,13 +56,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
"version": "7.22.13",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz",
|
||||
"integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==",
|
||||
"version": "7.18.6",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.18.6.tgz",
|
||||
"integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/highlight": "^7.22.13",
|
||||
"chalk": "^2.4.2"
|
||||
"@babel/highlight": "^7.18.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -122,14 +121,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/generator": {
|
||||
"version": "7.23.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz",
|
||||
"integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==",
|
||||
"version": "7.20.7",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/generator/-/generator-7.20.7.tgz",
|
||||
"integrity": "sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.23.0",
|
||||
"@babel/types": "^7.20.7",
|
||||
"@jridgewell/gen-mapping": "^0.3.2",
|
||||
"@jridgewell/trace-mapping": "^0.3.17",
|
||||
"jsesc": "^2.5.1"
|
||||
},
|
||||
"engines": {
|
||||
@@ -250,9 +248,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-environment-visitor": {
|
||||
"version": "7.22.20",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz",
|
||||
"integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==",
|
||||
"version": "7.18.9",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz",
|
||||
"integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -271,25 +269,25 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-function-name": {
|
||||
"version": "7.23.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz",
|
||||
"integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==",
|
||||
"version": "7.19.0",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz",
|
||||
"integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/template": "^7.22.15",
|
||||
"@babel/types": "^7.23.0"
|
||||
"@babel/template": "^7.18.10",
|
||||
"@babel/types": "^7.19.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-hoist-variables": {
|
||||
"version": "7.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz",
|
||||
"integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==",
|
||||
"version": "7.18.6",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz",
|
||||
"integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.22.5"
|
||||
"@babel/types": "^7.18.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -419,30 +417,30 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-split-export-declaration": {
|
||||
"version": "7.22.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz",
|
||||
"integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==",
|
||||
"version": "7.18.6",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz",
|
||||
"integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.22.5"
|
||||
"@babel/types": "^7.18.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-string-parser": {
|
||||
"version": "7.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",
|
||||
"integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==",
|
||||
"version": "7.19.4",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz",
|
||||
"integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-validator-identifier": {
|
||||
"version": "7.22.20",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
|
||||
"integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
|
||||
"version": "7.19.1",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz",
|
||||
"integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -487,13 +485,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/highlight": {
|
||||
"version": "7.22.20",
|
||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz",
|
||||
"integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==",
|
||||
"version": "7.18.6",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/highlight/-/highlight-7.18.6.tgz",
|
||||
"integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/helper-validator-identifier": "^7.22.20",
|
||||
"chalk": "^2.4.2",
|
||||
"@babel/helper-validator-identifier": "^7.18.6",
|
||||
"chalk": "^2.0.0",
|
||||
"js-tokens": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
@@ -501,9 +499,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/parser": {
|
||||
"version": "7.23.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz",
|
||||
"integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==",
|
||||
"version": "7.20.7",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.20.7.tgz",
|
||||
"integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==",
|
||||
"bin": {
|
||||
"parser": "bin/babel-parser.js"
|
||||
},
|
||||
@@ -1678,33 +1676,33 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/template": {
|
||||
"version": "7.22.15",
|
||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",
|
||||
"integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",
|
||||
"version": "7.20.7",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.20.7.tgz",
|
||||
"integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.22.13",
|
||||
"@babel/parser": "^7.22.15",
|
||||
"@babel/types": "^7.22.15"
|
||||
"@babel/code-frame": "^7.18.6",
|
||||
"@babel/parser": "^7.20.7",
|
||||
"@babel/types": "^7.20.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/traverse": {
|
||||
"version": "7.23.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz",
|
||||
"integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==",
|
||||
"version": "7.20.12",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/traverse/-/traverse-7.20.12.tgz",
|
||||
"integrity": "sha512-MsIbFN0u+raeja38qboyF8TIT7K0BFzz/Yd/77ta4MsUsmP2RAnidIlwq7d5HFQrH/OZJecGV6B71C4zAgpoSQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.22.13",
|
||||
"@babel/generator": "^7.23.0",
|
||||
"@babel/helper-environment-visitor": "^7.22.20",
|
||||
"@babel/helper-function-name": "^7.23.0",
|
||||
"@babel/helper-hoist-variables": "^7.22.5",
|
||||
"@babel/helper-split-export-declaration": "^7.22.6",
|
||||
"@babel/parser": "^7.23.0",
|
||||
"@babel/types": "^7.23.0",
|
||||
"@babel/code-frame": "^7.18.6",
|
||||
"@babel/generator": "^7.20.7",
|
||||
"@babel/helper-environment-visitor": "^7.18.9",
|
||||
"@babel/helper-function-name": "^7.19.0",
|
||||
"@babel/helper-hoist-variables": "^7.18.6",
|
||||
"@babel/helper-split-export-declaration": "^7.18.6",
|
||||
"@babel/parser": "^7.20.7",
|
||||
"@babel/types": "^7.20.7",
|
||||
"debug": "^4.1.0",
|
||||
"globals": "^11.1.0"
|
||||
},
|
||||
@@ -1713,13 +1711,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/types": {
|
||||
"version": "7.23.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz",
|
||||
"integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==",
|
||||
"version": "7.20.7",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.20.7.tgz",
|
||||
"integrity": "sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/helper-string-parser": "^7.22.5",
|
||||
"@babel/helper-validator-identifier": "^7.22.20",
|
||||
"@babel/helper-string-parser": "^7.19.4",
|
||||
"@babel/helper-validator-identifier": "^7.19.1",
|
||||
"to-fast-properties": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
@@ -3564,9 +3562,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz",
|
||||
"integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==",
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.2.2.tgz",
|
||||
"integrity": "sha512-bz/J4gS2S3I7mpN/YZfGFTqhXTYzRho8Ay38w2otuuDR322KzFIWm/4W2K6gIwvWaws5n+mnb7D1lN9uD+QH6Q==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.0",
|
||||
"form-data": "^4.0.0",
|
||||
@@ -3774,13 +3772,13 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/body-parser": {
|
||||
"version": "1.20.2",
|
||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
|
||||
"integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==",
|
||||
"version": "1.20.1",
|
||||
"resolved": "https://registry.npmmirror.com/body-parser/-/body-parser-1.20.1.tgz",
|
||||
"integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"bytes": "3.1.2",
|
||||
"content-type": "~1.0.5",
|
||||
"content-type": "~1.0.4",
|
||||
"debug": "2.6.9",
|
||||
"depd": "2.0.0",
|
||||
"destroy": "1.2.0",
|
||||
@@ -3788,7 +3786,7 @@
|
||||
"iconv-lite": "0.4.24",
|
||||
"on-finished": "2.4.1",
|
||||
"qs": "6.11.0",
|
||||
"raw-body": "2.5.2",
|
||||
"raw-body": "2.5.1",
|
||||
"type-is": "~1.6.18",
|
||||
"unpipe": "1.0.0"
|
||||
},
|
||||
@@ -3799,7 +3797,7 @@
|
||||
},
|
||||
"node_modules/body-parser/node_modules/bytes": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.1.2.tgz",
|
||||
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
@@ -3808,7 +3806,7 @@
|
||||
},
|
||||
"node_modules/body-parser/node_modules/debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
@@ -3817,7 +3815,7 @@
|
||||
},
|
||||
"node_modules/body-parser/node_modules/ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
||||
"dev": true
|
||||
},
|
||||
@@ -3993,22 +3991,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/call-bind": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
|
||||
"integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz",
|
||||
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0",
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"set-function-length": "^1.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
"function-bind": "^1.1.1",
|
||||
"get-intrinsic": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/callsites": {
|
||||
@@ -4680,9 +4669,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/content-type": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
|
||||
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmmirror.com/content-type/-/content-type-1.0.4.tgz",
|
||||
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
@@ -4695,9 +4684,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/cookie": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz",
|
||||
"integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==",
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.5.0.tgz",
|
||||
"integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
@@ -5805,23 +5794,6 @@
|
||||
"clone": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/define-data-property": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
|
||||
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0",
|
||||
"es-errors": "^1.3.0",
|
||||
"gopd": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/define-lazy-prop": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
|
||||
@@ -6136,27 +6108,6 @@
|
||||
"stackframe": "^1.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-define-property": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
|
||||
"integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"get-intrinsic": "^1.2.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-errors": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
||||
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-module-lexer": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.0.tgz",
|
||||
@@ -6904,17 +6855,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/express": {
|
||||
"version": "4.19.2",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz",
|
||||
"integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==",
|
||||
"version": "4.18.2",
|
||||
"resolved": "https://registry.npmmirror.com/express/-/express-4.18.2.tgz",
|
||||
"integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"accepts": "~1.3.8",
|
||||
"array-flatten": "1.1.1",
|
||||
"body-parser": "1.20.2",
|
||||
"body-parser": "1.20.1",
|
||||
"content-disposition": "0.5.4",
|
||||
"content-type": "~1.0.4",
|
||||
"cookie": "0.6.0",
|
||||
"cookie": "0.5.0",
|
||||
"cookie-signature": "1.0.6",
|
||||
"debug": "2.6.9",
|
||||
"depd": "2.0.0",
|
||||
@@ -7287,15 +7238,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.6",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
|
||||
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
||||
}
|
||||
],
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
@@ -7438,13 +7383,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
||||
"dev": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.1.tgz",
|
||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/functional-red-black-tree": {
|
||||
"version": "1.0.1",
|
||||
@@ -7471,22 +7413,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/get-intrinsic": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
|
||||
"integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.1.3.tgz",
|
||||
"integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"has-proto": "^1.0.1",
|
||||
"has-symbols": "^1.0.3",
|
||||
"hasown": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
"has-symbols": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/get-stream": {
|
||||
@@ -7634,18 +7568,6 @@
|
||||
"delegate": "^3.1.2"
|
||||
}
|
||||
},
|
||||
"node_modules/gopd": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
|
||||
"integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"get-intrinsic": "^1.1.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.10",
|
||||
"resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.10.tgz",
|
||||
@@ -7692,27 +7614,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/has-property-descriptors": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
|
||||
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz",
|
||||
"integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-proto": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
|
||||
"integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
"get-intrinsic": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/has-symbols": {
|
||||
@@ -7793,18 +7700,6 @@
|
||||
"integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/hasown": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/he": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/he/-/he-1.2.0.tgz",
|
||||
@@ -8015,7 +7910,7 @@
|
||||
},
|
||||
"node_modules/iconv-lite": {
|
||||
"version": "0.4.24",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
@@ -9033,7 +8928,7 @@
|
||||
},
|
||||
"node_modules/media-typer": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-0.3.0.tgz",
|
||||
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
@@ -9733,13 +9628,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/object-inspect": {
|
||||
"version": "1.13.1",
|
||||
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",
|
||||
"integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==",
|
||||
"dev": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.12.2.tgz",
|
||||
"integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/object-keys": {
|
||||
"version": "1.1.1",
|
||||
@@ -10958,7 +10850,7 @@
|
||||
},
|
||||
"node_modules/qs": {
|
||||
"version": "6.11.0",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/qs/-/qs-6.11.0.tgz",
|
||||
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
@@ -10966,9 +10858,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/queue-microtask": {
|
||||
@@ -11019,9 +10908,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/raw-body": {
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
|
||||
"integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/raw-body/-/raw-body-2.5.1.tgz",
|
||||
"integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"bytes": "3.1.2",
|
||||
@@ -11035,7 +10924,7 @@
|
||||
},
|
||||
"node_modules/raw-body/node_modules/bytes": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.1.2.tgz",
|
||||
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
@@ -11401,7 +11290,7 @@
|
||||
},
|
||||
"node_modules/safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
||||
"dev": true
|
||||
},
|
||||
@@ -11598,23 +11487,6 @@
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/set-function-length": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
|
||||
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"define-data-property": "^1.1.4",
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"gopd": "^1.0.1",
|
||||
"has-property-descriptors": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/set-value": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/set-value/-/set-value-2.0.1.tgz",
|
||||
@@ -11688,21 +11560,14 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/side-channel": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
|
||||
"integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.0.4.tgz",
|
||||
"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"es-errors": "^1.3.0",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"object-inspect": "^1.13.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
"call-bind": "^1.0.0",
|
||||
"get-intrinsic": "^1.0.2",
|
||||
"object-inspect": "^1.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/signal-exit": {
|
||||
@@ -12774,7 +12639,7 @@
|
||||
},
|
||||
"node_modules/type-is": {
|
||||
"version": "1.6.18",
|
||||
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/type-is/-/type-is-1.6.18.tgz",
|
||||
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
@@ -13479,9 +13344,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/webpack-dev-middleware": {
|
||||
"version": "5.3.4",
|
||||
"resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz",
|
||||
"integrity": "sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q==",
|
||||
"version": "5.3.3",
|
||||
"resolved": "https://registry.npmmirror.com/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz",
|
||||
"integrity": "sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"colorette": "^2.0.10",
|
||||
@@ -13493,10 +13358,6 @@
|
||||
"engines": {
|
||||
"node": ">= 12.13.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/webpack"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"webpack": "^4.0.0 || ^5.0.0"
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^1.6.0",
|
||||
"axios": "^1.2.2",
|
||||
"core-js": "^3.8.3",
|
||||
"element-ui": "^2.15.12",
|
||||
"vue": "^2.6.14",
|
||||
|
||||
@@ -10,16 +10,10 @@
|
||||
<h3 style="text-align: center;">NFD网盘直链解析(API演示)</h3>
|
||||
<div class="typo">
|
||||
<p><strong>项目GitHub </strong><a href="https://github.com/qaiu/netdisk-fast-download" target="_blank"
|
||||
rel="nofollow"><u>netdisk-fast-download</u></a></p>
|
||||
<p><strong>当前页面修改自开源项目</strong><a href="https://github.com/HurryBy/CloudDiskAnalysis"
|
||||
target="_blank"
|
||||
rel="nofollow"><u>CloudDiskAnalysis</u></a></p>
|
||||
rel="nofollow"><u>netdisk-fast-download</u></a></p>
|
||||
<p><strong>当前页面修改自开源项目</strong><a href="https://github.com/HurryBy/CloudDiskAnalysis" target="_blank"
|
||||
rel="nofollow"><u>CloudDiskAnalysis</u></a></p>
|
||||
<p><strong>目前支持 </strong>已支持蓝奏云/奶牛快传/移动云云空间/UC网盘(暂时失效)/小飞机盘/亿方云/123云盘</p>
|
||||
<p>
|
||||
<el-button><strong @click="getInfo">刷新API调用统计</strong></el-button>
|
||||
</p>
|
||||
<p>节点1: 成功:{{ node1Info.success }},失败:{{ node1Info.fail }},总数:{{ node1Info.total }}</p>
|
||||
<p>节点2: 成功:{{ node2Info.success }},失败:{{ node2Info.fail }},总数:{{ node2Info.total }}</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="main" v-loading="isLoading">
|
||||
@@ -30,11 +24,10 @@
|
||||
</el-input>
|
||||
<el-input placeholder="请输入密码" v-model="password" id="url" lass="input-with-select"></el-input>
|
||||
<el-input v-show="respData.data" placeholder="解析地址" :value="getLink2" id="url" lass="input-with-select">
|
||||
<el-button slot="append" v-clipboard:copy="getLink2"
|
||||
<el-button slot="append" v-clipboard:copy="getLink2"
|
||||
v-clipboard:success="onCopy"
|
||||
v-clipboard:error="onError">点我复制
|
||||
</el-button>
|
||||
</el-input>
|
||||
v-clipboard:error="onError">点我复制</el-button>
|
||||
</el-input>
|
||||
</div>
|
||||
<div v-show="respData.code" style="margin-top: 10px">
|
||||
<strong>解析结果: </strong>
|
||||
@@ -120,9 +113,7 @@ export default {
|
||||
},
|
||||
],
|
||||
getLink: '',
|
||||
getLink2: '',
|
||||
node1Info: {},
|
||||
node2Info: {},
|
||||
getLink2: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -160,30 +151,12 @@ export default {
|
||||
}
|
||||
)
|
||||
},
|
||||
onCopy() {
|
||||
onCopy(){
|
||||
this.$message.success('复制成功')
|
||||
},
|
||||
onError() {
|
||||
onError(){
|
||||
this.$message.error('复制失败')
|
||||
},
|
||||
getInfo() {
|
||||
// 初始化统计信息
|
||||
axios.get('/n1/statisticsInfo').then(
|
||||
response => {
|
||||
if (response.data.success) {
|
||||
this.node1Info = response.data.data
|
||||
}
|
||||
})
|
||||
axios.get('/n2/statisticsInfo').then(
|
||||
response => {
|
||||
if (response.data.success) {
|
||||
this.node2Info = response.data.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getInfo()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -5,17 +5,19 @@
|
||||
<parent>
|
||||
<artifactId>netdisk-fast-download</artifactId>
|
||||
<groupId>cn.qaiu</groupId>
|
||||
<version>0.1.7</version>
|
||||
<version>0.1.6</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>0.1.7</version>
|
||||
<version>0.1.6</version>
|
||||
<artifactId>web-service</artifactId>
|
||||
|
||||
<properties>
|
||||
<packageDirectory>${project.basedir}/target/package</packageDirectory>
|
||||
<java.version>17</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<finalName>netdisk-fast-download</finalName>
|
||||
<slf4j.version>2.0.5</slf4j.version>
|
||||
<vertx-jooq.version>6.1.0</vertx-jooq.version>
|
||||
<finalName>netdisk-fast-download-${project.version}</finalName>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -34,35 +36,37 @@
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>${logback.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.fusesource.jansi/jansi -->
|
||||
<dependency>
|
||||
<groupId>org.fusesource.jansi</groupId>
|
||||
<artifactId>jansi</artifactId>
|
||||
<version>1.17.1</version>
|
||||
<version>1.4.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.qaiu</groupId>
|
||||
<artifactId>core-database</artifactId>
|
||||
<version>0.1.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.qaiu</groupId>
|
||||
<artifactId>parser</artifactId>
|
||||
<version>0.1.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.vertx</groupId>
|
||||
<artifactId>vertx-web-client</artifactId>
|
||||
<version>4.4.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.qaiu</groupId>
|
||||
<artifactId>core-database</artifactId>
|
||||
<version>0.1.6</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.openjdk.nashorn/nashorn-core -->
|
||||
<dependency>
|
||||
<groupId>org.openjdk.nashorn</groupId>
|
||||
<artifactId>nashorn-core</artifactId>
|
||||
<version>15.4</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -101,8 +105,6 @@
|
||||
<exclude>*.**</exclude>
|
||||
<exclude>*/*.xml</exclude>
|
||||
<exclude>conf/**</exclude>
|
||||
<exclude>js/**</exclude>
|
||||
<exclude>http-tools/**</exclude>
|
||||
</excludes>
|
||||
<archive>
|
||||
<manifest>
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
package cn.qaiu.lz;
|
||||
|
||||
import cn.qaiu.WebClientVertxInit;
|
||||
import cn.qaiu.db.pool.JDBCPoolInit;
|
||||
import cn.qaiu.vx.core.Deploy;
|
||||
import cn.qaiu.vx.core.util.ConfigConstant;
|
||||
import cn.qaiu.vx.core.util.VertxHolder;
|
||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.core.json.jackson.DatabindCodec;
|
||||
|
||||
|
||||
/**
|
||||
@@ -28,8 +24,6 @@ public class AppMain {
|
||||
* @param jsonObject 配置
|
||||
*/
|
||||
private static void exec(JsonObject jsonObject) {
|
||||
WebClientVertxInit.init(VertxHolder.getVertxInstance());
|
||||
DatabindCodec.mapper().registerModule(new JavaTimeModule());
|
||||
if (jsonObject.getJsonObject(ConfigConstant.SERVER).getBoolean("enableDatabase")) {
|
||||
JDBCPoolInit.builder().config(jsonObject.getJsonObject("dataSource")).build().initPool();
|
||||
}
|
||||
|
||||
@@ -1,27 +1,29 @@
|
||||
package cn.qaiu.lz.common.interceptorImpl;
|
||||
|
||||
import cn.qaiu.vx.core.annotaions.HandleSortFilter;
|
||||
import cn.qaiu.vx.core.interceptor.BeforeInterceptor;
|
||||
import cn.qaiu.vx.core.base.BaseHttpApi;
|
||||
import cn.qaiu.vx.core.interceptor.Interceptor;
|
||||
import cn.qaiu.vx.core.util.SharedDataUtil;
|
||||
import io.vertx.core.json.JsonArray;
|
||||
import io.vertx.ext.web.RoutingContext;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static cn.qaiu.vx.core.util.ConfigConstant.IGNORES_REG;
|
||||
|
||||
/**
|
||||
* 前置拦截器实现
|
||||
* 默认拦截器实现
|
||||
* 校验用户是否合法 <br>
|
||||
* TODO 暂时只做简单实现
|
||||
*/
|
||||
@Slf4j
|
||||
@HandleSortFilter(1)
|
||||
public class DefaultInterceptor implements BeforeInterceptor {
|
||||
public class DefaultInterceptor implements Interceptor, BaseHttpApi {
|
||||
|
||||
protected final JsonArray ignores = SharedDataUtil.getJsonArrayForCustomConfig(IGNORES_REG);
|
||||
private final JsonArray ignores = SharedDataUtil.getJsonArrayForCustomConfig("ignoresReg");
|
||||
|
||||
@Override
|
||||
public void handle(RoutingContext ctx) {
|
||||
System.out.println("进入前置拦截器1->" + ctx.request().path());
|
||||
doNext(ctx);
|
||||
public void beforeHandle(RoutingContext ctx) {
|
||||
ctx.next();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterHandle(RoutingContext context) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
package cn.qaiu.lz.common.interceptorImpl;
|
||||
|
||||
import cn.qaiu.db.pool.JDBCPoolInit;
|
||||
import cn.qaiu.lz.common.model.ParserLogInfo;
|
||||
import cn.qaiu.vx.core.annotaions.HandleSortFilter;
|
||||
import cn.qaiu.vx.core.interceptor.AfterInterceptor;
|
||||
import cn.qaiu.vx.core.model.JsonResult;
|
||||
import cn.qaiu.vx.core.util.CommonUtil;
|
||||
import cn.qaiu.vx.core.util.SharedDataUtil;
|
||||
import io.vertx.core.json.JsonArray;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.RoutingContext;
|
||||
import io.vertx.jdbcclient.JDBCPool;
|
||||
import io.vertx.sqlclient.templates.SqlTemplate;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static cn.qaiu.vx.core.util.ConfigConstant.IGNORES_REG;
|
||||
|
||||
|
||||
/**
|
||||
* 记录解析日志
|
||||
*/
|
||||
@Slf4j
|
||||
@HandleSortFilter(99)
|
||||
public class LogStatistics implements AfterInterceptor {
|
||||
|
||||
JDBCPool client = JDBCPoolInit.instance().getPool();
|
||||
private final JsonArray ignores = SharedDataUtil.getJsonArrayForCustomConfig(IGNORES_REG);
|
||||
@Override
|
||||
public void handle(RoutingContext ctx, JsonObject responseData) {
|
||||
|
||||
// 判断是否忽略
|
||||
if (CommonUtil.matchRegList(ignores.getList(), ctx.request().path())) {
|
||||
return;
|
||||
}
|
||||
|
||||
ParserLogInfo parserLogInfo = new ParserLogInfo();
|
||||
parserLogInfo.setPath(ctx.request().uri());
|
||||
if (responseData == null) {
|
||||
String location = ctx.response().headers().get("location");
|
||||
if (location != null) {
|
||||
parserLogInfo.setCode(200);
|
||||
parserLogInfo.setData(location);
|
||||
} else {
|
||||
log.error("location不存在且responseData为空, path={}", ctx.request().path());
|
||||
}
|
||||
insert(parserLogInfo);
|
||||
|
||||
} else if (responseData.containsKey("code")) {
|
||||
JsonResult<?> result = JsonResult.toJsonResult(responseData);
|
||||
parserLogInfo.setCode(result.getCode());
|
||||
parserLogInfo.setData(result.getCode() == 500 ? result.getMsg() : result.getData().toString());
|
||||
insert(parserLogInfo);
|
||||
} else {
|
||||
log.error("未知json日志: {}, path: {}", responseData.encode(), ctx.request().path());
|
||||
}
|
||||
}
|
||||
|
||||
void insert(ParserLogInfo info) {
|
||||
SqlTemplate
|
||||
.forUpdate(client, "INSERT INTO t_parser_log_info VALUES (#{id},#{logTime},#{path},#{code},#{data})")
|
||||
.mapFrom(ParserLogInfo.class)
|
||||
.execute(info)
|
||||
.onSuccess(res -> {
|
||||
log.info("inserted log: id={}, path={}, code={}", info.getId(), info.getPath(), info.getCode());
|
||||
}).onFailure(Throwable::printStackTrace);
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package cn.qaiu.lz.common.model;
|
||||
|
||||
import cn.qaiu.lz.common.util.SnowflakeIdWorker;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
abstract public class BaseModel {
|
||||
public static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
private String id = String.valueOf(SnowflakeIdWorker.idWorker().nextId());
|
||||
|
||||
private String createBy;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private String updateBy;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package cn.qaiu.lz.common.model;
|
||||
|
||||
import io.vertx.core.MultiMap;
|
||||
|
||||
public class FileInfo extends BaseModel {
|
||||
|
||||
private String fileName;
|
||||
|
||||
private String fileType;
|
||||
|
||||
private Long fileSize;
|
||||
|
||||
private String download;
|
||||
|
||||
private MultiMap header;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package cn.qaiu.lz.common.model;
|
||||
|
||||
import cn.qaiu.db.ddl.Length;
|
||||
import cn.qaiu.db.ddl.Table;
|
||||
import cn.qaiu.lz.common.util.SnowflakeIdWorker;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Table("t_parser_log_info")
|
||||
public class ParserLogInfo {
|
||||
String id = SnowflakeIdWorker.getStringId();
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS", timezone = "GMT+8")
|
||||
Date logTime = new Date();
|
||||
String path;
|
||||
Integer code;
|
||||
|
||||
@Length(varcharSize = 4096)
|
||||
String data;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package cn.qaiu.parser;//package cn.qaiu.lz.common.parser;
|
||||
package cn.qaiu.lz.common.parser;//package cn.qaiu.lz.common.parser;
|
||||
|
||||
import cn.qaiu.parser.impl.*;
|
||||
import cn.qaiu.lz.common.parser.impl.*;
|
||||
import io.vertx.core.Future;
|
||||
|
||||
public interface IPanTool {
|
||||
@@ -15,12 +15,6 @@ public interface IPanTool {
|
||||
case "uc" -> new UcTool(key, pwd);
|
||||
case "ye" -> new YeTool(key, pwd);
|
||||
case "fj" -> new FjTool(key, pwd);
|
||||
case "qk" -> new QkTool(key, pwd);
|
||||
case "le" -> new LeTool(key, pwd);
|
||||
case "ws" -> new WsTool(key, pwd);
|
||||
case "qq" -> new QQTool(key, pwd);
|
||||
case "iz" -> new IzTool(key, pwd);
|
||||
case "ce" -> new CeTool(key, pwd);
|
||||
default -> {
|
||||
throw new UnsupportedOperationException("未知分享类型");
|
||||
}
|
||||
@@ -29,7 +23,7 @@ public interface IPanTool {
|
||||
|
||||
static IPanTool shareURLPrefixMatching(String url, String pwd) {
|
||||
|
||||
if (url.contains(CowTool.LINK_KEY)) {
|
||||
if (url.startsWith(CowTool.SHARE_URL_PREFIX)) {
|
||||
return new CowTool(url, pwd);
|
||||
} else if (url.startsWith(EcTool.SHARE_URL_PREFIX)) {
|
||||
return new EcTool(url, pwd);
|
||||
@@ -39,21 +33,10 @@ public interface IPanTool {
|
||||
return new UcTool(url, pwd);
|
||||
} else if (url.startsWith(YeTool.SHARE_URL_PREFIX)) {
|
||||
return new YeTool(url, pwd);
|
||||
} else if (url.startsWith(FjTool.SHARE_URL_PREFIX) || url.startsWith(FjTool.SHARE_URL_PREFIX2)) {
|
||||
} else if (url.startsWith(FjTool.SHARE_URL_PREFIX)) {
|
||||
return new FjTool(url, pwd);
|
||||
} else if (url.startsWith(IzTool.SHARE_URL_PREFIX)) {
|
||||
return new IzTool(url, pwd);
|
||||
} else if (url.contains(LzTool.LINK_KEY)) {
|
||||
} else if (url.contains("lanzou")) {
|
||||
return new LzTool(url, pwd);
|
||||
} else if (url.startsWith(LeTool.SHARE_URL_PREFIX)) {
|
||||
return new LeTool(url, pwd);
|
||||
} else if (url.contains(WsTool.SHARE_URL_PREFIX) || url.contains(WsTool.SHARE_URL_PREFIX2)) {
|
||||
return new WsTool(url, pwd);
|
||||
} else if (url.contains(QQTool.SHARE_URL_PREFIX)) {
|
||||
return new QQTool(url, pwd);
|
||||
} else if (url.contains("/s/")) {
|
||||
// Cloudreve 网盘通用解析
|
||||
return new CeTool(url, pwd);
|
||||
}
|
||||
|
||||
throw new UnsupportedOperationException("未知分享类型");
|
||||
@@ -1,75 +1,31 @@
|
||||
package cn.qaiu.parser;
|
||||
package cn.qaiu.lz.common.parser;
|
||||
|
||||
import cn.qaiu.WebClientVertxInit;
|
||||
import cn.qaiu.util.CommonUtils;
|
||||
import cn.qaiu.vx.core.util.VertxHolder;
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.core.Promise;
|
||||
import io.vertx.ext.web.client.WebClient;
|
||||
import io.vertx.ext.web.client.WebClientOptions;
|
||||
import io.vertx.ext.web.client.WebClientSession;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* 解析器抽象类包含promise, HTTP Client, 默认失败方法等;
|
||||
* 新增网盘解析器需要继承该类.
|
||||
*/
|
||||
public abstract class PanBase {
|
||||
protected Logger log = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
protected Promise<String> promise = Promise.promise();
|
||||
|
||||
/**
|
||||
* Http client
|
||||
*/
|
||||
protected WebClient client = WebClient.create(WebClientVertxInit.get());
|
||||
protected WebClient client = WebClient.create(VertxHolder.getVertxInstance());
|
||||
protected WebClient clientNoRedirects = WebClient.create(VertxHolder.getVertxInstance(), OPTIONS);
|
||||
private static final WebClientOptions OPTIONS = new WebClientOptions().setFollowRedirects(false);
|
||||
|
||||
/**
|
||||
* Http client session (会话管理, 带cookie请求)
|
||||
*/
|
||||
protected WebClientSession clientSession = WebClientSession.create(client);
|
||||
|
||||
/**
|
||||
* Http client 不自动跳转
|
||||
*/
|
||||
protected WebClient clientNoRedirects = WebClient.create(WebClientVertxInit.get(),
|
||||
new WebClientOptions().setFollowRedirects(false));
|
||||
|
||||
/**
|
||||
* 分享key 可以是整个URL; 如果是URL实现该类时要
|
||||
* 使用{@link CommonUtils#adaptShortPaths(String urlPrefix, String key)}获取真实的分享key
|
||||
*/
|
||||
protected String key;
|
||||
|
||||
/**
|
||||
* 分享密码
|
||||
*/
|
||||
protected String pwd;
|
||||
|
||||
/**
|
||||
* 子类重写此构造方法不需要添加额外逻辑
|
||||
* 如:
|
||||
* <blockquote><pre>
|
||||
* public XxTool(String key, String pwd) {
|
||||
* super(key, pwd);
|
||||
* }
|
||||
* </pre></blockquote>
|
||||
*
|
||||
* @param key 分享key/url
|
||||
* @param pwd 分享密码
|
||||
*/
|
||||
protected PanBase(String key, String pwd) {
|
||||
this.key = key;
|
||||
this.pwd = pwd;
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败时生成异常消息
|
||||
*
|
||||
* @param t 异常实例
|
||||
* @param errorMsg 提示消息
|
||||
* @param args log参数变量
|
||||
*/
|
||||
protected void fail(Throwable t, String errorMsg, Object... args) {
|
||||
try {
|
||||
String s = String.format(errorMsg.replaceAll("\\{}", "%s"), args);
|
||||
@@ -82,12 +38,6 @@ public abstract class PanBase {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败时生成异常消息
|
||||
*
|
||||
* @param errorMsg 提示消息
|
||||
* @param args log参数变量
|
||||
*/
|
||||
protected void fail(String errorMsg, Object... args) {
|
||||
try {
|
||||
String s = String.format(errorMsg.replaceAll("\\{}", "%s"), args);
|
||||
@@ -100,12 +50,6 @@ public abstract class PanBase {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成失败Future的处理器
|
||||
*
|
||||
* @param errorMsg 提示消息
|
||||
* @return Handler
|
||||
*/
|
||||
protected Handler<Throwable> handleFail(String errorMsg) {
|
||||
return t -> fail(this.getClass().getSimpleName() + " - 请求异常 {}: -> {}", errorMsg, t.fillInStackTrace());
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
package cn.qaiu.parser;
|
||||
package cn.qaiu.lz.common.parser;
|
||||
|
||||
import cn.qaiu.lz.common.parser.impl.LzTool;
|
||||
|
||||
/**
|
||||
* @author <a href="https://qaiu.top">QAIU</a>
|
||||
@@ -1,8 +1,8 @@
|
||||
package cn.qaiu.parser.impl;
|
||||
package cn.qaiu.lz.common.parser.impl;
|
||||
|
||||
import cn.qaiu.parser.IPanTool;
|
||||
import cn.qaiu.parser.PanBase;
|
||||
import cn.qaiu.util.CommonUtils;
|
||||
import cn.qaiu.lz.common.parser.IPanTool;
|
||||
import cn.qaiu.lz.common.parser.PanBase;
|
||||
import cn.qaiu.lz.common.util.CommonUtils;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -18,8 +18,6 @@ public class CowTool extends PanBase implements IPanTool {
|
||||
private static final String API_REQUEST_URL = "https://cowtransfer.com/core/api/transfer/share";
|
||||
public static final String SHARE_URL_PREFIX = "https://cowtransfer.com/s/";
|
||||
|
||||
public static final String LINK_KEY = "cowtransfer.com/s/";
|
||||
|
||||
public CowTool(String key, String pwd) {
|
||||
super(key, pwd);
|
||||
}
|
||||
@@ -32,16 +30,8 @@ public class CowTool extends PanBase implements IPanTool {
|
||||
if ("success".equals(resJson.getString("message")) && resJson.containsKey("data")) {
|
||||
JsonObject dataJson = resJson.getJsonObject("data");
|
||||
String guid = dataJson.getString("guid");
|
||||
StringBuilder url2Build = new StringBuilder(API_REQUEST_URL + "/download?transferGuid=" + guid);
|
||||
if (dataJson.getBoolean("zipDownload")) {
|
||||
// &title=xxx
|
||||
JsonObject firstFolder = dataJson.getJsonObject("firstFolder");
|
||||
url2Build.append("&title=").append(firstFolder.getString("title"));
|
||||
} else {
|
||||
String fileId = dataJson.getJsonObject("firstFile").getString("id");
|
||||
url2Build.append("&fileId=").append(fileId);
|
||||
}
|
||||
String url2 = url2Build.toString();
|
||||
String fileId = dataJson.getJsonObject("firstFile").getString("id");
|
||||
String url2 = API_REQUEST_URL + "/download?transferGuid=" + guid + "&fileId=" + fileId;
|
||||
client.getAbs(url2).send().onSuccess(res2 -> {
|
||||
JsonObject res2Json = res2.bodyAsJsonObject();
|
||||
if ("success".equals(res2Json.getString("message")) && res2Json.containsKey("data")) {
|
||||
@@ -1,8 +1,8 @@
|
||||
package cn.qaiu.parser.impl;
|
||||
package cn.qaiu.lz.common.parser.impl;
|
||||
|
||||
import cn.qaiu.parser.IPanTool;
|
||||
import cn.qaiu.parser.PanBase;
|
||||
import cn.qaiu.util.CommonUtils;
|
||||
import cn.qaiu.lz.common.parser.IPanTool;
|
||||
import cn.qaiu.lz.common.parser.PanBase;
|
||||
import cn.qaiu.lz.common.util.CommonUtils;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.json.JsonArray;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
@@ -13,7 +13,7 @@ import io.vertx.uritemplate.UriTemplate;
|
||||
*/
|
||||
public class EcTool extends PanBase implements IPanTool {
|
||||
private static final String FIRST_REQUEST_URL = "https://www.ecpan.cn/drive/fileextoverrid" +
|
||||
".do?extractionCode={extractionCode}&chainUrlTemplate=https:%2F%2Fwww.ecpan" +
|
||||
".do?chainUrlTemplate=https:%2F%2Fwww.ecpan" +
|
||||
".cn%2Fweb%2F%23%2FyunpanProxy%3Fpath%3D%252F%2523%252Fdrive%252Foutside&parentId=-1&data={dataKey}";
|
||||
|
||||
private static final String DOWNLOAD_REQUEST_URL = "https://www.ecpan.cn/drive/sharedownload.do";
|
||||
@@ -27,11 +27,7 @@ public class EcTool extends PanBase implements IPanTool {
|
||||
public Future<String> parse() {
|
||||
String dataKey = CommonUtils.adaptShortPaths(SHARE_URL_PREFIX, key);
|
||||
// 第一次请求 获取文件信息
|
||||
client.getAbs(UriTemplate.of(FIRST_REQUEST_URL))
|
||||
.setTemplateParam("dataKey", dataKey)
|
||||
.setTemplateParam("extractionCode", pwd == null ? "" : pwd)
|
||||
.send()
|
||||
.onSuccess(res -> {
|
||||
client.getAbs(UriTemplate.of(FIRST_REQUEST_URL)).setTemplateParam("dataKey", dataKey).send().onSuccess(res -> {
|
||||
JsonObject jsonObject = res.bodyAsJsonObject();
|
||||
log.debug("ecPan get file info -> {}", jsonObject);
|
||||
JsonObject fileInfo = jsonObject
|
||||
@@ -41,11 +37,6 @@ public class EcTool extends PanBase implements IPanTool {
|
||||
fail("{} 解析失败:{} key = {}", FIRST_REQUEST_URL, fileInfo.getString("errMesg"), dataKey);
|
||||
return;
|
||||
}
|
||||
if (!fileInfo.containsKey("cloudpFile")) {
|
||||
fail("{} 解析失败:cloudpFile不存在 key = {}", FIRST_REQUEST_URL, dataKey);
|
||||
return;
|
||||
}
|
||||
|
||||
JsonObject cloudpFile = fileInfo.getJsonObject("cloudpFile");
|
||||
JsonArray fileIdList = JsonArray.of(cloudpFile);
|
||||
// 构造请求JSON {"extCodeFlag":0,"isIp":0}
|
||||
@@ -1,8 +1,8 @@
|
||||
package cn.qaiu.parser.impl;
|
||||
package cn.qaiu.lz.common.parser.impl;
|
||||
|
||||
import cn.qaiu.parser.IPanTool;
|
||||
import cn.qaiu.parser.PanBase;
|
||||
import cn.qaiu.util.CommonUtils;
|
||||
import cn.qaiu.lz.common.parser.IPanTool;
|
||||
import cn.qaiu.lz.common.parser.PanBase;
|
||||
import cn.qaiu.lz.common.util.CommonUtils;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.MultiMap;
|
||||
import io.vertx.core.Promise;
|
||||
@@ -1,79 +1,81 @@
|
||||
package cn.qaiu.parser.impl;
|
||||
|
||||
import cn.qaiu.parser.IPanTool;
|
||||
import cn.qaiu.parser.PanBase;
|
||||
import cn.qaiu.util.AESUtils;
|
||||
import cn.qaiu.util.CommonUtils;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.MultiMap;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.uritemplate.UriTemplate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 蓝奏云优享
|
||||
*
|
||||
*/
|
||||
public class IzTool extends PanBase implements IPanTool {
|
||||
|
||||
public static final String SHARE_URL_PREFIX = "https://www.ilanzou.com/s/";
|
||||
private static final String API_URL_PREFIX = "https://api.ilanzou.com/unproved/";
|
||||
|
||||
private static final String FIRST_REQUEST_URL = API_URL_PREFIX + "recommend/list?devType=6&devModel=Chrome&extra" +
|
||||
"=2&shareId={shareId}&type=0&offset=1&limit=60";
|
||||
|
||||
private static final String SECOND_REQUEST_URL = API_URL_PREFIX + "file/redirect?downloadId={fidEncode}&enable=1" +
|
||||
"&devType=6&uuid={uuid}×tamp={ts}&auth={auth}";
|
||||
|
||||
public IzTool(String key, String pwd) {
|
||||
super(key, pwd);
|
||||
}
|
||||
|
||||
public Future<String> parse() {
|
||||
String dataKey = CommonUtils.adaptShortPaths(SHARE_URL_PREFIX, key);
|
||||
|
||||
// 24.5.12 ilanzou改规则无需计算shareId
|
||||
// String shareId = String.valueOf(AESUtils.idEncryptIz(dataKey));
|
||||
|
||||
// 第一次请求 获取文件信息
|
||||
// POST https://api.feijipan.com/ws/recommend/list?devType=6&devModel=Chrome&extra=2&shareId=146731&type=0&offset=1&limit=60
|
||||
client.postAbs(UriTemplate.of(FIRST_REQUEST_URL)).setTemplateParam("shareId", dataKey).send().onSuccess(res -> {
|
||||
JsonObject resJson = res.bodyAsJsonObject();
|
||||
if (resJson.getInteger("code") != 200) {
|
||||
fail(FIRST_REQUEST_URL + " 返回异常: " + resJson);
|
||||
return;
|
||||
}
|
||||
if (resJson.getJsonArray("list").size() == 0) {
|
||||
fail(FIRST_REQUEST_URL + " 解析文件列表为空: " + resJson);
|
||||
return;
|
||||
}
|
||||
// 文件Id
|
||||
JsonObject fileInfo = resJson.getJsonArray("list").getJsonObject(0);
|
||||
String fileId = fileInfo.getString("fileIds");
|
||||
String userId = fileInfo.getString("userId");
|
||||
// 其他参数
|
||||
long nowTs = System.currentTimeMillis();
|
||||
String tsEncode = AESUtils.encrypt2HexIz(Long.toString(nowTs));
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
// String fidEncode = AESUtils.encrypt2HexIz(fileId + "|");
|
||||
String fidEncode = AESUtils.encrypt2HexIz(fileId + "|" + userId);
|
||||
String auth = AESUtils.encrypt2HexIz(fileId + "|" + nowTs);
|
||||
// 第二次请求
|
||||
clientNoRedirects.getAbs(UriTemplate.of(SECOND_REQUEST_URL))
|
||||
.setTemplateParam("fidEncode", fidEncode)
|
||||
.setTemplateParam("uuid", uuid)
|
||||
.setTemplateParam("ts", tsEncode)
|
||||
.setTemplateParam("auth", auth).send().onSuccess(res2 -> {
|
||||
MultiMap headers = res2.headers();
|
||||
if (!headers.contains("Location")) {
|
||||
fail(SECOND_REQUEST_URL + " 未找到重定向URL: \n" + res.headers());
|
||||
return;
|
||||
}
|
||||
promise.complete(headers.get("Location"));
|
||||
}).onFailure(handleFail(SECOND_REQUEST_URL));
|
||||
}).onFailure(handleFail(FIRST_REQUEST_URL));
|
||||
|
||||
return promise.future();
|
||||
}
|
||||
}
|
||||
package cn.qaiu.lz.common.parser.impl;
|
||||
|
||||
import cn.qaiu.lz.common.parser.IPanTool;
|
||||
import cn.qaiu.lz.common.parser.PanBase;
|
||||
import cn.qaiu.lz.common.util.AESUtils;
|
||||
import cn.qaiu.lz.common.util.CommonUtils;
|
||||
import cn.qaiu.vx.core.util.VertxHolder;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.MultiMap;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.client.WebClient;
|
||||
import io.vertx.ext.web.client.WebClientOptions;
|
||||
import io.vertx.uritemplate.UriTemplate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 小飞机网盘
|
||||
*
|
||||
* @version V016_230609
|
||||
*/
|
||||
public class FjTool extends PanBase implements IPanTool {
|
||||
|
||||
public static final String SHARE_URL_PREFIX = "https://www.feijix.com/s/";
|
||||
private static final String API_URL_PREFIX = "https://api.feijipan.com/ws/";
|
||||
|
||||
private static final String FIRST_REQUEST_URL = API_URL_PREFIX + "recommend/list?devType=6&devModel=Chrome&extra" +
|
||||
"=2&shareId={shareId}&type=0&offset=1&limit=60";
|
||||
|
||||
private static final String SECOND_REQUEST_URL = API_URL_PREFIX + "file/redirect?downloadId={fidEncode}&enable=1" +
|
||||
"&devType=6&uuid={uuid}×tamp={ts}&auth={auth}";
|
||||
|
||||
public FjTool(String key, String pwd) {
|
||||
super(key, pwd);
|
||||
}
|
||||
|
||||
public Future<String> parse() {
|
||||
String dataKey = CommonUtils.adaptShortPaths(SHARE_URL_PREFIX, key);
|
||||
|
||||
WebClient client = WebClient.create(VertxHolder.getVertxInstance(),
|
||||
new WebClientOptions().setFollowRedirects(false));
|
||||
String shareId = String.valueOf(AESUtils.idEncrypt(dataKey));
|
||||
|
||||
// 第一次请求 获取文件信息
|
||||
// POST https://api.feijipan.com/ws/recommend/list?devType=6&devModel=Chrome&extra=2&shareId=146731&type=0&offset=1&limit=60
|
||||
client.postAbs(UriTemplate.of(FIRST_REQUEST_URL)).setTemplateParam("shareId", shareId).send().onSuccess(res -> {
|
||||
JsonObject resJson = res.bodyAsJsonObject();
|
||||
if (resJson.getInteger("code") != 200) {
|
||||
fail(FIRST_REQUEST_URL + " 返回异常: " + resJson);
|
||||
return;
|
||||
}
|
||||
if (resJson.getJsonArray("list").size() == 0) {
|
||||
fail(FIRST_REQUEST_URL + " 解析文件列表为空: " + resJson);
|
||||
return;
|
||||
}
|
||||
// 文件Id
|
||||
String fileId = resJson.getJsonArray("list").getJsonObject(0).getString("fileIds");
|
||||
// 其他参数
|
||||
long nowTs = System.currentTimeMillis();
|
||||
String tsEncode = AESUtils.encrypt2Hex(Long.toString(nowTs));
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
String fidEncode = AESUtils.encrypt2Hex(fileId + "|");
|
||||
String auth = AESUtils.encrypt2Hex(fileId + "|" + nowTs);
|
||||
// 第二次请求
|
||||
client.getAbs(UriTemplate.of(SECOND_REQUEST_URL))
|
||||
.setTemplateParam("fidEncode", fidEncode)
|
||||
.setTemplateParam("uuid", uuid)
|
||||
.setTemplateParam("ts", tsEncode)
|
||||
.setTemplateParam("auth", auth).send().onSuccess(res2 -> {
|
||||
MultiMap headers = res2.headers();
|
||||
if (!headers.contains("Location")) {
|
||||
fail(SECOND_REQUEST_URL + " 未找到重定向URL: \n" + res.headers());
|
||||
return;
|
||||
}
|
||||
promise.complete(headers.get("Location"));
|
||||
}).onFailure(handleFail(SECOND_REQUEST_URL));
|
||||
}).onFailure(handleFail(FIRST_REQUEST_URL));
|
||||
|
||||
return promise.future();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package cn.qaiu.lz.common.parser.impl;
|
||||
|
||||
import cn.qaiu.lz.common.parser.IPanTool;
|
||||
import cn.qaiu.lz.common.parser.PanBase;
|
||||
import cn.qaiu.vx.core.util.VertxHolder;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.MultiMap;
|
||||
import io.vertx.core.Promise;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.client.WebClient;
|
||||
import io.vertx.ext.web.client.WebClientOptions;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 蓝奏云解析工具
|
||||
*
|
||||
* @author QAIU
|
||||
* @version 1.0 update 2021/5/16 10:39
|
||||
*/
|
||||
public class LzTool extends PanBase implements IPanTool {
|
||||
|
||||
public static final String SHARE_URL_PREFIX = "https://wwwa.lanzoui.com";
|
||||
|
||||
public LzTool(String key, String pwd) {
|
||||
super(key, pwd);
|
||||
}
|
||||
|
||||
public Future<String> parse() {
|
||||
String sUrl = key.startsWith("https://") ? key : SHARE_URL_PREFIX + "/" + key;
|
||||
|
||||
WebClient client = WebClient.create(VertxHolder.getVertxInstance(),
|
||||
new WebClientOptions().setFollowRedirects(false));
|
||||
client.getAbs(sUrl).send().onSuccess(res -> {
|
||||
String html = res.bodyAsString();
|
||||
// 匹配iframe
|
||||
Pattern compile = Pattern.compile("src=\"(/fn\\?[a-zA-Z\\d_+/=]{16,})\"");
|
||||
Matcher matcher = compile.matcher(html);
|
||||
if (!matcher.find()) {
|
||||
// 没有Iframe说明是加密分享, 匹配sign通过密码请求下载页面
|
||||
Pattern compile2 = Pattern.compile("sign=(\\w{16,})");
|
||||
Matcher matcher2 = compile2.matcher(html);
|
||||
if (!matcher2.find()) {
|
||||
fail(sUrl + ": sign正则匹配失败, 可能分享已失效");
|
||||
return;
|
||||
}
|
||||
String sign = matcher2.group(1);
|
||||
getDownURL(promise, sUrl, client, sign);
|
||||
return;
|
||||
}
|
||||
String iframePath = matcher.group(1);
|
||||
client.getAbs(SHARE_URL_PREFIX + iframePath).send().onSuccess(res2 -> {
|
||||
String html2 = res2.bodyAsString();
|
||||
System.out.println(html);
|
||||
Matcher matcher2 = Pattern.compile("'sign'\s*:\s*'(\\w+)'").matcher(html2);
|
||||
if (!matcher2.find()) {
|
||||
fail(SHARE_URL_PREFIX + iframePath + " -> " + sUrl + ": sign正则匹配失败, 可能分享已失效");
|
||||
return;
|
||||
}
|
||||
String sign = matcher2.group(1);
|
||||
getDownURL(promise, sUrl, client, sign);
|
||||
}).onFailure(handleFail(SHARE_URL_PREFIX));
|
||||
}).onFailure(handleFail(sUrl));
|
||||
return promise.future();
|
||||
}
|
||||
|
||||
private void getDownURL(Promise<String> promise, String key, WebClient client, String sign) {
|
||||
MultiMap headers = MultiMap.caseInsensitiveMultiMap();
|
||||
var userAgent2 = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, " +
|
||||
"like " +
|
||||
"Gecko) Chrome/111.0.0.0 Mobile Safari/537.36";
|
||||
headers.set("User-Agent", userAgent2);
|
||||
headers.set("referer", key);
|
||||
headers.set("sec-ch-ua-platform", "Android");
|
||||
headers.set("Accept-Language", "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2");
|
||||
headers.set("sec-ch-ua-mobile", "sec-ch-ua-mobile");
|
||||
|
||||
String url = SHARE_URL_PREFIX + "/ajaxm.php";
|
||||
client.postAbs(url).putHeaders(headers).sendForm(MultiMap
|
||||
.caseInsensitiveMultiMap()
|
||||
.set("action", "downprocess")
|
||||
.set("sign", sign).set("p", pwd)).onSuccess(res2 -> {
|
||||
JsonObject urlJson = res2.bodyAsJsonObject();
|
||||
if (urlJson.getInteger("zt") != 1) {
|
||||
fail(urlJson.getString("inf"));
|
||||
return;
|
||||
}
|
||||
String downUrl = urlJson.getString("dom") + "/file/" + urlJson.getString("url");
|
||||
client.getAbs(downUrl).putHeaders(headers).send()
|
||||
.onSuccess(res3 -> promise.complete(res3.headers().get("Location")))
|
||||
.onFailure(handleFail(downUrl));
|
||||
}).onFailure(handleFail(url));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package cn.qaiu.lz.common.parser.impl;
|
||||
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.Promise;
|
||||
|
||||
public class QkTool {
|
||||
public static Future<String> parse() {
|
||||
Promise<String> promise = Promise.promise();
|
||||
|
||||
return promise.future();
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
package cn.qaiu.parser.impl;
|
||||
package cn.qaiu.lz.common.parser.impl;
|
||||
|
||||
import cn.qaiu.parser.IPanTool;
|
||||
import cn.qaiu.parser.PanBase;
|
||||
import cn.qaiu.util.CommonUtils;
|
||||
import cn.qaiu.lz.common.parser.IPanTool;
|
||||
import cn.qaiu.lz.common.parser.PanBase;
|
||||
import cn.qaiu.lz.common.util.CommonUtils;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.json.JsonArray;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
@@ -1,9 +1,9 @@
|
||||
package cn.qaiu.parser.impl;
|
||||
package cn.qaiu.lz.common.parser.impl;
|
||||
|
||||
import cn.qaiu.parser.IPanTool;
|
||||
import cn.qaiu.parser.PanBase;
|
||||
import cn.qaiu.util.CommonUtils;
|
||||
import cn.qaiu.util.JsExecUtils;
|
||||
import cn.qaiu.lz.common.parser.IPanTool;
|
||||
import cn.qaiu.lz.common.parser.PanBase;
|
||||
import cn.qaiu.lz.common.util.CommonUtils;
|
||||
import cn.qaiu.lz.common.util.JsExecUtils;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.client.WebClient;
|
||||
@@ -100,7 +100,7 @@ public class YeTool extends PanBase implements IPanTool {
|
||||
jsonObject.put("ShareKey", reqBodyJson.getString("ShareKey"));
|
||||
jsonObject.put("FileID", reqBodyJson.getInteger("FileId"));
|
||||
jsonObject.put("S3keyFlag", reqBodyJson.getString("S3KeyFlag"));
|
||||
jsonObject.put("Size", reqBodyJson.getLong("Size"));
|
||||
jsonObject.put("Size", reqBodyJson.getInteger("Size"));
|
||||
jsonObject.put("Etag", reqBodyJson.getString("Etag"));
|
||||
|
||||
// 调用JS文件获取签名
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.qaiu.util;
|
||||
package cn.qaiu.lz.common.util;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
@@ -34,10 +34,7 @@ public class AESUtils {
|
||||
|
||||
public static final String CIPHER_AES2 = "YbQHZqK/PdQql2+7ATcPQHREAxt0Hn0Ob9v317QirZM=";
|
||||
|
||||
public static final String CIPHER_AES2_IZ = "1uQFS3sNeHd/bCrmrQpflXREAxt0Hn0Ob9v317QirZM=";
|
||||
|
||||
public static final String CIPHER_AES0;
|
||||
public static final String CIPHER_AES0_IZ;
|
||||
|
||||
/**
|
||||
* 秘钥长度
|
||||
@@ -62,7 +59,6 @@ public class AESUtils {
|
||||
static {
|
||||
try {
|
||||
CIPHER_AES0 = decryptByBase64AES(CIPHER_AES2, CIPHER_AES);
|
||||
CIPHER_AES0_IZ = decryptByBase64AES(CIPHER_AES2_IZ, CIPHER_AES);
|
||||
} catch (IllegalBlockSizeException | BadPaddingException | NoSuchPaddingException | NoSuchAlgorithmException |
|
||||
InvalidKeyException e) {
|
||||
throw new RuntimeException(e);
|
||||
@@ -158,15 +154,6 @@ public class AESUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static String encrypt2HexIz(String source) {
|
||||
try {
|
||||
return encryptHexByAES(source, CIPHER_AES0_IZ);
|
||||
} catch (NoSuchPaddingException | NoSuchAlgorithmException | InvalidKeyException | IllegalBlockSizeException |
|
||||
BadPaddingException e) {
|
||||
throw new RuntimeException("加密失败: "+ e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* AES解密
|
||||
*
|
||||
@@ -227,14 +214,10 @@ public class AESUtils {
|
||||
'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
|
||||
'p', 'q', 'r', 's', 't', 'u', 'L', 'R', 'S', 'I',
|
||||
'J', 'K'};
|
||||
private static final char[] arrayIz =
|
||||
{'Y', 'y', '0', 'Z', 'z', 'N', 'n', 'M', 'I', '6', 'm', 'W', 'w', '1', 'X', 'x', 'L', 'l', 'K', '7', 'k',
|
||||
'i', 'U', 'u', '2', 'V', 'v', 'J', 'j', '8', 'G', 'g', 'F', 'S', 's', '3', 'T', 't', 'H', 'h',
|
||||
'f', 'E', 'e', 'D', 'Q', 'q', '4', 'R', 'r', '9', 'd', 'a', 'C', 'c', 'B', 'O', 'o', '5', 'P',
|
||||
'p', 'b', 'A'};
|
||||
private static int decodeChar(char c, char[] keys) {
|
||||
for (int i = 0; i < keys.length; i++) {
|
||||
if (c == keys[i]) {
|
||||
|
||||
private static int decodeChar(char c) {
|
||||
for (int i = 0; i < array.length; i++) {
|
||||
if (c == array[i]) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@@ -243,47 +226,21 @@ public class AESUtils {
|
||||
|
||||
// id解密
|
||||
public static int idEncrypt(String str) {
|
||||
return idEncrypt0(str, array, 2, 2);
|
||||
}
|
||||
|
||||
|
||||
// ================================蓝奏优享版Id解密========================================== //
|
||||
public static int idEncryptIz(String str) {
|
||||
// idEncrypt(e) {
|
||||
// let t = 1
|
||||
// , n = 0;
|
||||
// if ("" != e && e.length > 4) {
|
||||
// let r;
|
||||
// e = e.substring(3, e.length - 1);
|
||||
// for (let v = 0; v < e.length; v++)
|
||||
// r = e.charAt(e.length - v - 1),
|
||||
// n += this.decodeChar(r) * t,
|
||||
// t *= 62
|
||||
// }
|
||||
// return n
|
||||
// },
|
||||
|
||||
return idEncrypt0(str, arrayIz, 3, 1);
|
||||
}
|
||||
|
||||
public static int idEncrypt0(String str, char[] keys, int x1, int x2) {
|
||||
// 倍数
|
||||
int multiple = 1;
|
||||
int result = 0;
|
||||
if (StringUtils.isNotEmpty(str) && str.length() > 4) {
|
||||
str = str.substring(x1, str.length() - x2);
|
||||
str = str.substring(2, str.length() - 2);
|
||||
char c;
|
||||
for (int i = 0; i < str.length(); i++) {
|
||||
c = str.charAt(str.length() - i - 1);
|
||||
result += decodeChar(c, keys) * multiple;
|
||||
result += decodeChar(c) * multiple;
|
||||
multiple = multiple * 62;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ========================== musetransfer加密相关 ===========================
|
||||
|
||||
//length用户要求产生字符串的长度
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.qaiu.util;
|
||||
package cn.qaiu.lz.common.util;
|
||||
|
||||
public class ArrayUtil {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.qaiu.util;
|
||||
package cn.qaiu.lz.common.util;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
@@ -7,23 +7,13 @@ import java.util.Map;
|
||||
|
||||
public class CommonUtils {
|
||||
|
||||
/**
|
||||
* 获取分享key 比如: https://www.ilanzou.com/s/xxx -> xxx
|
||||
* @param urlPrefix 不包含key的URL前缀
|
||||
* @param url 完整URL
|
||||
* @return 分享key
|
||||
*/
|
||||
public static String adaptShortPaths(String urlPrefix, String url) {
|
||||
if (!url.startsWith(urlPrefix)) {
|
||||
url = urlPrefix + url;
|
||||
}
|
||||
if (url.endsWith(".html")) {
|
||||
url = url.substring(0, url.length() - 5);
|
||||
}
|
||||
String prefix = "https://";
|
||||
if (!url.startsWith(urlPrefix) && url.startsWith(prefix)) {
|
||||
urlPrefix = urlPrefix.substring(prefix.length());
|
||||
return url.substring(url.indexOf(urlPrefix) + urlPrefix.length());
|
||||
} else if (!url.startsWith(urlPrefix)) {
|
||||
url = urlPrefix + url;
|
||||
}
|
||||
return url.substring(urlPrefix.length());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package cn.qaiu.lz.common.util;
|
||||
|
||||
import org.openjdk.nashorn.api.scripting.ScriptObjectMirror;
|
||||
|
||||
import javax.script.Invocable;
|
||||
import javax.script.ScriptEngine;
|
||||
import javax.script.ScriptEngineManager;
|
||||
import javax.script.ScriptException;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
|
||||
/**
|
||||
* 执行Js脚本
|
||||
* @author <a href="https://qaiu.top">QAIU</a>
|
||||
* @date 2023/7/29 17:35
|
||||
*/
|
||||
public class JsExecUtils {
|
||||
private static final String JS_PATH = "/js/ye123.js";
|
||||
private static Invocable inv;
|
||||
|
||||
// 初始化脚本引擎
|
||||
static {
|
||||
ScriptEngineManager engineManager = new ScriptEngineManager();
|
||||
ScriptEngine engine = engineManager.getEngineByName("JavaScript"); // 得到脚本引擎
|
||||
//获取文件所在的相对路径
|
||||
URL resource = JsExecUtils.class.getResource("/");
|
||||
if (resource == null) {
|
||||
throw new RuntimeException("js resource path is null");
|
||||
}
|
||||
String path = resource.getPath();
|
||||
String reader = path + JS_PATH;
|
||||
try (FileReader fReader = new FileReader(reader)){
|
||||
engine.eval(fReader);
|
||||
fReader.close();
|
||||
inv = (Invocable) engine;
|
||||
} catch (IOException | ScriptException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 调用js文件
|
||||
*/
|
||||
public static ScriptObjectMirror executeJs(String functionName, Object... args) throws ScriptException, NoSuchMethodException {
|
||||
//调用js中的方法
|
||||
return (ScriptObjectMirror) inv.invokeFunction(functionName, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package cn.qaiu.lz.common.util;
|
||||
|
||||
/**
|
||||
* @author <a href="https://qaiu.top">QAIU</a>
|
||||
* @date 2023/7/16 1:53
|
||||
*/
|
||||
public class PanExceptionUtils {
|
||||
|
||||
public static RuntimeException fillRunTimeException(String name, String dataKey, Throwable t) {
|
||||
return new RuntimeException(name + ": 请求异常: key = " + dataKey, t.fillInStackTrace());
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package cn.qaiu.lz.web.http;
|
||||
|
||||
|
||||
import cn.qaiu.lz.web.model.SysUser;
|
||||
import cn.qaiu.lz.web.service.DbService;
|
||||
import cn.qaiu.lz.web.service.UserService;
|
||||
import cn.qaiu.lz.web.model.StatisticsInfo;
|
||||
import cn.qaiu.vx.core.annotaions.RouteHandler;
|
||||
import cn.qaiu.vx.core.annotaions.RouteMapping;
|
||||
import cn.qaiu.vx.core.enums.RouteMethod;
|
||||
import cn.qaiu.vx.core.util.AsyncServiceUtil;
|
||||
import io.vertx.core.Future;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@RouteHandler(value = "/v2", order = 10)
|
||||
@Slf4j
|
||||
public class ParserApi {
|
||||
|
||||
private final UserService userService = AsyncServiceUtil.getAsyncServiceInstance(UserService.class);
|
||||
private final DbService dbService = AsyncServiceUtil.getAsyncServiceInstance(DbService.class);
|
||||
|
||||
@RouteMapping(value = "/login", method = RouteMethod.POST)
|
||||
public Future<SysUser> login(SysUser user) {
|
||||
log.info("<------- login: {}", user.getUsername());
|
||||
return userService.login(user);
|
||||
}
|
||||
|
||||
@RouteMapping(value = "/statisticsInfo", method = RouteMethod.GET, order = 99)
|
||||
public Future<StatisticsInfo> statisticsInfo() {
|
||||
return dbService.getStatisticsInfo();
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,21 @@
|
||||
package cn.qaiu.lz.web.http;
|
||||
|
||||
import cn.qaiu.parser.IPanTool;
|
||||
import cn.qaiu.parser.impl.EcTool;
|
||||
import cn.qaiu.parser.impl.QQTool;
|
||||
import cn.qaiu.lz.common.parser.IPanTool;
|
||||
import cn.qaiu.lz.common.parser.impl.*;
|
||||
import cn.qaiu.lz.web.model.SysUser;
|
||||
import cn.qaiu.lz.web.service.UserService;
|
||||
import cn.qaiu.vx.core.annotaions.RouteHandler;
|
||||
import cn.qaiu.vx.core.annotaions.RouteMapping;
|
||||
import cn.qaiu.vx.core.enums.RouteMethod;
|
||||
import cn.qaiu.vx.core.util.ResponseUtil;
|
||||
import cn.qaiu.vx.core.util.VertxHolder;
|
||||
import cn.qaiu.vx.core.util.AsyncServiceUtil;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.Promise;
|
||||
import io.vertx.core.http.HttpServerRequest;
|
||||
import io.vertx.core.http.HttpServerResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static io.vertx.core.http.HttpHeaders.CONTENT_TYPE;
|
||||
|
||||
/**
|
||||
* 服务API
|
||||
* <br>Create date 2021/4/28 9:15
|
||||
@@ -24,6 +26,14 @@ import lombok.extern.slf4j.Slf4j;
|
||||
@RouteHandler("/")
|
||||
public class ServerApi {
|
||||
|
||||
private final UserService userService = AsyncServiceUtil.getAsyncServiceInstance(UserService.class);
|
||||
|
||||
@RouteMapping(value = "/login", method = RouteMethod.POST)
|
||||
public Future<String> login(SysUser user) {
|
||||
log.info("<------- login: {}", user.getUsername());
|
||||
return userService.login(user);
|
||||
}
|
||||
|
||||
@RouteMapping(value = "/parser", method = RouteMethod.GET, order = 4)
|
||||
public Future<Void> parse(HttpServerResponse response, HttpServerRequest request, String url, String pwd) {
|
||||
|
||||
@@ -32,15 +42,14 @@ public class ServerApi {
|
||||
// 默认读取Url参数会被截断手动获取一下其他参数
|
||||
url = EcTool.SHARE_URL_PREFIX + request.getParam("data");
|
||||
}
|
||||
if (url.contains(QQTool.SHARE_URL_PREFIX)) {
|
||||
// 默认读取Url参数会被截断手动获取一下其他参数
|
||||
url = url + "&key=" + request.getParam("key") +
|
||||
"&code=" + request.getParam("code") + "&k=" + request.getParam("k") +
|
||||
"&fweb=" + request.getParam("fweb") + "&cl=" + request.getParam("cl");
|
||||
try {
|
||||
IPanTool.shareURLPrefixMatching(url, pwd).parse().onSuccess(resUrl -> {
|
||||
response.putHeader("location", resUrl).setStatusCode(302).end();
|
||||
promise.complete();
|
||||
}).onFailure(t -> promise.fail(t.fillInStackTrace()));
|
||||
} catch (Exception e) {
|
||||
promise.fail(e);
|
||||
}
|
||||
IPanTool.shareURLPrefixMatching(url, pwd).parse()
|
||||
.onSuccess(resUrl -> ResponseUtil.redirect(response, resUrl, promise))
|
||||
.onFailure(t -> promise.fail(t.fillInStackTrace()));
|
||||
return promise.future();
|
||||
}
|
||||
|
||||
@@ -53,6 +62,23 @@ public class ServerApi {
|
||||
return IPanTool.shareURLPrefixMatching(url, pwd).parse();
|
||||
}
|
||||
|
||||
|
||||
@RouteMapping(value = "/:type/:key", method = RouteMethod.GET, order = 1)
|
||||
public void parseKey(HttpServerResponse response, String type, String key) {
|
||||
String code = "";
|
||||
if (key.contains("@")) {
|
||||
String[] keys = key.split("@");
|
||||
key = keys[0];
|
||||
code = keys[1];
|
||||
}
|
||||
|
||||
IPanTool.typeMatching(type, key, code).parse().onSuccess(resUrl -> response.putHeader("location", resUrl)
|
||||
.setStatusCode(302).end()).onFailure(t -> {
|
||||
response.putHeader(CONTENT_TYPE, "text/html;charset=utf-8");
|
||||
response.end(t.getMessage());
|
||||
});
|
||||
}
|
||||
|
||||
@RouteMapping(value = "/json/:type/:key", method = RouteMethod.GET, order = 2)
|
||||
public Future<String> parseKeyJson(String type, String key) {
|
||||
String code = "";
|
||||
@@ -63,21 +89,4 @@ public class ServerApi {
|
||||
}
|
||||
return IPanTool.typeMatching(type, key, code).parse();
|
||||
}
|
||||
|
||||
@RouteMapping(value = "/:type/:key", method = RouteMethod.GET, order = 1)
|
||||
public Future<Void> parseKey(HttpServerResponse response, String type, String key) {
|
||||
Promise<Void> promise = Promise.promise();
|
||||
String code = "";
|
||||
if (key.contains("@")) {
|
||||
String[] keys = key.split("@");
|
||||
key = keys[0];
|
||||
code = keys[1];
|
||||
}
|
||||
|
||||
IPanTool.typeMatching(type, key, code).parse()
|
||||
.onSuccess(resUrl -> ResponseUtil.redirect(response, resUrl, promise))
|
||||
.onFailure(t -> promise.fail(t.fillInStackTrace()));
|
||||
return promise.future();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
package cn.qaiu.lz.web.model;
|
||||
|
||||
public class CowUser {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package cn.qaiu.lz.web.model;
|
||||
|
||||
public class LzUser {
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package cn.qaiu.lz.web.model;
|
||||
|
||||
import cn.qaiu.lz.common.ToJson;
|
||||
import io.vertx.codegen.annotations.DataObject;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@DataObject
|
||||
public class StatisticsInfo implements ToJson {
|
||||
Integer fail;
|
||||
Integer success;
|
||||
Integer total;
|
||||
|
||||
|
||||
public StatisticsInfo(JsonObject jsonObject) {
|
||||
this.fail = jsonObject.getInteger("fail");
|
||||
this.success = jsonObject.getInteger("success");
|
||||
this.total = jsonObject.getInteger("total");
|
||||
}
|
||||
}
|
||||
@@ -4,20 +4,22 @@ import cn.qaiu.db.ddl.Table;
|
||||
import cn.qaiu.lz.common.ToJson;
|
||||
import io.vertx.codegen.annotations.DataObject;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@DataObject
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@DataObject
|
||||
@Table("t_user")
|
||||
public class SysUser implements ToJson {
|
||||
private String id;
|
||||
|
||||
private String username;
|
||||
private String password;
|
||||
|
||||
public SysUser(JsonObject json) {
|
||||
this.id = json.getString("id");
|
||||
this.username = json.getString("username");
|
||||
this.password = json.getString("password");
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package cn.qaiu.lz.web.service;
|
||||
|
||||
import cn.qaiu.lz.common.model.UserInfo;
|
||||
import cn.qaiu.lz.web.model.StatisticsInfo;
|
||||
import cn.qaiu.vx.core.base.BaseAsyncService;
|
||||
import io.vertx.codegen.annotations.ProxyGen;
|
||||
import io.vertx.core.Future;
|
||||
@@ -17,6 +16,4 @@ import io.vertx.core.json.JsonObject;
|
||||
public interface DbService extends BaseAsyncService {
|
||||
Future<JsonObject> sayOk(String data);
|
||||
Future<JsonObject> sayOk2(String data, UserInfo holder);
|
||||
|
||||
Future<StatisticsInfo> getStatisticsInfo();
|
||||
}
|
||||
|
||||
@@ -13,5 +13,5 @@ import io.vertx.core.Future;
|
||||
*/
|
||||
@ProxyGen
|
||||
public interface UserService extends BaseAsyncService {
|
||||
Future<SysUser> login(SysUser user);
|
||||
Future<String> login(SysUser user);
|
||||
}
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
package cn.qaiu.lz.web.service.impl;
|
||||
|
||||
import cn.qaiu.db.pool.JDBCPoolInit;
|
||||
import cn.qaiu.lz.common.model.UserInfo;
|
||||
import cn.qaiu.lz.web.service.DbService;
|
||||
import cn.qaiu.lz.web.model.StatisticsInfo;
|
||||
import cn.qaiu.vx.core.annotaions.Service;
|
||||
import cn.qaiu.vx.core.model.JsonResult;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.Promise;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.jdbcclient.JDBCPool;
|
||||
import io.vertx.sqlclient.templates.SqlTemplate;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* lz-web
|
||||
* <br>Create date 2021/7/12 17:26
|
||||
@@ -42,25 +35,4 @@ public class DbServiceImpl implements DbService {
|
||||
// log.info("--> {}", holder.toString());
|
||||
return Future.succeededFuture(JsonObject.mapFrom(JsonResult.data("Hi: " + data)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Future<StatisticsInfo> getStatisticsInfo() {
|
||||
JDBCPool client = JDBCPoolInit.instance().getPool();
|
||||
Promise<StatisticsInfo> promise = Promise.promise();
|
||||
String sql = """
|
||||
select COUNT(CASE "code" WHEN 500 THEN "code" END ) "fail",
|
||||
COUNT(CASE "code" WHEN 200 THEN "code" END ) "success",
|
||||
count(1) "total"
|
||||
from "t_parser_log_info"
|
||||
""";
|
||||
SqlTemplate.forQuery(client, sql).mapTo(StatisticsInfo.class).execute(new HashMap<>()).onSuccess(row -> {
|
||||
StatisticsInfo info;
|
||||
if ((info = row.iterator().next()) != null) {
|
||||
promise.complete(info);
|
||||
} else {
|
||||
promise.fail("t_parser_log_info查询为空");
|
||||
}
|
||||
}).onFailure(promise::fail);
|
||||
return promise.future();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ import cn.qaiu.lz.web.service.UserService;
|
||||
import cn.qaiu.vx.core.annotaions.Service;
|
||||
import io.vertx.core.Future;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* lz-web
|
||||
* <br>Create date 2021/8/27 14:09
|
||||
@@ -17,13 +15,8 @@ import java.util.concurrent.TimeUnit;
|
||||
public class UserServiceImpl implements UserService {
|
||||
|
||||
@Override
|
||||
public Future<SysUser> login(SysUser user) {
|
||||
public Future<String> login(SysUser user) {
|
||||
|
||||
try {
|
||||
TimeUnit.SECONDS.sleep(2);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return Future.succeededFuture(user);
|
||||
return Future.succeededFuture("111");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ server:
|
||||
# 使用静态页面
|
||||
enableStaticHtmlService: false
|
||||
# 使用数据库
|
||||
enableDatabase: true
|
||||
enableDatabase: false
|
||||
staticResourcePath: webroot/
|
||||
# 反向代理服务器配置路径(不用加后缀)
|
||||
proxyConf: server-proxy
|
||||
@@ -19,23 +19,27 @@ custom:
|
||||
# 异步服务线程数
|
||||
asyncServiceInstances: 4
|
||||
# server路由(controller层)所在包路径
|
||||
baseLocations: cn.qaiu.lz
|
||||
# 路由处理默认超时时间(毫秒)
|
||||
routeTimeOut: 15000
|
||||
# 拦截器匹配规则
|
||||
routerLocations: cn.qaiu.lz.web.http
|
||||
# 拦截器包路径
|
||||
interceptorClassPath: cn.qaiu.lz.common.interceptorImpl.DefaultInterceptor
|
||||
# server层包路径
|
||||
handlerLocations: cn.qaiu.lz.web.service
|
||||
# 匹配规则
|
||||
ignoresReg:
|
||||
- /v2/statisticsInfo
|
||||
- .*/login$
|
||||
- .*/test.*$
|
||||
|
||||
# 参数注入的实体类包路径匹配正则 (防止同名类引发歧义)
|
||||
# 实体类包路径匹配正则
|
||||
entityPackagesReg:
|
||||
- ^cn\.qaiu\.lz\.web\.model\..*
|
||||
|
||||
|
||||
# 数据源配置
|
||||
dataSource:
|
||||
provider_class: io.vertx.ext.jdbc.spi.impl.HikariCPDataSourceProvider
|
||||
jdbcUrl: jdbc:h2:tcp://127.0.0.1:9095/./db/myData;MODE=MySQL;DATABASE_TO_UPPER=FALSE
|
||||
jdbcUrl: jdbc:h2:tcp://127.0.0.1:9095/./db/myData;MODE=MySQL;DATABASE_TO_LOWER=FALSE
|
||||
driverClassName: org.h2.Driver
|
||||
username: root
|
||||
password: '123456'
|
||||
tableClassPath: cn.qaiu.lz.web.model
|
||||
|
||||
cowConfig:
|
||||
config: '111'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 要激活的配置: dev--连接本地数据库; prod连接线上数据库
|
||||
active: dev
|
||||
# 版本号
|
||||
version_app: 0.1.7
|
||||
version_app: 0.1.6
|
||||
# 公司名称 -> LOGO版权文字
|
||||
copyright: QAIU
|
||||
|
||||
3
web-service/src/main/resources/http-tools/curl.sh
Normal file
3
web-service/src/main/resources/http-tools/curl.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
curl -F "file=@C:\Users\qaiu\Desktop\real\lz-web\web\src\main\resources\logback.xml" -i -XPOST 127.0.0.1:6400/demo/XXX/XXX
|
||||
|
||||
curl -F "file=@C:\Users\qaiu\Desktop\3.csv" -i -XPOST 127.0.0.1:6400/demo/XXX/XXX
|
||||
@@ -1,19 +0,0 @@
|
||||
###
|
||||
https://5jmpj3-my.sharepoint.com/personal/pan2_xiaomuxi_cn/_layouts/15/download.aspx?UniqueId=cf123281-44cd-4745-b3c3-49a18934044d&Translate=false&tempauth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAvNWptcGozLW15LnNoYXJlcG9pbnQuY29tQGY4MTk4OWJiLWViNDAtNGZhYi05NzA5LTQ0ODFhMDM0ZjNiNCIsImlzcyI6IjAwMDAwMDAzLTAwMDAtMGZmMS1jZTAwLTAwMDAwMDAwMDAwMCIsIm5iZiI6IjE3MDY0MzIyNDciLCJleHAiOiIxNzA2NDM1ODQ3IiwiZW5kcG9pbnR1cmwiOiJNMWVwZ3VjamFKU081MXB4WW5IKzZ6bzZBQlVyc0N1T3MwOVRGbnZJVlRvPSIsImVuZHBvaW50dXJsTGVuZ3RoIjoiMTQ2IiwiaXNsb29wYmFjayI6IlRydWUiLCJjaWQiOiJKM0JzNzloTy8wYW1GZGh1WUFjTjR3PT0iLCJ2ZXIiOiJoYXNoZWRwcm9vZnRva2VuIiwic2l0ZWlkIjoiWkRkaVptRTBNRFl0TXpWall5MDBZamMxTFRsbU16TXRNRGc0TlRCbVkyRmlPVE0yIiwiYXBwX2Rpc3BsYXluYW1lIjoiMuWPt-WtmOWCqOehrOebmCIsImdpdmVuX25hbWUiOiIy5Y-3IiwiZmFtaWx5X25hbWUiOiLnvZHnm5giLCJhcHBpZCI6ImJkZDRjOTA5LTA0ZjItNDU4NS04MjZlLTY0MDQzNDljN2JiZiIsInRpZCI6ImY4MTk4OWJiLWViNDAtNGZhYi05NzA5LTQ0ODFhMDM0ZjNiNCIsInVwbiI6InBhbjJAeGlhb211eGkuY24iLCJwdWlkIjoiMTAwMzIwMDJBRTUyNDMwRCIsImNhY2hla2V5IjoiMGguZnxtZW1iZXJzaGlwfDEwMDMyMDAyYWU1MjQzMGRAbGl2ZS5jb20iLCJzY3AiOiJhbGxmaWxlcy53cml0ZSIsInR0IjoiMiIsImlwYWRkciI6IjIwLjE5MC4xNDQuMTcxIn0.WY--gv_Ac1pwhj3XTOdIddaj643CHoOqBeFFpdSa4-w&ApiVersion=2.0
|
||||
|
||||
###
|
||||
#@no-redirect
|
||||
PUT https://pan.xiaomuxi.cn/api/v3/share/download/Ag4Uy
|
||||
|
||||
###
|
||||
PUT https://pan.huang1111.cn/api/v3/share/download/m1Mlt1
|
||||
|
||||
|
||||
###
|
||||
https://pan.huang1111.cn/api/v3/share/info/g31PcQ?password=qaiu
|
||||
|
||||
###
|
||||
https://pan.huang1111.cn/api/v3/share/info/m1Mlt1?password=
|
||||
|
||||
###
|
||||
PUT https://pan.huang1111.cn/api/v3/share/download/g31PcQ?path=undefined%2Fundefined
|
||||
@@ -46,14 +46,15 @@ Content-Disposition: form-data; name="email"
|
||||
--WebAppBoundary
|
||||
Content-Disposition: form-data; name="joinProToken"
|
||||
|
||||
|
||||
--WebAppBoundary--
|
||||
|
||||
###
|
||||
|
||||
https://cowtransfer.com/core/api/transfer/share/download?transferGuid=eb9df924-7b29-496b-8147-96762fc81d28&title=spring-play
|
||||
|
||||
###
|
||||
https://cowtransfer.com/core/api/transfer/share/download?transferGuid=
|
||||
|
||||
###
|
||||
https://cowtransfer.com/core/api/transfer/share/download?transferGuid=eb9df924-7b29-496b-8147-96762fc81d28
|
||||
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch web-service/src/main/resources/http-tools/test.http' --prune-empty --tag-name-filter cat -- --all
|
||||
git push origin master --force
|
||||
rmdir .git/refs/original/
|
||||
git reflog expire --expire=now --all
|
||||
git gc --prune=now
|
||||
git gc --aggressive --prune=now
|
||||
|
||||
@@ -37,25 +37,4 @@ https://web.feejii.com/ee433d6e5102ad79af58a2aa0e6cf758/1686279412/files/2023/05
|
||||
|
||||
|
||||
|
||||
### 7jy0zlv
|
||||
https://api.feijipan.com/ws/recommend/list?devType=6&devModel=Chrome&extra=2&shareId=146731
|
||||
|
||||
###
|
||||
# @no-redirect
|
||||
https://api.feijipan.com/ws/file/redirect?downloadId=4703B103BD6871F83441233393695EF3&enable=1&devType=6&uuid=ZIdOV27C5dHvd3aUUXoiP×tamp=4FDB14DD6441E581458CD2750EAF188A&auth=42965E158C74872285C5A3F545118CAAF417B148DBEEBF90B0969E08950830E5
|
||||
Referer: https://share.feijipan.com/
|
||||
|
||||
###
|
||||
# @no-redirect
|
||||
https://api.feijipan.com/ws/file/redirect?uuid=6591af86-5464-4c8d-a100-44f6cb859e9b&devType=6&devCode=6591af86-5464-4c8d-a100-44f6cb859e9b&devModel=chrome&devVersion=122&appVersion=×tamp=77d605733113552383e2626fe134cfc3&appToken=9a253a6202bc1095030a8e8d76fe7f38-1&enable=1&downloadId=79d91c3dc8b578d4c69b04b8251f04e029de3c08240dc9ceab77f7f656cbba23&auth=ccfd80a4787abfb1b86970902e3156ff155ae85ef80ebd661d3bc33de20659a1
|
||||
Referer: https://share.feijipan.com/
|
||||
|
||||
|
||||
###
|
||||
POST https://api.feijipan.com/ws/login?uuid=6591af86-5464-4c8d-a100-44f6cb859e9b&devType=6&devCode=6591af86-5464-4c8d-a100-44f6cb859e9b&devModel=chrome&devVersion=122&appVersion=×tamp=2e6932b46c0bc20d9cbcdb6c5f0e9bee&appToken=&extra=2
|
||||
Accept:application/json, text/plain, */*
|
||||
Content-Type:application/json
|
||||
Origin:https://www.feijipan.com
|
||||
Referer:https://www.feijipan.com/
|
||||
|
||||
{"loginName":"","loginPwd":""}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
###
|
||||
POST https://api.ilanzou.com/unproved/recommend/list?shareId=26216
|
||||
|
||||
|
||||
###
|
||||
#@no-redirect
|
||||
https://api.ilanzou.com/unproved/file/redirect?downloadId=DC3D647979EE315935D1687834F05914&enable=1&devType=6&uuid=46vk1ImPHKt1Mr2cRu5wA×tamp=B11E6A597CB93B55D87A338AEDDFBE45&auth=8BF7415F1AA0BB02278336F3C11EBD0B25654EAAB68588D5E8C4974ACAD88935
|
||||
|
||||
###
|
||||
#@no-redirect
|
||||
https://api.ilanzou.com/unproved/file/redirect?downloadId=DC3D647979EE315935D1687834F05914&enable=1&devType=6&uuid=46vk1ImPHKt1Mr2cRu5wA×tamp=90A417B68D70B35311FACC72EEE63291&auth=849E8A34873CA37147A5FE110912FCBF836D8BD5D37626FBCBD8A3F6F42A7A8B
|
||||
|
||||
|
||||
|
||||
###
|
||||
#@no-redirect
|
||||
https://dl.lanosso.com/disk/2024/01/28/9/14733029/1706414002788330.gz?attname=testgles.c&sign=9ef76e9a270dbe5e9401c8f4c2ae0d68&t=65b5f826
|
||||
|
||||
###
|
||||
#@no-redirect
|
||||
https://api.ilanzou.com/unproved/file/redirect?uuid=0&devType=6×tamp=4532409118d790651b6b50823bf6a555&downloadId=d16fcb8f3e00da0eb956db9a0541f97277437b80f7fe61438b7fba55856e050f&auth=a4c567681b3ba556b5d70cff93e909774a6695647300260c5f0abfe3c188f1a0
|
||||
|
||||
|
||||
###
|
||||
https://www.ilanzou.com/s/zHkna1S
|
||||
|
||||
### fileId: 145042258
|
||||
@@ -1,17 +0,0 @@
|
||||
|
||||
|
||||
### 坚果云直链
|
||||
GET https://www.jianguoyun.com/c/dl-file/bin.zip?dt=s80etr&sd=ekfj3&kv=NzM2MjI2NDAwQHFxLmNvbQ&vr=1&ud=Ai4TqB3nzfSF6iR0zapyvKGPYKP_cUqKIhtziVb1dRA
|
||||
|
||||
|
||||
###
|
||||
|
||||
https://www.jianguoyun.com/d/ajax/dlink?sndId=175599f&sndMagic=2d8381e894e47b39&path=%2Fbin.zip&forwin=true&_=1706507895357
|
||||
Cookie:umn=736226400%40qq.com; ta=G0RPJtiW0%2FEqRmv4amZpcXTLHhuOxhQCSTJX3IU5HVo%3D;
|
||||
|
||||
###
|
||||
https://www.jianguoyun.com/d/ajax/fileops/pubFileLink?k=DSBBfXkQn7PVCxjz24cFIAA
|
||||
Cookie:umn=736226400%40qq.com; ta=G0RPJtiW0%2FEqRmv4amZpcXTLHhuOxhQCSTJX3IU5HVo%3D;
|
||||
|
||||
###
|
||||
https://www.jianguoyun.com/d/signup?next=%2Fp%2FDSBBfXkQn7PVCxjz24cFIAA&msg=%E7%99%BB%E5%BD%95%E5%90%8E%E7%AB%8B%E5%8D%B3%E4%B8%8B%E8%BD%BD%E6%96%87%E4%BB%B6
|
||||
@@ -1,118 +0,0 @@
|
||||
// 联想乐云(联想云服务)
|
||||
|
||||
### 第一步 https://lecloud.lenovo.com/share/4DANWdRQsHHyiFB4a
|
||||
POST https://lecloud.lenovo.com/share/api/clouddiskapi/share/public/v1/shareInfo
|
||||
Content-Type:application/json;charset=UTF-8
|
||||
|
||||
{"shareId":"4DANWdRQsHHyiFB4a","password":"","directoryId":"-1"}
|
||||
|
||||
### res
|
||||
#{
|
||||
# "result": true,
|
||||
# "data": {
|
||||
# "senderUserName": "7362264*****.com",
|
||||
# "validSecondsLeft": -1,
|
||||
# "memo": "",
|
||||
# "passwordVerified": true,
|
||||
# "files": [
|
||||
# {
|
||||
# "fileType": 99,
|
||||
# "fileId": 12298705,
|
||||
# "fileName": "classes.dex",
|
||||
# "fileSize": 8909208
|
||||
# }
|
||||
# ]
|
||||
# }
|
||||
#}
|
||||
|
||||
#{
|
||||
# "result": false,
|
||||
# "errcode": "SHARE_ID_INVALID",
|
||||
# "errmsg": "分享ID无效"
|
||||
#}
|
||||
|
||||
###
|
||||
# @name 第二步
|
||||
POST https://lecloud.lenovo.com/share/api/clouddiskapi/share/public/v1/packageDownloadWithFileIds
|
||||
Content-Type:application/json;charset=UTF-8
|
||||
|
||||
{"fileIds":[12299013],"shareId":"2RkKbLP9BrppS9b43","browserId":"asdddsad"}
|
||||
|
||||
###
|
||||
#{
|
||||
# "result": true,
|
||||
# "data": {
|
||||
# "downloadUrl": "https://pimapi.lenovomm.com/clouddiskapi/v1/shareRedirect?si=12299012&dk=b9d2870c001b56f6b23f6036fd049b237b3b3d47c0dbd30513ddaa7137cd64c9&pk=5a69c8b5f3835171b01ad866241de857d02c8b6e4985e51d652ab1bf331a3ae0&pc=true&ot=ali&ob=sync-cloud-disk&ok=649599424036290560.zip&fn=c4droid_aarch64_gcc11_new.zip&ds=140596045&dc=1&bi=asdddsad&ri=&ts=1701156293620&sn=b9dd3816eb1fd7743f5fa904986c15cb36fd9c08b4fbe0d94d198bd2bbf7c5be"
|
||||
# }
|
||||
#}
|
||||
|
||||
#{
|
||||
# "result": false,
|
||||
# "errcode": "FILE_NOT_EXIST",
|
||||
# "errmsg": "文件不存在"
|
||||
#}
|
||||
|
||||
###
|
||||
# @name 第三步 302跳转链接
|
||||
# @no-redirect
|
||||
https://pimapi.lenovomm.com/clouddiskapi/v1/shareRedirect?si=12298704&dk=ad0ef0fe93134baf6850294701e96986b1b933231c346589ccd635520908ebec&pk=ef45aa4d25c1dcecb631b3394f51539d59cb35c6a40c3911df8ba431ba2a3244&pc=true&ot=ali&ob=sync-cloud-disk&ok=649593714557087744.dex&fn=classes.dex&ds=8909208&dc=1&bi=asdddsad&ri=&ts=1701235051759&sn=30589173efacb5b493fd47e0f134309ab598252951a5a82d8292011e626b5c26
|
||||
###
|
||||
# @no-redirect
|
||||
https://pimapi.lenovomm.com/clouddiskapi/v1/shareRedirect?si=12299012&dk=b9d2870c001b56f6b23f6036fd049b237b3b3d47c0dbd30513ddaa7137cd64c9&pk=5a69c8b5f3835171b01ad866241de857d02c8b6e4985e51d652ab1bf331a3ae0&pc=true&ot=ali&ob=sync-cloud-disk&ok=649599424036290560.zip&fn=c4droid_aarch64_gcc11_new.zip&ds=140596045&dc=1&bi=asdddsad&ri=&ts=1701234891872&sn=89ba38f2ca09238d284f723449a0b8af02b1a933a6bc1ee9ee71cc373d7b6a59
|
||||
###
|
||||
# @no-redirect
|
||||
https://pimapi.lenovomm.com/clouddiskapi/v1/shareRedirect?si=12298704&dk=19ab590770399d4438ea885446e27186cc668cdfa559f5fcc063a1ecf78008e5&pk=ef45aa4d25c1dcecb631b3394f51539d59cb35c6a40c3911df8ba431ba2a3244&pc=true&ot=ali&ob=sync-cloud-disk&ok=649593714557087744.dex&fn=classes.dex&ds=8909208&dc=1&bi=asdddsad&ri=&ts=1701235051759&sn=13dc33749bd9cc108009fa505b3ecca9f358d70874352858475956ba4240e4c3
|
||||
###
|
||||
# @no-redirect
|
||||
https://pimapi.lenovomm.com/clouddiskapi/v1/shareRedirect?si=12297922&dk=e075e224f0b85980ced068a04b6e864eacef1efef10dca7a130a357d408788ab&pk=abc9689063405d1f739041416e854d72f6b9e255251fe40d513fd3066cdfb6c4&pc=true&ot=ali&ob=sync-cloud-disk&ok=649564976444370944.exe&fn=%E8%87%B4%E4%BF%A1_20220601.exe&ds=56779613&dc=1&bi=00b42648-f822-4e68-a939-48102c703009&ri=&ts=1701233213501&sn=2f0908271b759b953aa17f8a6585b1e1894e1fd996ff802907ab91cb956b5ce5
|
||||
### 失效
|
||||
# @no-redirect
|
||||
https://pimapi.lenovomm.com/clouddiskapi/v1/shareRedirect?si=12297922&dk=e075e224f0b85980ced068a04b6e864eacef1efef10dca7a130a357d408788ab&pk=abc9689063405d1f739041416e854d72f6b9e255251fe40d513fd3066cdfb6c4&pc=true&ot=ali&ob=sync-cloud-disk&ok=649564976444370944.exe&fn=%E8%87%B4%E4%BF%A1_20220601.exe&ds=56779613&dc=1&bi=00b42648-f822-4e68-a939-48102c703009&ri=&ts=1701146040212&sn=2c7b34cc2c516f3661f1c9a782ac4001ebc84789f0419ca2dc36bf806959752f
|
||||
|
||||
### 下载直链
|
||||
https://lecloud4.lenovomm.cn/dlserver/fileman/ali/sync-cloud-disk/649593714557087744.dex?KEY1=7be0212f4bd3155951942d9d62b8dfd9&KEY2=65681948&fn=classes.dex
|
||||
###
|
||||
https://lecloud4.lenovomm.cn/dlserver/fileman/ali/sync-cloud-disk/649593714557087744.dex?KEY1=d602d76dffd9914459a1f535585a330f&KEY2=656974EC&fn=classes.dex
|
||||
###
|
||||
https://lecloud4.lenovomm.cn/dlserver/fileman/ali/sync-cloud-disk/649593714557087744.dex?KEY1=89938873f9adcce3d543c178a128de10&KEY2=65697528&fn=classes.dex
|
||||
|
||||
###
|
||||
https://lecloud4.lenovomm.cn/dlserver/fileman/ali/sync-cloud-disk/649593714557087744.dex?KEY1=efc1335ae0b77555dcf55aa1ab78c2a7&KEY2=656811B8&fn=classes.dex
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### https://lecloud.lenovo.com/share/2RkKbLP9BrppS9b43(密码:ex2b)
|
||||
POST https://lecloud.lenovo.com/share/api/clouddiskapi/share/public/v1/shareInfo
|
||||
Content-Type:application/json;charset=UTF-8
|
||||
|
||||
{"shareId":"2RkKbLP9BrppS9b43","password":"ex2b","directoryId":"-1"}
|
||||
|
||||
### 错误Result
|
||||
#{
|
||||
# "result": true,
|
||||
# "data": {
|
||||
# "senderUserName": "7362264*****.com",
|
||||
# "validSecondsLeft": -1,
|
||||
# "memo": "tttttt",
|
||||
# "passwordVerified": false
|
||||
# }
|
||||
#}
|
||||
|
||||
###
|
||||
# @name https://lecloud.lenovo.com/share/2RXy2r8odVJtnWMSN
|
||||
POST https://lecloud.lenovo.com/share/api/clouddiskapi/share/public/v1/shareInfo
|
||||
Content-Type:application/json;charset=UTF-8
|
||||
|
||||
{"shareId":"2RXy2r8odVJtnWMSN","password":"","directoryId":"-1"}
|
||||
|
||||
###
|
||||
# @name 第二步
|
||||
POST https://lecloud.lenovo.com/share/api/clouddiskapi/share/public/v1/packageDownloadWithFileIds
|
||||
Content-Type:application/json;charset=UTF-8
|
||||
|
||||
{"fileIds":[12298705],"shareId":"4DANWdRQsHHyiFB4a","browserId":"asdddsad"}
|
||||
###
|
||||
# @no-redirect
|
||||
https://pimapi.lenovomm.com/clouddiskapi/share/public/v1/createPayOrder?dk=6678fff6cb83cdc545db42f1b4d6df7302c1878780647d67c218d74df6b8193e
|
||||
@@ -24,13 +24,4 @@ https://developer.lanzoug.com/file/?VDJbZVxtADFSWwY+U2YHa1FuU2tTYgBnBnUGZFNmWylS
|
||||
###
|
||||
https://developer.lanzoug.com/file/?VTNVa1tqAjMFDAM7BDEAbAE+U2tfbgZhBnVbOQUwVCYEb1IoAToCNwQhVnRXLlcyVWAEdl9uVzkEbFYxVm5VeVVlVSxbNwJ4BWADeAQyAGgBNVN4X3oGbQZxW3sFP1Q8BGhSYAEDAj8ENlY9VzJXZ1U3BDFfMldlBDFWaVY9VXJVM1VxWzsCZwVlA2QEYAAwAWtTYF8wBiIGcVstBWRUZwQ0UjcBbwJ5BGJWNVcsV2RVOgQuX2NXZgQ2VjJWMlVhVWdVNlswAm8FagMxBGAANgE6UzdfYwZgBjFbbAU6VGwEZVIyAWQCZQRkVjZXMFdmVTcENV8uVy8EalYgVixVIVUmVWdbdAI/BTcDaARhADEBblNvXzQGPQY5W3sFLVQ8BGlSYAE6AmsEY1Y2VztXY1U/BDFfM1dnBDRWZFYkVXpVc1VkW2oCIQVuA2QEZgA5AW5TZl8wBjYGMFtkBWFUcwRxUnUBKwJrBGNWNlc7V2NVPwQxXzJXZQQzVmdWLFUhVTxVcls7AmcFYgNnBH4AMwFoU2RfLgY1BjVbawV3VGIEPA==
|
||||
|
||||
### 20230819新规则
|
||||
POST /ajaxm.php
|
||||
|
||||
# var wsk_sign = 'c20230818';
|
||||
# var aihidcms = 'J5Nh';
|
||||
# var iucjdsd = '';
|
||||
# var ws_sign = 'c20230818';
|
||||
# var sasign = 'AGZQbgk4UGEDCgo1ATEGOlY_aBTlSNVRiV2gEMlA1WmkBJ1R3AWFUMVY2VDsDZQE0Vj4CMgNsADdXZw_c_c';
|
||||
# var ajaxdata = '?ctdf';
|
||||
data : { 'action':'downprocess','signs':ajaxdata,'sign':sasign,'websign':iucjdsd,'websignkey':aihidcms,'ves':1 }
|
||||
|
||||
@@ -4,14 +4,11 @@ GET http://127.0.0.1:6400/parser?url=https://lanzoux.com/ia2cntg
|
||||
|
||||
### 蓝奏云
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/json/parser?url=https://wwsd.lanzoue.com/iLany1e9bbbi
|
||||
GET http://127.0.0.1:6400/parser?url=https://lanzoux.com/iNvid035jgcb
|
||||
|
||||
### 蓝奏云
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/lz/i6SqHmp1yfc
|
||||
### 蓝奏云https://acgtools.lanzoui.com/iUr7Qnu3sxc https://wwn.lanzouy.com/tp/ihLkw1gezutg https://wwn.lanzouy.com/ihLkw1gezutg
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/lz/ihLkw1gezutg
|
||||
|
||||
### 蓝奏云
|
||||
# @no-redirect
|
||||
@@ -20,33 +17,17 @@ GET http://127.0.0.1:6400/lz/icBp6qqj82b@QAIU
|
||||
### 蓝奏云
|
||||
GET http://127.0.0.1:6400/json/lz/ia2cntg
|
||||
|
||||
### 蓝奏云优享
|
||||
GET http://127.0.0.1:6400/json/iz/lGFndCM
|
||||
|
||||
###
|
||||
GET http://127.0.0.1:6400/json/parser?url=https://www.ilanzou.com/s/lGFndCM
|
||||
###
|
||||
GET http://127.0.0.1:6400/json/parser?url=https://www.ilanzou.com/s/6XwnC4X
|
||||
###
|
||||
GET http://127.0.0.1:6400/json/parser?url=https://www.ilanzou.com/s/zHkna1S
|
||||
|
||||
### 奶牛 https://cowtransfer.com/s/9a644fe3e3a748
|
||||
### 奶牛
|
||||
GET http://127.0.0.1:6400/json/cow/9a644fe3e3a748
|
||||
Referer: https://cowtransfer.com/
|
||||
|
||||
### 奶牛
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/cow/e4f41b51b5da4f
|
||||
|
||||
|
||||
### 奶牛
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/parser?url=https://cowtransfer.com/s/9a644fe3e3a748
|
||||
|
||||
### 奶牛
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/parser?url=https://goldrepo.cowtransfer.com/s/026a638795634b
|
||||
|
||||
### 移动云空间 https://www.ecpan.cn/web/#/yunpanProxy?path=%2F%23%2Fdrive%2Foutside&data=81027a5c99af5b11ca004966c945cce6W9Bf2&isShare=1
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/parser?url=https://www.ecpan.cn/web//yunpanProxy?path=%2F%23%2Fdrive%2Foutside&data=81027a5c99af5b11ca004966c945cce6W9Bf2&isShare=1
|
||||
@@ -55,13 +36,8 @@ GET http://127.0.0.1:6400/parser?url=https://www.ecpan.cn/web//yunpanProxy?path=
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/ec/81027a5c99af5b11ca004966c945cce6W9Bf2
|
||||
|
||||
### https://www.ecpan.cn/web/#/yunpanProxy?path=%2F%23%2Fdrive%2Foutside&data=4b3d786755688b85c6eb0c04b9124f4dalzdaJpXHx&isShare=1 密码 T6O1RC
|
||||
GET http://127.0.0.1:6400/json/ec/4b3d786755688b85c6eb0c04b9124f4dalzdaJpXHx@T6O1RC
|
||||
|
||||
###
|
||||
#@no-redirect
|
||||
GET http://127.0.0.1:6400/parser?url=https://www.ecpan.cn/web/#/yunpanProxy?path=%2F%23%2Fdrive%2Foutside&data=4b3d786755688b85c6eb0c04b9124f4dalzdaJpXHx&isShare=1&pwd=T6O1RC
|
||||
|
||||
GET http://127.0.0.1:6400/json/ec/aa0cae0164d8885e6d35826b5b2901eckbWJBalM
|
||||
|
||||
|
||||
### UC网盘
|
||||
@@ -76,26 +52,18 @@ GET http://127.0.0.1:6400/json/uc/33197dd53ace4
|
||||
GET http://127.0.0.1:6400/parser?url=https://fast.uc.cn/s/33197dd53ace4
|
||||
|
||||
|
||||
### 小飞机盘https://share.feijipan.com/s/nMtCOXL
|
||||
### 小飞机盘
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/parser?url=https://share.feijipan.com/s/nMtCOXL
|
||||
GET http://127.0.0.1:6400/parser?url=https://www.feijix.com/s/tIfhRqH
|
||||
|
||||
### 小飞机盘 https://share.feijipan.com/s/laUshYGk
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/parser?url=https://share.feijipan.com/s/laUshYGk
|
||||
### 小飞机盘
|
||||
GET http://127.0.0.1:6400/json/fj/tIfhRqH
|
||||
### 小飞机盘 https://share.feijipan.com/s/7jy0zlv
|
||||
GET http://127.0.0.1:6400/json/fj/7jy0zlv
|
||||
|
||||
### 小飞机盘
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/fj/tIfhRqH
|
||||
### 小飞机盘 https://share.feijipan.com/s/nMtCOXL
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/fj/nMtCOXL
|
||||
|
||||
### 360亿方云 https://v2.fangcloud.com/sharing/fb54bdf03c66c04334fe3687a3
|
||||
### 360亿方云
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/parser?url=https://v2.fangcloud.com/sharing/fb54bdf03c66c04334fe3687a3
|
||||
|
||||
@@ -123,48 +91,9 @@ GET http://127.0.0.1:6400/ye/iaKtVv-qOECd
|
||||
|
||||
### 123
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/ye/Ev1lVv-t3SY3
|
||||
|
||||
### 123 https://www.123pan.com/s/iaKtVv-6OECd.html
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/json/parser?url=https://www.123pan.com/s/iaKtVv-6OECd.html&pwd=DcGe
|
||||
|
||||
|
||||
### 123
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/parser?url=https://www.123pan.com/s/zF07Vv-WkHWd.html&pwd=bios
|
||||
|
||||
|
||||
### 联想乐云
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/parser?url=https://lecloud.lenovo.com/share/4DANWdRQsHHyiFB4a
|
||||
|
||||
### 联想乐云
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/le/4DANWdRQsHHyiFB4a
|
||||
|
||||
### 联想乐云
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/le/2RkKbLP9BrppS9b43@ex2b
|
||||
|
||||
### 联想乐云
|
||||
GET http://127.0.0.1:6400/json/le/2RkKbLP9BrppS9b43@ex2b
|
||||
|
||||
### 文叔叔
|
||||
GET http://127.0.0.1:6400/json/parser?url=https://f.ws59.cn/f/e3peohu6192
|
||||
|
||||
### Cloudreve
|
||||
GET http://127.0.0.1:6400/json/ce/https_pan.huang1111.cn_s_wDz5TK
|
||||
|
||||
### Cloudreve https://pan.huang1111.cn/s/g31PcQ
|
||||
GET http://127.0.0.1:6400/json/parser?url=https://pan.huang1111.cn/s/g31PcQ&pwd=qaiu
|
||||
GET http://127.0.0.1:6400/parser?url=https://www.123pan.com/s/iaKtVv-6OECd.html&pwd=DcGe
|
||||
|
||||
###
|
||||
GET http://127.0.0.1:6400/v2/statisticsInfo
|
||||
|
||||
###
|
||||
POST http://127.0.0.1:6400/v2/login?username=asd
|
||||
|
||||
|
||||
POST http://127.0.0.1:6400/login1
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
|
||||
|
||||
<!-- 日志自定义颜色 -->
|
||||
<!-- https://logback.qos.ch/manual/layouts.html#coloring -->
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
</appender>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<withJansi>false</withJansi>
|
||||
<encoder>
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||
<pattern>${CUSTOMER_PATTERN2}</pattern>
|
||||
@@ -55,7 +54,7 @@
|
||||
<logger name="io.netty" level="warn"/>
|
||||
<logger name="io.vertx" level="info"/>
|
||||
<logger name="com.zaxxer.hikari" level="info"/>
|
||||
<root level="info">
|
||||
<root level="debug">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<!-- <appender-ref ref="FILE"/>-->
|
||||
</root>
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package cn.qaiu.vx.core.util;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class ParamUtilTest {
|
||||
|
||||
@Test
|
||||
public void paramsToMap() {
|
||||
System.out.println(ParamUtil.paramsToMap(""));
|
||||
System.out.println(ParamUtil.paramsToMap("a=asd&d=23"));
|
||||
System.out.println(ParamUtil.paramsToMap("asdasd&dd"));
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package cn.qaiu.vx.core.util;
|
||||
|
||||
import cn.qaiu.lz.common.util.SnowflakeIdWorker;
|
||||
import org.junit.Test;
|
||||
|
||||
public class SnowflakeIdWorkerTest {
|
||||
|
||||
@Test
|
||||
public void idWorker() {
|
||||
final SnowflakeIdWorker idWorker = SnowflakeIdWorker.idWorker();
|
||||
for (int i = 0; i < 100; i++) {
|
||||
long id = idWorker.nextId();
|
||||
System.out.println(Long.toBinaryString(id));
|
||||
System.out.println(id);
|
||||
System.out.println("------------");
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void idWorkerCluster() {
|
||||
final SnowflakeIdWorker snowflakeIdWorkerCluster = SnowflakeIdWorker.idWorkerCluster(0, 1);
|
||||
for (int i = 0; i < 100; i++) {
|
||||
long id = snowflakeIdWorkerCluster.nextId();
|
||||
System.out.println(Long.toBinaryString(id));
|
||||
System.out.println(id);
|
||||
System.out.println("------------\n");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,6 @@ import javassist.bytecode.LocalVariableAttribute;
|
||||
import javassist.bytecode.MethodInfo;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -83,14 +82,4 @@ public class Test02 {
|
||||
System.out.println(map);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void test4() {
|
||||
LocalDateTime parse = LocalDateTime.parse((String) "2022-01-01T11:22:00");
|
||||
System.out.println(parse);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package qaiu.web.test;
|
||||
package cn.qaiu.web.test;
|
||||
|
||||
import cn.qaiu.util.AESUtils;
|
||||
import cn.qaiu.lz.common.util.AESUtils;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -50,18 +50,6 @@ public class TestAESUtil {
|
||||
Assert.assertEquals(146731, AESUtils.idEncrypt("7jy0zlv"));
|
||||
}
|
||||
|
||||
// 蓝奏优享
|
||||
@Test
|
||||
public void testIzIdDecode() {
|
||||
Assert.assertEquals(26216, AESUtils.idEncryptIz("lGFndCM"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test00() throws IllegalBlockSizeException, NoSuchPaddingException, BadPaddingException,
|
||||
NoSuchAlgorithmException, InvalidKeyException {
|
||||
System.out.println(AESUtils.decryptByBase64AES(AESUtils.CIPHER_AES2, AESUtils.CIPHER_AES));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTs() {
|
||||
System.out.println(System.currentTimeMillis());
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user