mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2025-12-16 12:23:03 +00:00
15
README.md
15
README.md
@@ -34,8 +34,11 @@ main分支依赖JDK17, 提供了JDK11分支[main-jdk11](https://github.com/qaiu/
|
|||||||
- [联想乐云 (le)](https://lecloud.lenovo.com/)
|
- [联想乐云 (le)](https://lecloud.lenovo.com/)
|
||||||
- [QQ邮箱文件中转站 (qq)](https://mail.qq.com/)
|
- [QQ邮箱文件中转站 (qq)](https://mail.qq.com/)
|
||||||
- [超星网盘-开发中 (cx)](https://passport2.chaoxing.com/login?newversion=true&refer=https%3A%2F%2Fpan-yz.chaoxing.com%2F)
|
- [超星网盘-开发中 (cx)](https://passport2.chaoxing.com/login?newversion=true&refer=https%3A%2F%2Fpan-yz.chaoxing.com%2F)
|
||||||
- [Cloudreve自建网盘--正在优化 (ce)](https://github.com/cloudreve/Cloudreve)
|
- [城通网盘(ce)](https://www.ctfile.com)
|
||||||
|
- [Cloudreve自建网盘(ce)](https://github.com/cloudreve/Cloudreve)
|
||||||
|
|
||||||
**TODO:**
|
**TODO:**
|
||||||
|
- docker
|
||||||
- 登录接口, 文件上传/下载/分享后端接口
|
- 登录接口, 文件上传/下载/分享后端接口
|
||||||
- 短地址服务
|
- 短地址服务
|
||||||
- 前端界面(建设中...)
|
- 前端界面(建设中...)
|
||||||
@@ -186,8 +189,11 @@ bash service-install.sh
|
|||||||
> 注意: 如果jdk环境变量的java版本不是17请修改nfd-service-template.xml中的java命令的路径改为实际路径
|
> 注意: 如果jdk环境变量的java版本不是17请修改nfd-service-template.xml中的java命令的路径改为实际路径
|
||||||
|
|
||||||
## 0.1.9 开发计划
|
## 0.1.9 开发计划
|
||||||
- todo
|
- 超星网盘解析 doing
|
||||||
|
- 带Referer头的js请求下载 doing
|
||||||
|
- 城通网盘解析 √
|
||||||
|
- 目录解析(专属版)
|
||||||
|
- 带cookie/token参数解析大文件(专属版)
|
||||||
|
|
||||||
**技术栈:**
|
**技术栈:**
|
||||||
Jdk17+Vert.x4.4.1
|
Jdk17+Vert.x4.4.1
|
||||||
@@ -200,7 +206,8 @@ Core模块集成Vert.x实现类似spring的注解式路由API
|
|||||||
|
|
||||||
|
|
||||||
## 支持该项目
|
## 支持该项目
|
||||||
开源不易,用爱发电,本项目长期维护如果觉得有帮助, 可以请作者喝杯咖啡, 感谢支持
|
开源不易,用爱发电,本项目长期维护如果觉得有帮助, 可以请作者喝杯咖啡, 感谢支持
|
||||||
|
赞助88元以上, 可以优先体验专享版--大文件解析,目录解析
|
||||||

|

|
||||||
|
|
||||||
[手机端支付宝打赏跳转链接](https://qr.alipay.com/fkx01882dnoxxtjenhlxt53)
|
[手机端支付宝打赏跳转链接](https://qr.alipay.com/fkx01882dnoxxtjenhlxt53)
|
||||||
|
|||||||
32
note.txt
32
note.txt
@@ -32,3 +32,35 @@ https://f.ws59.cn/f/e3peohu6192
|
|||||||
2. 流量统计, 文件分享信息, 目录解析, 文件云下载
|
2. 流量统计, 文件分享信息, 目录解析, 文件云下载
|
||||||
3. IP代理池
|
3. IP代理池
|
||||||
|
|
||||||
|
网页跳转 防盗链
|
||||||
|
可禁用parser接口
|
||||||
|
|
||||||
|
标志短链 鉴权后 生成混淆链接
|
||||||
|
|
||||||
|
|
||||||
|
短链算法:
|
||||||
|
1. 基于Hash映射 hash(type:key:pwd) = h/xxxxx
|
||||||
|
|
||||||
|
鉴权实现:
|
||||||
|
auth-jdbc
|
||||||
|
|
||||||
|
// 基于标准SQL语法
|
||||||
|
|
||||||
|
支持H2, MySQL
|
||||||
|
|
||||||
|
用户:
|
||||||
|
jwt鉴权用户
|
||||||
|
|
||||||
|
角色:
|
||||||
|
超级管理员
|
||||||
|
注册用户
|
||||||
|
|
||||||
|
定义操作(权限):
|
||||||
|
用户的创建/删除/查询/修改, 生成短链/删除短链/修改解析次数和有效期/查询短链信息(
|
||||||
|
文件信息: 文件/文件夹, 文件数量, 文件大小, 文件类型; 链接信息: 解析次数, 缓存次数等)
|
||||||
|
|
||||||
|
微服务设计:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
* 解析器抽象类包含promise, HTTP Client, 默认失败方法等;
|
* 解析器抽象类包含promise, HTTP Client, 默认失败方法等;
|
||||||
* 新增网盘解析器需要继承该类.
|
* 新增网盘解析器需要继承该类.
|
||||||
*/
|
*/
|
||||||
public abstract class PanBase {
|
public abstract class PanBase implements IPanTool {
|
||||||
protected Logger log = LoggerFactory.getLogger(this.getClass());
|
protected Logger log = LoggerFactory.getLogger(this.getClass());
|
||||||
|
|
||||||
protected Promise<String> promise = Promise.promise();
|
protected Promise<String> promise = Promise.promise();
|
||||||
@@ -49,6 +49,7 @@ public abstract class PanBase {
|
|||||||
* }
|
* }
|
||||||
* </pre></blockquote>
|
* </pre></blockquote>
|
||||||
*
|
*
|
||||||
|
* @param shareLinkInfo 分享链接信息
|
||||||
*/
|
*/
|
||||||
public PanBase(ShareLinkInfo shareLinkInfo) {
|
public PanBase(ShareLinkInfo shareLinkInfo) {
|
||||||
this.shareLinkInfo = shareLinkInfo;
|
this.shareLinkInfo = shareLinkInfo;
|
||||||
|
|||||||
@@ -71,6 +71,10 @@ public enum PanDomainTemplate {
|
|||||||
"https://(.*)cowtransfer\\.com/s/(.+)",
|
"https://(.*)cowtransfer\\.com/s/(.+)",
|
||||||
"https://cowtransfer.com/s/{shareKey}",
|
"https://cowtransfer.com/s/{shareKey}",
|
||||||
CowTool.class),
|
CowTool.class),
|
||||||
|
CT("城通网盘",
|
||||||
|
"https://474b\\.com/file/(.+)",
|
||||||
|
"https://474b.com/file/{shareKey}",
|
||||||
|
CtTool.class),
|
||||||
// https://pan.huang1111.cn/s/xxx
|
// https://pan.huang1111.cn/s/xxx
|
||||||
// 通用域名([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}
|
// 通用域名([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}
|
||||||
CE("Cloudreve",
|
CE("Cloudreve",
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package cn.qaiu.parser.impl;
|
package cn.qaiu.parser.impl;
|
||||||
|
|
||||||
import cn.qaiu.entity.ShareLinkInfo;
|
import cn.qaiu.entity.ShareLinkInfo;
|
||||||
import cn.qaiu.parser.IPanTool;
|
|
||||||
import cn.qaiu.parser.PanBase;
|
import cn.qaiu.parser.PanBase;
|
||||||
import io.vertx.core.Future;
|
import io.vertx.core.Future;
|
||||||
import io.vertx.core.buffer.Buffer;
|
import io.vertx.core.buffer.Buffer;
|
||||||
@@ -17,7 +16,7 @@ import java.net.URL;
|
|||||||
* <a href="https://pan.seeoss.com">看见存储</a> <br>
|
* <a href="https://pan.seeoss.com">看见存储</a> <br>
|
||||||
* <a href="https://dav.yiandrive.com">亿安云盘</a> <br>
|
* <a href="https://dav.yiandrive.com">亿安云盘</a> <br>
|
||||||
*/
|
*/
|
||||||
public class CeTool extends PanBase implements IPanTool {
|
public class CeTool extends PanBase {
|
||||||
|
|
||||||
private static final String DOWNLOAD_API_PATH = "/api/v3/share/download/";
|
private static final String DOWNLOAD_API_PATH = "/api/v3/share/download/";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package cn.qaiu.parser.impl;
|
package cn.qaiu.parser.impl;
|
||||||
|
|
||||||
import cn.qaiu.entity.ShareLinkInfo;
|
import cn.qaiu.entity.ShareLinkInfo;
|
||||||
import cn.qaiu.parser.IPanTool;
|
|
||||||
import cn.qaiu.parser.PanBase;
|
import cn.qaiu.parser.PanBase;
|
||||||
import io.vertx.core.Future;
|
import io.vertx.core.Future;
|
||||||
import io.vertx.core.json.JsonObject;
|
import io.vertx.core.json.JsonObject;
|
||||||
@@ -13,7 +12,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
* @author <a href="https://qaiu.top">QAIU</a>
|
* @author <a href="https://qaiu.top">QAIU</a>
|
||||||
* @date 2023/4/21 21:19
|
* @date 2023/4/21 21:19
|
||||||
*/
|
*/
|
||||||
public class CowTool extends PanBase implements IPanTool {
|
public class CowTool extends PanBase {
|
||||||
|
|
||||||
private static final String API_REQUEST_URL = "https://cowtransfer.com/core/api/transfer/share";
|
private static final String API_REQUEST_URL = "https://cowtransfer.com/core/api/transfer/share";
|
||||||
|
|
||||||
|
|||||||
90
parser/src/main/java/cn/qaiu/parser/impl/CtTool.java
Normal file
90
parser/src/main/java/cn/qaiu/parser/impl/CtTool.java
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
package cn.qaiu.parser.impl;
|
||||||
|
|
||||||
|
import cn.qaiu.entity.ShareLinkInfo;
|
||||||
|
import cn.qaiu.parser.PanBase;
|
||||||
|
import cn.qaiu.util.RandomStringGenerator;
|
||||||
|
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 io.vertx.uritemplate.UriTemplate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <a href="https://www.ctfile.com">诚通网盘</a>
|
||||||
|
*/
|
||||||
|
public class CtTool extends PanBase {
|
||||||
|
private static final String API_URL_PREFIX = "https://webapi.ctfile.com";
|
||||||
|
|
||||||
|
private static final String API1 = API_URL_PREFIX + "/getfile.php?path=file" +
|
||||||
|
"&f={shareKey}&passcode={pwd}&token={token}&r={rand}&ref=";
|
||||||
|
|
||||||
|
private static final String API2 = API_URL_PREFIX + "/get_file_url.php?" +
|
||||||
|
"uid={uid}&fid={fid}&folder_id=0&file_chk={file_chk}&mb=0&token={token}&app=0&acheck=0&verifycode=" +
|
||||||
|
"&rd={rand}";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子类重写此构造方法不需要添加额外逻辑
|
||||||
|
* 如:
|
||||||
|
* <blockquote><pre>
|
||||||
|
* public XxTool(String key, String pwd) {
|
||||||
|
* super(key, pwd);
|
||||||
|
* }
|
||||||
|
* </pre></blockquote>
|
||||||
|
*
|
||||||
|
* @param shareLinkInfo 分享链接信息
|
||||||
|
*/
|
||||||
|
public CtTool(ShareLinkInfo shareLinkInfo) {
|
||||||
|
super(shareLinkInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Future<String> parse() {
|
||||||
|
final String shareKey = shareLinkInfo.getShareKey();
|
||||||
|
if (shareKey.indexOf('-') == -1) {
|
||||||
|
fail("shareKey格式不正确找不到'-': {}", shareKey);
|
||||||
|
return promise.future();
|
||||||
|
}
|
||||||
|
String[] split = shareKey.split("-");
|
||||||
|
String uid = split[0], fid = split[1];
|
||||||
|
String token = RandomStringGenerator.generateRandomString();
|
||||||
|
|
||||||
|
HttpRequest<Buffer> bufferHttpRequest1 = clientSession.getAbs(UriTemplate.of(API1))
|
||||||
|
.setTemplateParam("shareKey", shareKey)
|
||||||
|
.setTemplateParam("pwd", shareLinkInfo.getSharePassword())
|
||||||
|
.setTemplateParam("token", token)
|
||||||
|
.setTemplateParam("r", Math.random() + "");
|
||||||
|
|
||||||
|
bufferHttpRequest1
|
||||||
|
.send().onSuccess(res -> {
|
||||||
|
var resJson = asJson(res);
|
||||||
|
if (resJson.containsKey("file")) {
|
||||||
|
var fileJson = resJson.getJsonObject("file");
|
||||||
|
if (fileJson.containsKey("file_chk")) {
|
||||||
|
var file_chk = fileJson.getString("file_chk");
|
||||||
|
HttpRequest<Buffer> bufferHttpRequest2 = clientSession.getAbs(UriTemplate.of(API2))
|
||||||
|
.setTemplateParam("uid", uid)
|
||||||
|
.setTemplateParam("fid", fid)
|
||||||
|
.setTemplateParam("file_chk", file_chk)
|
||||||
|
.setTemplateParam("token", token)
|
||||||
|
.setTemplateParam("rd", Math.random() + "");
|
||||||
|
bufferHttpRequest2
|
||||||
|
.send().onSuccess(res2 -> {
|
||||||
|
JsonObject resJson2 = asJson(res2);
|
||||||
|
if (resJson2.containsKey("downurl")) {
|
||||||
|
promise.complete(resJson2.getString("downurl"));
|
||||||
|
} else {
|
||||||
|
fail("解析失败, 可能分享已失效: json: {} 字段 {} 不存在", resJson2, "downurl");
|
||||||
|
}
|
||||||
|
}).onFailure(handleFail(bufferHttpRequest1.queryParams().toString()));
|
||||||
|
} else {
|
||||||
|
fail("解析失败, 可能分享已失效: json: {} 字段 {} 不存在", resJson, "file_chk");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fail("解析失败, 可能分享已失效: json: {} 字段 {} 不存在", resJson, "file");
|
||||||
|
}
|
||||||
|
}).onFailure(handleFail(bufferHttpRequest1.queryParams().toString()));
|
||||||
|
return promise.future();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
package cn.qaiu.parser.impl;
|
package cn.qaiu.parser.impl;
|
||||||
|
|
||||||
import cn.qaiu.entity.ShareLinkInfo;
|
import cn.qaiu.entity.ShareLinkInfo;
|
||||||
import cn.qaiu.parser.IPanTool;
|
|
||||||
import cn.qaiu.parser.PanBase;
|
import cn.qaiu.parser.PanBase;
|
||||||
import io.vertx.core.Future;
|
import io.vertx.core.Future;
|
||||||
import io.vertx.core.json.JsonArray;
|
import io.vertx.core.json.JsonArray;
|
||||||
@@ -11,7 +10,7 @@ import io.vertx.uritemplate.UriTemplate;
|
|||||||
/**
|
/**
|
||||||
* 移动云空间解析
|
* 移动云空间解析
|
||||||
*/
|
*/
|
||||||
public class EcTool extends PanBase implements IPanTool {
|
public class EcTool extends PanBase {
|
||||||
// https://www.ecpan.cn/web/#/yunpanProxy?path=%2F%23%2Fdrive%2Foutside&data=4b3d786755688b85c6eb0c04b9124f4dalzdaJpXHx&isShare=1
|
// https://www.ecpan.cn/web/#/yunpanProxy?path=%2F%23%2Fdrive%2Foutside&data=4b3d786755688b85c6eb0c04b9124f4dalzdaJpXHx&isShare=1
|
||||||
private static final String FIRST_REQUEST_URL = "https://www.ecpan.cn/drive/fileextoverrid" +
|
private static final String FIRST_REQUEST_URL = "https://www.ecpan.cn/drive/fileextoverrid" +
|
||||||
".do?extractionCode={extractionCode}&chainUrlTemplate=https:%2F%2Fwww.ecpan" +
|
".do?extractionCode={extractionCode}&chainUrlTemplate=https:%2F%2Fwww.ecpan" +
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package cn.qaiu.parser.impl;
|
package cn.qaiu.parser.impl;
|
||||||
|
|
||||||
import cn.qaiu.entity.ShareLinkInfo;
|
import cn.qaiu.entity.ShareLinkInfo;
|
||||||
import cn.qaiu.parser.IPanTool;
|
|
||||||
import cn.qaiu.parser.PanBase;
|
import cn.qaiu.parser.PanBase;
|
||||||
import io.vertx.core.Future;
|
import io.vertx.core.Future;
|
||||||
import io.vertx.core.MultiMap;
|
import io.vertx.core.MultiMap;
|
||||||
@@ -19,7 +18,7 @@ import java.util.regex.Pattern;
|
|||||||
/**
|
/**
|
||||||
* 360亿方云
|
* 360亿方云
|
||||||
*/
|
*/
|
||||||
public class FcTool extends PanBase implements IPanTool {
|
public class FcTool extends PanBase {
|
||||||
|
|
||||||
public static final String SHARE_URL_PREFIX = "https://v2.fangcloud.com/sharing/";
|
public static final String SHARE_URL_PREFIX = "https://v2.fangcloud.com/sharing/";
|
||||||
public static final String SHARE_URL_PREFIX2 = "https://v2.fangcloud.cn/sharing/";
|
public static final String SHARE_URL_PREFIX2 = "https://v2.fangcloud.cn/sharing/";
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package cn.qaiu.parser.impl;
|
package cn.qaiu.parser.impl;
|
||||||
|
|
||||||
import cn.qaiu.entity.ShareLinkInfo;
|
import cn.qaiu.entity.ShareLinkInfo;
|
||||||
import cn.qaiu.parser.IPanTool;
|
|
||||||
import cn.qaiu.parser.PanBase;
|
import cn.qaiu.parser.PanBase;
|
||||||
import cn.qaiu.util.AESUtils;
|
import cn.qaiu.util.AESUtils;
|
||||||
import cn.qaiu.util.UUIDUtil;
|
import cn.qaiu.util.UUIDUtil;
|
||||||
@@ -17,7 +16,7 @@ import io.vertx.uritemplate.UriTemplate;
|
|||||||
*
|
*
|
||||||
* @version V016_230609
|
* @version V016_230609
|
||||||
*/
|
*/
|
||||||
public class FjTool extends PanBase implements IPanTool {
|
public class FjTool extends PanBase {
|
||||||
public static final String REFERER_URL = "https://share.feijipan.com/";
|
public static final String REFERER_URL = "https://share.feijipan.com/";
|
||||||
private static final String API_URL_PREFIX = "https://api.feijipan.com/ws/";
|
private static final String API_URL_PREFIX = "https://api.feijipan.com/ws/";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package cn.qaiu.parser.impl;
|
package cn.qaiu.parser.impl;
|
||||||
|
|
||||||
import cn.qaiu.entity.ShareLinkInfo;
|
import cn.qaiu.entity.ShareLinkInfo;
|
||||||
import cn.qaiu.parser.IPanTool;
|
|
||||||
import cn.qaiu.parser.PanBase;
|
import cn.qaiu.parser.PanBase;
|
||||||
import cn.qaiu.util.AESUtils;
|
import cn.qaiu.util.AESUtils;
|
||||||
import io.vertx.core.Future;
|
import io.vertx.core.Future;
|
||||||
@@ -15,7 +14,7 @@ import java.util.UUID;
|
|||||||
* 蓝奏云优享
|
* 蓝奏云优享
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class IzTool extends PanBase implements IPanTool {
|
public class IzTool extends PanBase {
|
||||||
|
|
||||||
public static final String SHARE_URL_PREFIX = "https://www.ilanzou.com/s/";
|
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 API_URL_PREFIX = "https://api.ilanzou.com/unproved/";
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package cn.qaiu.parser.impl;
|
package cn.qaiu.parser.impl;
|
||||||
|
|
||||||
import cn.qaiu.entity.ShareLinkInfo;
|
import cn.qaiu.entity.ShareLinkInfo;
|
||||||
import cn.qaiu.parser.IPanTool;
|
|
||||||
import cn.qaiu.parser.PanBase;
|
import cn.qaiu.parser.PanBase;
|
||||||
import io.vertx.core.Future;
|
import io.vertx.core.Future;
|
||||||
import io.vertx.core.json.JsonArray;
|
import io.vertx.core.json.JsonArray;
|
||||||
@@ -12,7 +11,7 @@ import java.util.UUID;
|
|||||||
/**
|
/**
|
||||||
* <a href="https://lecloud.lenovo.com/">联想乐云</a>
|
* <a href="https://lecloud.lenovo.com/">联想乐云</a>
|
||||||
*/
|
*/
|
||||||
public class LeTool extends PanBase implements IPanTool {
|
public class LeTool extends PanBase {
|
||||||
private static final String API_URL_PREFIX = "https://lecloud.lenovo.com/share/api/clouddiskapi/share/public/v1/";
|
private static final String API_URL_PREFIX = "https://lecloud.lenovo.com/share/api/clouddiskapi/share/public/v1/";
|
||||||
|
|
||||||
public LeTool(ShareLinkInfo shareLinkInfo) {
|
public LeTool(ShareLinkInfo shareLinkInfo) {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package cn.qaiu.parser.impl;
|
package cn.qaiu.parser.impl;
|
||||||
|
|
||||||
import cn.qaiu.entity.ShareLinkInfo;
|
import cn.qaiu.entity.ShareLinkInfo;
|
||||||
import cn.qaiu.parser.IPanTool;
|
|
||||||
import cn.qaiu.parser.PanBase;
|
import cn.qaiu.parser.PanBase;
|
||||||
import cn.qaiu.util.JsExecUtils;
|
import cn.qaiu.util.JsExecUtils;
|
||||||
import io.vertx.core.Future;
|
import io.vertx.core.Future;
|
||||||
@@ -20,7 +19,7 @@ import java.util.regex.Pattern;
|
|||||||
*
|
*
|
||||||
* @author QAIU
|
* @author QAIU
|
||||||
*/
|
*/
|
||||||
public class LzTool extends PanBase implements IPanTool {
|
public class LzTool extends PanBase {
|
||||||
|
|
||||||
public static final String SHARE_URL_PREFIX = "https://wwwa.lanzoux.com";
|
public static final String SHARE_URL_PREFIX = "https://wwwa.lanzoux.com";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package cn.qaiu.parser.impl;
|
package cn.qaiu.parser.impl;
|
||||||
|
|
||||||
import cn.qaiu.entity.ShareLinkInfo;
|
import cn.qaiu.entity.ShareLinkInfo;
|
||||||
import cn.qaiu.parser.IPanTool;
|
|
||||||
import cn.qaiu.parser.PanBase;
|
import cn.qaiu.parser.PanBase;
|
||||||
import cn.qaiu.util.StringUtils;
|
import cn.qaiu.util.StringUtils;
|
||||||
import io.netty.handler.codec.http.QueryStringDecoder;
|
import io.netty.handler.codec.http.QueryStringDecoder;
|
||||||
@@ -15,7 +14,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* <a href="https://wx.mail.qq.com/">QQ邮箱</a>
|
* <a href="https://wx.mail.qq.com/">QQ邮箱</a>
|
||||||
*/
|
*/
|
||||||
public class QQTool extends PanBase implements IPanTool {
|
public class QQTool extends PanBase {
|
||||||
|
|
||||||
public static final String REDIRECT_URL_TEMP = "https://iwx.mail.qq.com/ftn/download?func=4&key={key}&code={code}";
|
public static final String REDIRECT_URL_TEMP = "https://iwx.mail.qq.com/ftn/download?func=4&key={key}&code={code}";
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
package cn.qaiu.parser.impl;
|
package cn.qaiu.parser.impl;
|
||||||
|
|
||||||
import cn.qaiu.entity.ShareLinkInfo;
|
import cn.qaiu.entity.ShareLinkInfo;
|
||||||
import cn.qaiu.parser.IPanTool;
|
|
||||||
import cn.qaiu.parser.PanBase;
|
import cn.qaiu.parser.PanBase;
|
||||||
import io.vertx.core.Future;
|
import io.vertx.core.Future;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.stream.IntStream;
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
public class QkTool extends PanBase implements IPanTool {
|
public class QkTool extends PanBase {
|
||||||
|
|
||||||
public QkTool(ShareLinkInfo shareLinkInfo) {
|
public QkTool(ShareLinkInfo shareLinkInfo) {
|
||||||
super(shareLinkInfo);
|
super(shareLinkInfo);
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package cn.qaiu.parser.impl;
|
package cn.qaiu.parser.impl;
|
||||||
|
|
||||||
import cn.qaiu.entity.ShareLinkInfo;
|
import cn.qaiu.entity.ShareLinkInfo;
|
||||||
import cn.qaiu.parser.IPanTool;
|
|
||||||
import cn.qaiu.parser.PanBase;
|
import cn.qaiu.parser.PanBase;
|
||||||
import io.vertx.core.Future;
|
import io.vertx.core.Future;
|
||||||
import io.vertx.core.MultiMap;
|
import io.vertx.core.MultiMap;
|
||||||
@@ -15,7 +14,7 @@ import java.nio.charset.StandardCharsets;
|
|||||||
/**
|
/**
|
||||||
* <a href="https://www.wenshushu.cn/">文叔叔</a>
|
* <a href="https://www.wenshushu.cn/">文叔叔</a>
|
||||||
*/
|
*/
|
||||||
public class WsTool extends PanBase implements IPanTool {
|
public class WsTool extends PanBase {
|
||||||
|
|
||||||
public static final String SHARE_URL_PREFIX = "www.wenshushu.cn/f/";
|
public static final String SHARE_URL_PREFIX = "www.wenshushu.cn/f/";
|
||||||
public static final String SHARE_URL_API = "https://www.wenshushu.cn/ap/";
|
public static final String SHARE_URL_API = "https://www.wenshushu.cn/ap/";
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package cn.qaiu.parser.impl;
|
package cn.qaiu.parser.impl;
|
||||||
|
|
||||||
import cn.qaiu.entity.ShareLinkInfo;
|
import cn.qaiu.entity.ShareLinkInfo;
|
||||||
import cn.qaiu.parser.IPanTool;
|
|
||||||
import cn.qaiu.parser.PanBase;
|
import cn.qaiu.parser.PanBase;
|
||||||
import cn.qaiu.util.CommonUtils;
|
import cn.qaiu.util.CommonUtils;
|
||||||
import cn.qaiu.util.JsExecUtils;
|
import cn.qaiu.util.JsExecUtils;
|
||||||
@@ -21,7 +20,7 @@ import java.util.regex.Pattern;
|
|||||||
/**
|
/**
|
||||||
* 123网盘
|
* 123网盘
|
||||||
*/
|
*/
|
||||||
public class YeTool extends PanBase implements IPanTool {
|
public class YeTool extends PanBase {
|
||||||
|
|
||||||
public static final String SHARE_URL_PREFIX = "https://www.123pan.com/s/";
|
public static final String SHARE_URL_PREFIX = "https://www.123pan.com/s/";
|
||||||
public static final String FIRST_REQUEST_URL = SHARE_URL_PREFIX + "{key}.html";
|
public static final String FIRST_REQUEST_URL = SHARE_URL_PREFIX + "{key}.html";
|
||||||
|
|||||||
22
parser/src/main/java/cn/qaiu/util/RandomStringGenerator.java
Normal file
22
parser/src/main/java/cn/qaiu/util/RandomStringGenerator.java
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
package cn.qaiu.util;
|
||||||
|
|
||||||
|
import java.security.SecureRandom;
|
||||||
|
|
||||||
|
public class RandomStringGenerator {
|
||||||
|
private static final String CHARACTERS = "abcdefghijklmnopqrstuvwxyz0123456789";
|
||||||
|
private static final int LENGTH = 13; // 每段长度为13
|
||||||
|
|
||||||
|
public static String generateRandomString() {
|
||||||
|
SecureRandom random = new SecureRandom();
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
for (int i = 0; i < 2; i++) { // 生成两段
|
||||||
|
for (int j = 0; j < LENGTH; j++) {
|
||||||
|
int index = random.nextInt(CHARACTERS.length());
|
||||||
|
sb.append(CHARACTERS.charAt(index));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
3
pom.xml
3
pom.xml
@@ -32,7 +32,8 @@
|
|||||||
<commons-lang3.version>3.12.0</commons-lang3.version>
|
<commons-lang3.version>3.12.0</commons-lang3.version>
|
||||||
<commons-beanutils2.version>2.0.0</commons-beanutils2.version>
|
<commons-beanutils2.version>2.0.0</commons-beanutils2.version>
|
||||||
<jackson.version>2.14.2</jackson.version>
|
<jackson.version>2.14.2</jackson.version>
|
||||||
<logback.version>1.4.12</logback.version>
|
<logback.version>1.5.8</logback.version>
|
||||||
|
<junit.version>4.13.2</junit.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<version>4.13.2</version>
|
<version>${junit.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public class CacheConfigLoader {
|
|||||||
return CONFIGS.get(pdt.name().toLowerCase());
|
return CONFIGS.get(pdt.name().toLowerCase());
|
||||||
}
|
}
|
||||||
public static Integer getDuration(String type) {
|
public static Integer getDuration(String type) {
|
||||||
return CONFIGS.get(type.toLowerCase());
|
String key = type.toLowerCase();
|
||||||
|
return CONFIGS.getOrDefault(key, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
31
web-service/src/main/resources/http-tools/pan-ct.http
Normal file
31
web-service/src/main/resources/http-tools/pan-ct.http
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
### 诚通网盘 https://www.ctfile.com 缓存链接有效期 待验证 https://474b.com/file/4015376-131945810
|
||||||
|
# 参数 f=shareKey r=Math.random()
|
||||||
|
# frist json里拿到file_chk: file->file_chk
|
||||||
|
# {"code":200,"file":
|
||||||
|
# {"follow_link":"https:\/\/www.ctfile.com\/p\/login?ref=https%3A%2F%2Fapp.ctfile.com%2F%23%2Fcommunity%2Ffriends%3Fuid%3D4015376","popad":5,"is_userself":0,"link_protected":0,"file_name":"500-数学丛书.-.[控制论].[具有适应性特色的自动控制系统].pdf","file_size":"8.54 MB","file_time":"2015-11-15","file_views":67,"username":"大学资料大全","email":"13730*****@qq.com","page_title":"500-数学丛书.-.[控制论].[具有适应性特色的自动控制系统].pdf - 大学资料大全 的分享","title":"大学资料大全","page_desc":"大学资料大全 考研 机械 化工 医学 计算机 软件 文档 资","reg_url":"https:\/\/www.ctfile.com\/tokenGo.php?token=asdasdasd&url=https%3A%2F%2Fwww.ctfile.com%2Fp%2Fregister","login_url":"https:\/\/www.ctfile.com\/tokenGo.php?token=asdasdasd&url=https%3A%2F%2Fwww.ctfile.com%2Fp%2Flogin","home_url":"https:\/\/www.ctfile.com\/tokenGo.php?token=asdasdasd&url=https%3A%2F%2Fhome.ctfile.com","web_url":"https:\/\/www.ctfile.com\/tokenGo.php?token=asdasdasd&url=https%3A%2F%2Fwww.ctfile.com","file_dir":"\/d\/4015376-13641882-1728451726-88d6d28597a698a7","userid":4015376,"file_id":131945810,"free_speed":"2 分钟 ","software_speed":"1 分钟 ","vip_speed":"1 秒","my_uid":0,"is_guest":true,"my_username":"","is_mb":0,"doubleclick_url":"https:\/\/doubleclick.ctfile.com\/?adv&advert&mod=cpv&act=add&uid=4015376&fid=131945810&t=1728451726&k=00b42bc176838414e0223344cbcbf83c&ref=",
|
||||||
|
# "file_chk":"723e63ee67e25922ecb0d187412f8cc8","groups_price":{"10":595,"13":1500,"14":3000}}}
|
||||||
|
https://webapi.ctfile.com/getfile.php?path=file&f=4015376-131945810&passcode=&token=asdasdasd&r=0.4047614357286914&ref=
|
||||||
|
accept: application/json, text/javascript, */*; q=0.01
|
||||||
|
|
||||||
|
|
||||||
|
### 响应文件大小, 文件名, token是随机数 file_chk取上一步解析值
|
||||||
|
# 解析文件key uid-fid, folder_id=0, file_chk, rd=Math.random(), token=随机方法, 写死&mb=0&app=0&acheck=0&verifycode=
|
||||||
|
https://webapi.ctfile.com/get_file_url.php?uid=4015376&fid=131945810&folder_id=0&file_chk=723e63ee67e25922ecb0d187412f8cc8&mb=0&token=asdasdasd&app=0&acheck=0&verifycode=&rd=0.0796029918724035
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### 响应:
|
||||||
|
{"xhr":true,"downurl":"https:\/\/92-cucc-data.bego.cc\/d4015376\/0f056fafc06b2caae1fbc09398baa987\/500-%E6%95%B0%E5%AD%A6%E4%B8%9B%E4%B9%A6.-.%5B%E6%8E%A7%E5%88%B6%E8%AE%BA%5D.%5B%E5%85%B7%E6%9C%89%E9%80%82%E5%BA%94%E6%80%A7%E7%89%B9%E8%89%B2%E7%9A%84%E8%87%AA%E5%8A%A8%E6%8E%A7%E5%88%B6%E7%B3%BB%E7%BB%9F%5D.pdf?cts=D39A91A92A31Fccd73&ctp=39A91A92A31&ctt=1728470964&limit=1&spd=50000&ctk=0f056fafc06b2caae1fbc09398baa987&chk=760e47c028b68ea41eeca1d09b84cce9-8535153&mtd=1","code":200,"pop":0,"file_size":8535153,"confirm_url":"https:\/\/doubleclick.ctfile.com\/?adv&adimage&adimages&mod=cpv&act=confirm&uid=4015376&fid=131945810&fv=65&t=1728449364&g=10&ad=5&rc=0&adb=1&size=8535153&chk=760e47c028b68ea41eeca1d09b84cce9-8535153&k=08ebe5fb20996a6c35602bbfca1a93f2","file_name":"500-数学丛书.-.[控制论].[具有适应性特色的自动控制系统].pdf"}
|
||||||
|
|
||||||
|
解析替换\/ -> \
|
||||||
|
|
||||||
|
https://92-cucc-data.bego.cc/d4015376/0f056fafc06b2caae1fbc09398baa987/500-%E6%95%B0%E5%AD%A6%E4%B8%9B%E4%B9%A6.-.%5B%E6%8E%A7%E5%88%B6%E8%AE%BA%5D.%5B%E5%85%B7%E6%9C%89%E9%80%82%E5%BA%94%E6%80%A7%E7%89%B9%E8%89%B2%E7%9A%84%E8%87%AA%E5%8A%A8%E6%8E%A7%E5%88%B6%E7%B3%BB%E7%BB%9F%5D.pdf?cts=D39A91A92A31Fccd73&ctp=39A91A92A31&ctt=1728470964&limit=1&spd=50000&ctk=0f056fafc06b2caae1fbc09398baa987&chk=760e47c028b68ea41eeca1d09b84cce9-8535153&mtd=1
|
||||||
|
|
||||||
|
###
|
||||||
|
https://92-cucc-data.bego.cc/d4015376/0f056fafc06b2caae1fbc09398baa987/500-%E6%95%B0%E5%AD%A6%E4%B8%9B%E4%B9%A6.-.%5B%E6%8E%A7%E5%88%B6%E8%AE%BA%5D.%5B%E5%85%B7%E6%9C%89%E9%80%82%E5%BA%94%E6%80%A7%E7%89%B9%E8%89%B2%E7%9A%84%E8%87%AA%E5%8A%A8%E6%8E%A7%E5%88%B6%E7%B3%BB%E7%BB%9F%5D.pdf?cts=D39A91A92A31Fccd73&ctp=39A91A92A31&ctt=1728470964&limit=1&spd=50000&ctk=0f056fafc06b2caae1fbc09398baa987&chk=760e47c028b68ea41eeca1d09b84cce9-8535153&mtd=1
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
https://92-cucc-data.bego.cc/d4015376/0f056fafc06b2caae1fbc09398baa987/500-%E6%95%B0%E5%AD%A6%E4%B8%9B%E4%B9%A6.-.%5B%E6%8E%A7%E5%88%B6%E8%AE%BA%5D.%5B%E5%85%B7%E6%9C%89%E9%80%82%E5%BA%94%E6%80%A7%E7%89%B9%E8%89%B2%E7%9A%84%E8%87%AA%E5%8A%A8%E6%8E%A7%E5%88%B6%E7%B3%BB%E7%BB%9F%5D.pdf?cts=D39A91A92A31Fccd73&ctp=39A91A92A31&ctt=1728470964&limit=1&spd=50000&ctk=0f056fafc06b2caae1fbc09398baa987&chk=760e47c028b68ea41eeca1d09b84cce9-8535153&mtd=1
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
###超星
|
###超星 需要Referer
|
||||||
|
|
||||||
### 直链 Referer
|
### 直链 Referer 有效期似乎是永久 at=1717958244333 => 2024/6/10 2:37:24
|
||||||
https://d0.ananas.chaoxing.com/download/8e8c9baca640d24680d974331390a158?at_=1717958244333&ak_=783925f9ba6eb2d0c711977b777a13e0&ad_=58ffecd38be494bea68f0cda68b18c0a&fn=testgles.c
|
https://d0.ananas.chaoxing.com/download/8e8c9baca640d24680d974331390a158?at_=1717958244333&ak_=783925f9ba6eb2d0c711977b777a13e0&ad_=58ffecd38be494bea68f0cda68b18c0a&fn=testgles.c
|
||||||
Referer: https://pan-yz.chaoxing.com/external/m/file/1006748113111711744
|
Referer: https://pan-yz.chaoxing.com/external/m/file/1006748113111711744
|
||||||
|
|
||||||
|
|||||||
@@ -190,6 +190,12 @@ GET http://127.0.0.1:6401/parser?url=https://iwx.mail.qq.com/ftn/download?func=3
|
|||||||
# @no-redirect
|
# @no-redirect
|
||||||
GET http://127.0.0.1:6401/json/parser?url=https://iwx.mail.qq.com/ftn/download?func=3&key=qweqe&code=8c02cf57&k=asdad
|
GET http://127.0.0.1:6401/json/parser?url=https://iwx.mail.qq.com/ftn/download?func=3&key=qweqe&code=8c02cf57&k=asdad
|
||||||
|
|
||||||
|
### PASS CT
|
||||||
|
# @no-redirect
|
||||||
|
GET http://127.0.0.1:6401/parser?url=https://474b.com/file/4015376-131945810
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### n1
|
### n1
|
||||||
http://127.0.0.1:6401/n1/statisticsInfo
|
http://127.0.0.1:6401/n1/statisticsInfo
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user