mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2025-12-16 20:33:03 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6647fc5371 | ||
|
|
b67544f0cd | ||
|
|
ef5826a73b | ||
|
|
a48adbd0df | ||
|
|
5c60493a24 | ||
|
|
55e6227de0 | ||
|
|
24a7395004 | ||
|
|
b2a7187fc5 |
@@ -1,9 +1,9 @@
|
|||||||
FROM azul/zulu-openjdk-alpine:17
|
FROM eclipse-temurin:17-jre
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# 安装 unzip
|
# 安装 unzip
|
||||||
RUN apk add --no-cache unzip
|
RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY ./web-service/target/netdisk-fast-download-bin.zip .
|
COPY ./web-service/target/netdisk-fast-download-bin.zip .
|
||||||
|
|
||||||
|
|||||||
14
bin/stop.sh
Normal file
14
bin/stop.sh
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# set -x
|
||||||
|
|
||||||
|
# 找到运行中的 Java 进程的 PID
|
||||||
|
PID=$(ps -ef | grep 'netdisk-fast-download.jar' | grep -v grep | awk '{print $2}')
|
||||||
|
|
||||||
|
if [ -z "$PID" ]; then
|
||||||
|
echo "未找到正在运行的进程 netdisk-fast-download.jar"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
# 杀掉进程
|
||||||
|
echo "停止 netdisk-fast-download.jar (PID: $PID)..."
|
||||||
|
kill -9 "$PID"
|
||||||
|
fi
|
||||||
@@ -66,87 +66,41 @@ public class YeTool extends PanBase {
|
|||||||
|
|
||||||
public Future<String> parse() {
|
public Future<String> parse() {
|
||||||
|
|
||||||
final String dataKey = shareLinkInfo.getShareKey();
|
final String shareKey = shareLinkInfo.getShareKey().replaceAll("(\\..*)|(#.*)", "");
|
||||||
final String pwd = shareLinkInfo.getSharePassword();
|
final String pwd = shareLinkInfo.getSharePassword();
|
||||||
|
|
||||||
client.getAbs(UriTemplate.of(FIRST_REQUEST_URL)).setTemplateParam("key", dataKey).send().onSuccess(res -> {
|
client.getAbs(UriTemplate.of(GET_FILE_INFO_URL))
|
||||||
|
.setTemplateParam("shareKey", shareKey)
|
||||||
|
.setTemplateParam("pwd", pwd)
|
||||||
|
.setTemplateParam("ParentFileId", "0")
|
||||||
|
// .setTemplateParam("authKey", AESUtils.getAuthKey("/a/api/share/get"))
|
||||||
|
.putHeader("Platform", "web")
|
||||||
|
.putHeader("App-Version", "3")
|
||||||
|
.send().onSuccess(res2 -> {
|
||||||
|
JsonObject infoJson = asJson(res2);
|
||||||
|
if (infoJson.getInteger("code") != 0) {
|
||||||
|
fail("{} 状态码异常 {}", shareKey, infoJson);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String html = res.bodyAsString();
|
JsonObject getFileInfoJson =
|
||||||
// 判断分享是否已经失效
|
infoJson.getJsonObject("data").getJsonArray("InfoList").getJsonObject(0);
|
||||||
if (html.contains("分享链接已失效")) {
|
getFileInfoJson.put("ShareKey", shareKey);
|
||||||
fail("该分享已失效({})已失效", shareLinkInfo.getShareUrl());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Pattern compile = Pattern.compile("window.g_initialProps\\s*=\\s*(.*);");
|
// 判断是否为文件夹: data->InfoList->0->Type: 1为文件夹, 0为文件
|
||||||
Matcher matcher = compile.matcher(html);
|
try {
|
||||||
|
int type = (Integer)JsonPointer.from("/data/InfoList/0/Type").queryJson(infoJson);
|
||||||
if (!matcher.find()) {
|
if (type == 1) {
|
||||||
fail("该分享({})文件信息找不到, 可能分享已失效", shareLinkInfo.getShareUrl());
|
getZipDownUrl(client, getFileInfoJson);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String fileInfoString = matcher.group(1);
|
} catch (Exception exception) {
|
||||||
JsonObject fileInfoJson = new JsonObject(fileInfoString);
|
fail("该分享[{}]解析异常: {}", shareKey, exception.getMessage());
|
||||||
JsonObject resJson = fileInfoJson.getJsonObject("res");
|
return;
|
||||||
JsonObject resListJson = fileInfoJson.getJsonObject("reslist");
|
}
|
||||||
|
|
||||||
if (resJson == null || resJson.getInteger("code") != 0) {
|
|
||||||
fail(dataKey + " 解析到异常JSON: " + resJson);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
String shareKey = resJson.getJsonObject("data").getString("ShareKey");
|
|
||||||
|
|
||||||
if (resListJson == null || resListJson.getInteger("code") != 0) {
|
|
||||||
// 加密分享
|
|
||||||
if (StringUtils.isNotEmpty(pwd)) {
|
|
||||||
client.getAbs(UriTemplate.of(GET_FILE_INFO_URL))
|
|
||||||
.setTemplateParam("shareKey", shareKey)
|
|
||||||
.setTemplateParam("pwd", pwd)
|
|
||||||
.setTemplateParam("ParentFileId", "0")
|
|
||||||
// .setTemplateParam("authKey", AESUtils.getAuthKey("/a/api/share/get"))
|
|
||||||
.putHeader("Platform", "web")
|
|
||||||
.putHeader("App-Version", "3")
|
|
||||||
.send().onSuccess(res2 -> {
|
|
||||||
JsonObject infoJson = asJson(res2);
|
|
||||||
if (infoJson.getInteger("code") != 0) {
|
|
||||||
fail("{} 状态码异常 {}", dataKey, infoJson);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
JsonObject getFileInfoJson =
|
|
||||||
infoJson.getJsonObject("data").getJsonArray("InfoList").getJsonObject(0);
|
|
||||||
getFileInfoJson.put("ShareKey", shareKey);
|
|
||||||
|
|
||||||
// 判断是否为文件夹: data->InfoList->0->Type: 1为文件夹, 0为文件
|
|
||||||
try {
|
|
||||||
int type = (Integer)JsonPointer.from("/data/InfoList/0/Type").queryJson(infoJson);
|
|
||||||
if (type == 1) {
|
|
||||||
getZipDownUrl(client, getFileInfoJson);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} catch (Exception exception) {
|
|
||||||
fail("该分享[{}]解析异常: {}", dataKey, exception.getMessage());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
getDownUrl(client, getFileInfoJson);
|
|
||||||
}).onFailure(this.handleFail(GET_FILE_INFO_URL));
|
|
||||||
} else {
|
|
||||||
fail("该分享[{}]需要密码",dataKey);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
JsonObject reqBodyJson = resListJson.getJsonObject("data").getJsonArray("InfoList").getJsonObject(0);
|
|
||||||
reqBodyJson.put("ShareKey", shareKey);
|
|
||||||
if (reqBodyJson.getInteger("Type") == 1) {
|
|
||||||
// 文件夹
|
|
||||||
getZipDownUrl(client, reqBodyJson);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
getDownUrl(client, reqBodyJson);
|
|
||||||
}).onFailure(this.handleFail(FIRST_REQUEST_URL));
|
|
||||||
|
|
||||||
|
getDownUrl(client, getFileInfoJson);
|
||||||
|
}).onFailure(this.handleFail(GET_FILE_INFO_URL));
|
||||||
return promise.future();
|
return promise.future();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,7 +197,6 @@ public class YeTool extends PanBase {
|
|||||||
String shareKey = shareLinkInfo.getShareKey(); // 分享链接的唯一标识
|
String shareKey = shareLinkInfo.getShareKey(); // 分享链接的唯一标识
|
||||||
String pwd = shareLinkInfo.getSharePassword(); // 分享密码
|
String pwd = shareLinkInfo.getSharePassword(); // 分享密码
|
||||||
String parentFileId = "0"; // 根目录的文件ID
|
String parentFileId = "0"; // 根目录的文件ID
|
||||||
String shareId = shareLinkInfo.getShareKey(); // String.valueOf(AESUtils.idEncrypt(dataKey));
|
|
||||||
|
|
||||||
// 如果参数里的目录ID不为空,则直接解析目录
|
// 如果参数里的目录ID不为空,则直接解析目录
|
||||||
String dirId = (String) shareLinkInfo.getOtherParam().get("dirId");
|
String dirId = (String) shareLinkInfo.getOtherParam().get("dirId");
|
||||||
|
|||||||
@@ -29,4 +29,20 @@ public class TestRegex {
|
|||||||
System.out.println(matcher.group(1));
|
System.out.println(matcher.group(1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testYeShareKey() {
|
||||||
|
String url = "ABCD1234-asdasd";
|
||||||
|
String shareKey = url.replaceAll("(\\..*)|(#.*)", "");
|
||||||
|
System.out.println(shareKey);
|
||||||
|
url = "ABCD1234-adasd.html";
|
||||||
|
shareKey = url.replaceAll("(\\..*)|(#.*)", "");
|
||||||
|
System.out.println(shareKey);
|
||||||
|
url = "ABCD1234-adasd#123123";
|
||||||
|
shareKey = url.replaceAll("(\\..*)|(#.*)", "");
|
||||||
|
System.out.println(shareKey);
|
||||||
|
url = "ABCD1234-adasd.html#123123";
|
||||||
|
shareKey = url.replaceAll("(\\..*)|(#.*)", "");
|
||||||
|
System.out.println(shareKey);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@element-plus/icons-vue": "^2.3.1",
|
"@element-plus/icons-vue": "^2.3.1",
|
||||||
"@vueuse/core": "^11.2.0",
|
"@vueuse/core": "^11.2.0",
|
||||||
"axios": "1.11.0",
|
"axios": "1.12.0",
|
||||||
"clipboard": "^2.0.11",
|
"clipboard": "^2.0.11",
|
||||||
"core-js": "^3.8.3",
|
"core-js": "^3.8.3",
|
||||||
"element-plus": "^2.8.7",
|
"element-plus": "^2.8.7",
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 项目简介移到卡片内 -->
|
<!-- 项目简介移到卡片内 -->
|
||||||
<div class="project-intro">
|
<div class="project-intro">
|
||||||
<div class="intro-title">NFD网盘直链解析0.1.9_bate8</div>
|
<div class="intro-title">NFD网盘直链解析0.1.9_bate9</div>
|
||||||
<div class="intro-desc">
|
<div class="intro-desc">
|
||||||
<div>支持网盘:蓝奏云、蓝奏云优享、小飞机盘、123云盘、奶牛快传、移动云空间、QQ邮箱云盘、QQ闪传等 <el-link style="color:#606cf5" href="https://github.com/qaiu/netdisk-fast-download?tab=readme-ov-file#%E7%BD%91%E7%9B%98%E6%94%AF%E6%8C%81%E6%83%85%E5%86%B5" target="_blank"> >> </el-link></div>
|
<div>支持网盘:蓝奏云、蓝奏云优享、小飞机盘、123云盘、奶牛快传、移动云空间、QQ邮箱云盘、QQ闪传等 <el-link style="color:#606cf5" href="https://github.com/qaiu/netdisk-fast-download?tab=readme-ov-file#%E7%BD%91%E7%9B%98%E6%94%AF%E6%8C%81%E6%83%85%E5%86%B5" target="_blank"> >> </el-link></div>
|
||||||
<div>文件夹解析支持:蓝奏云、蓝奏云优享、小飞机盘、123云盘</div>
|
<div>文件夹解析支持:蓝奏云、蓝奏云优享、小飞机盘、123云盘</div>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
###
|
###
|
||||||
POST http://127.0.0.1:6400/v2/shout/submit
|
POST https://lzzz.qaiu.top/v2/shout/submit
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"content": "CREATE UNIQUE INDEX `idx_uk_code` ON `t_messages` (`code`);"
|
"content": "ok 123123123123123123123123123123123123123123123123123123123123231123123"
|
||||||
}
|
}
|
||||||
|
|
||||||
###
|
###
|
||||||
GET http://127.0.0.1:6400/v2/shout/retrieve?code=878696
|
GET http://lzzz.qaiu.top/v2/shout/retrieve?code=414016
|
||||||
|
|
||||||
###
|
###
|
||||||
响应:
|
响应:
|
||||||
@@ -16,3 +16,6 @@ GET http://127.0.0.1:6400/v2/shout/retrieve?code=878696
|
|||||||
"code": 200,
|
"code": 200,
|
||||||
"msg": "success"
|
"msg": "success"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
###
|
||||||
|
https://gfs302n511.userstorage.mega.co.nz/dl/XwiiRG-Z97rz7wcbWdDmcd654FGkYU3FJncTobxhpPR9GVSggHJQsyMGdkLsWEiIIf71RUXcQPtV7ljVc0Z3tA_ThaUb9msdh7tS0z-2CbaRYSM5176DFxDKQtG84g
|
||||||
Reference in New Issue
Block a user