Compare commits

...

8 Commits

Author SHA1 Message Date
q
2848937ce7 Merge remote-tracking branch 'origin/main' 2025-07-18 13:00:33 +08:00
q
42ff0c21b2 1. 默认缓存时间修改
2. 文件夹解析异常处理
3. 首页优化
2025-07-18 13:00:12 +08:00
qaiu
3ed7e547e6 更新 README.md
联系方式更新
2025-07-16 13:30:47 +08:00
q
fad8e688df 首页样式优化 2025-07-15 18:09:11 +08:00
q
b2f2dcac4c Merge remote-tracking branch 'origin/main' 2025-07-14 16:16:13 +08:00
q
fcba78e977 启动参数优化 2025-07-14 16:16:00 +08:00
qaiu
77c9d777a1 更新 README.md 2025-07-12 13:47:03 +08:00
q
8631524107 移动端布局优化 2025-07-11 11:51:08 +08:00
9 changed files with 106 additions and 57 deletions

View File

@@ -13,7 +13,8 @@
# netdisk-fast-download 网盘分享链接云解析服务
# netdisk-fast-download 网盘分享链接云解析服务
QQ群1017480890
netdisk-fast-download网盘直链云解析(nfd云解析)能把网盘分享下载链接转化为直链,支持多款云盘,已支持蓝奏云/蓝奏云优享/奶牛快传/移动云云空间/小飞机盘/亿方云/123云盘/Cloudreve等支持加密分享以及部分网盘文件夹分享。
@@ -388,12 +389,13 @@ Core模块集成Vert.x实现类似spring的注解式路由API
## 支持该项目
开源不易,用爱发电,本项目长期维护如果觉得有帮助, 可以请作者喝杯咖啡, 感谢支持
### 关于专属版
99元, 提供对小飞机,蓝奏优享大文件解析的支持, 提供天翼云盘,移动云盘,联调云盘的解析支持
199元, 包含部署服务和首页定制, 需提供宝塔环境
可以提供功能定制开发, 加v价格详谈:
<p>wechat1: qaiu-cn</p>
<p>wechat2: imcoding_</p>
<p>qq: 197575894</p>
<p>wechat: imcoding_</p>
<!--
![image](https://github.com/qaiu/netdisk-fast-download/assets/29825328/54276aee-cc3f-4ebd-8973-2e15f6295819)

View File

@@ -1,22 +0,0 @@
@echo off
setlocal
rem 获取当前 Java 版本信息并搜索是否包含 "17."
java -version 2>&1 | find "17." >nul
rem 如果找不到 JDK 17.x则下载并安装
if errorlevel 1 (
echo JDK 17.x not found. Downloading and installing...
REM 这里添加下载和安装 JDK 的代码
rem 验证安装
java -version
echo JDK 17.x installation complete.
) else (
echo JDK 17.x is already installed.
)
endlocal
pause

View File

@@ -54,9 +54,9 @@ public final class Deploy {
public void start(String[] args, Handler<JsonObject> handle) {
this.mainThread = Thread.currentThread();
this.handle = handle;
if (args.length > 0) {
if (args.length > 0 && args[0].startsWith("app-")) {
// 启动参数dev或者prod
path.append("-").append(args[0]);
path.append("-").append(args[0].replace("app-",""));
}
// 读取yml配置

View File

@@ -149,7 +149,7 @@ public class FjTool extends PanBase {
.setTemplateParam("ts", tsEncode2)
.setTemplateParam("auth", auth)
.setTemplateParam("dataKey", shareId);
System.out.println(httpRequest.toString());
// System.out.println(httpRequest.toString());
httpRequest.send().onSuccess(res2 -> {
MultiMap headers = res2.headers();
if (!headers.contains("Location")) {
@@ -179,7 +179,11 @@ public class FjTool extends PanBase {
return promise.future();
}
parse().onSuccess(id -> {
parserDir(id, shareId, promise);
if (id != null && id.matches("^[a-zA-Z0-9]+$")) {
parserDir(id, shareId, promise);
} else {
promise.fail("解析目录ID失败");
}
}).onFailure(failRes -> {
log.error("解析目录失败: {}", failRes.getMessage());
promise.fail(failRes);
@@ -198,8 +202,14 @@ public class FjTool extends PanBase {
.setTemplateParam("ts", tsEncode)
.setTemplateParam("folderId", id)
.send().onSuccess(res -> {
JsonObject jsonObject = asJson(res);
System.out.println(jsonObject.encodePrettily());
JsonObject jsonObject;
try {
jsonObject = asJson(res);
} catch (Exception e) {
promise.fail(FIRST_REQUEST_URL + " 解析JSON失败: " + res.bodyAsString());
return;
}
// System.out.println(jsonObject.encodePrettily());
JsonArray list = jsonObject.getJsonArray("list");
ArrayList<FileInfo> result = new ArrayList<>();
list.forEach(item->{
@@ -269,7 +279,10 @@ public class FjTool extends PanBase {
result.add(fileInfo);
});
promise.complete(result);
});
}).onFailure(failRes -> {
log.error("解析目录请求失败: {}", failRes.getMessage());
promise.fail(failRes);
});;
}
@Override

View File

@@ -158,7 +158,11 @@ public class IzTool extends PanBase {
return promise.future();
}
parse().onSuccess(id -> {
parserDir(id, shareId, promise);
if (id != null && id.matches("^[a-zA-Z0-9]+$")) {
parserDir(id, shareId, promise);
} else {
promise.fail("解析目录ID失败");
}
}).onFailure(failRes -> {
log.error("解析目录失败: {}", failRes.getMessage());
promise.fail(failRes);
@@ -177,8 +181,14 @@ public class IzTool extends PanBase {
.setTemplateParam("ts", tsEncode)
.setTemplateParam("folderId", id)
.send().onSuccess(res -> {
JsonObject jsonObject = asJson(res);
System.out.println(jsonObject.encodePrettily());
JsonObject jsonObject;
try {
jsonObject = asJson(res);
} catch (Exception e) {
promise.fail(FIRST_REQUEST_URL + " 解析JSON失败: " + res.bodyAsString());
return;
}
// System.out.println(jsonObject.encodePrettily());
JsonArray list = jsonObject.getJsonArray("list");
ArrayList<FileInfo> result = new ArrayList<>();
list.forEach(item->{
@@ -244,6 +254,9 @@ public class IzTool extends PanBase {
result.add(fileInfo);
});
promise.complete(result);
}).onFailure(failRes -> {
log.error("解析目录请求失败: {}", failRes.getMessage());
promise.fail(failRes);
});
}

View File

@@ -36,19 +36,19 @@
部署
</a>
</div>
<el-row :gutter="20">
<el-row :gutter="20" style="margin-left: 0; margin-right: 0;">
<el-card class="box-card">
<div style="text-align: right">
<DarkMode @theme-change="handleThemeChange" />
</div>
<div class="demo-basic--circle">
<div class="block" style="text-align: center;">
<img :height="150" src="../../public/images/lanzou111.png" alt="lz"></img>
<img :height="150" src="../../public/images/lanzou111.png" alt="lz">
</div>
</div>
<!-- 项目简介移到卡片内 -->
<div class="project-intro">
<div class="intro-title">NFD网盘直链解析0.1.9_bate6</div>
<div class="intro-title">NFD网盘直链解析0.1.9_bate7</div>
<div class="intro-desc">
<div>支持网盘蓝奏云蓝奏云优享小飞机盘123云盘奶牛快传移动云空间亿方云文叔叔QQ邮箱文件中转站等</div>
<div>文件夹解析支持蓝奏云蓝奏云优享小飞机盘123云盘</div>
@@ -161,6 +161,9 @@
<el-descriptions-item label="302下载链接">
<el-link target="_blank" :href="statisticsData.downLink">{{ statisticsData.downLink }}</el-link>
</el-descriptions-item>
<el-descriptions-item label="302预览链接">
<el-link target="_blank" :href="statisticsData.viewLink">{{ statisticsData.viewLink }}</el-link>
</el-descriptions-item>
<el-descriptions-item label="解析次数">{{ statisticsData.parserTotal }}</el-descriptions-item>
<el-descriptions-item label="缓存命中次数">{{ statisticsData.cacheHitTotal }}</el-descriptions-item>
<el-descriptions-item label="总请求次数">{{ statisticsData.sumTotal }}</el-descriptions-item>
@@ -187,13 +190,19 @@
</el-card>
</el-row>
<!-- 文件解析结果区下方加分享按钮 -->
<div v-if="parseResult.code && downloadUrl" style="margin-top: 10px; text-align: right;">
<el-button type="primary" @click="copyShowFileLink">分享文件直链</el-button>
</div>
<!-- <div v-if="parseResult.code && downloadUrl" style="margin-top: 10px; text-align: right;">-->
<!-- <el-button type="primary" @click="copyShowFileLink">分享文件直链</el-button>-->
<!-- </div>-->
<!-- 目录解析结果区下方加分享按钮 -->
<div v-if="showDirectoryTree && directoryData.length" style="margin-top: 10px; text-align: right;">
<el-button type="primary" @click="copyShowListLink">分享目录直链</el-button>
</div>
<!-- <div v-if="showDirectoryTree && directoryData.length" style="margin-top: 10px; text-align: right;">-->
<!-- <el-input :value="showListLink" readonly style="width: 350px; margin-right: 10px;">-->
<!-- <template #append>-->
<!-- <el-button v-clipboard:copy="showListLink" v-clipboard:success="onCopy" v-clipboard:error="onError">-->
<!-- <el-icon><CopyDocument /></el-icon>复制分享链接-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-input>-->
<!-- </div>-->
</div>
</template>
@@ -246,7 +255,8 @@ export default {
directoryViewMode: 'pane', // 新增,目录树展示模式
hasClipboardSuccessTip: false, // 新增,聚焦期间只提示一次
showRiskDialog: false,
baseUrl: location.origin
baseUrl: location.origin,
showListLink: '',
}
},
methods: {
@@ -334,7 +344,9 @@ export default {
const directoryResult = await this.callAPI('/v2/getFileList', params)
this.directoryData = directoryResult.data || []
this.showDirectoryTree = true
// 自动赋值分享链接
this.showListLink = `${this.baseUrl}/showList?url=${encodeURIComponent(this.link)}`
this.$message.success(`目录解析成功!共找到 ${this.directoryData.length} 个文件/文件夹`)
} catch (error) {
console.error('目录解析失败:', error)
@@ -570,6 +582,7 @@ body.dark-theme {
}
.box-card {
flex: 1;
margin-top: 4em !important;
margin-bottom: 4em !important;
opacity: 1 !important; /* 只要不透明 */
@@ -587,9 +600,17 @@ body.dark-theme {
}
@media screen and (max-width: 700px) {
.box-card {
margin-top: 1em !important;
margin-bottom: 1em !important;
#app {
padding-left: 0 !important;
padding-right: 0 !important;
margin: 0 !important; /* 关键:去掉 auto 居中 */
max-width: 100vw !important;
}
#app .box-card {
margin: 1em 4px !important; /* 上下1em左右4px */
width: auto !important;
max-width: 100vw !important;
box-sizing: border-box;
}
}
@@ -790,4 +811,19 @@ hr {
#app.jv-container .jv-item.jv-object {
color: #32ba6d;
}
.feedback-bar {
width: 100%;
margin: 0 auto; /* 居中 */
text-align: right;
box-sizing: border-box;
}
@media screen and (max-width: 700px) {
.feedback-bar {
max-width: 480px; /* 和移动端卡片宽度一致 */
padding-right: 8px; /* 和卡片内容对齐 */
padding-left: 8px;
}
}
</style>

View File

@@ -16,7 +16,7 @@
<div v-if="loading" style="text-align:center;margin-top:40px;">加载中...</div>
<div v-else-if="error" style="color:red;text-align:center;margin-top:40px;">{{ error }}</div>
<div v-else>
<DirectoryTree
<DirectoryTree
:file-list="directoryData"
:share-url="url"
:password="''"

View File

@@ -46,6 +46,7 @@ public class ParserApi {
}
private final CacheManager cacheManager = new CacheManager();
private final ServerApi serverApi = new ServerApi();
@RouteMapping(value = "/linkInfo", method = RouteMethod.GET)
public Future<LinkInfoResp> parse(HttpServerRequest request, String pwd) {
@@ -56,6 +57,7 @@ public class ParserApi {
LinkInfoResp build = LinkInfoResp.builder()
.downLink(getDownLink(parserCreate, false))
.apiLink(getDownLink(parserCreate, true))
.viewLink(getViewLink(parserCreate))
.shareLinkInfo(shareLinkInfo).build();
// 解析次数统计
shareLinkInfo.getOtherParam().put("UA",request.headers().get("user-agent"));
@@ -83,6 +85,15 @@ public class ParserApi {
return linkPrefix + (isJson ? "/json/" : "/d/") + create.genPathSuffix();
}
private static String getViewLink(ParserCreate create) {
String linkPrefix = SharedDataUtil.getJsonStringForServerConfig("domainName");
if (StringUtils.isBlank(linkPrefix)) {
return "";
}
return linkPrefix + "/v2/view/" + create.genPathSuffix();
}
/**
* 获取支持的网盘列表
* @return list-map: name: 网盘名, type: 网盘标识, url: 网盘域名地址
@@ -151,7 +162,7 @@ public class ParserApi {
@RouteMapping(value = "/view/:type/:key", method = RouteMethod.GET, order = 2)
public void view(HttpServerRequest request, HttpServerResponse response, String type, String key) {
String previewURL = SharedDataUtil.getJsonStringForServerConfig("previewURL");
new ServerApi().parseKeyJson(request, type, key).onSuccess(res -> {
serverApi.parseKeyJson(request, type, key).onSuccess(res -> {
redirect(response, previewURL, res);
}).onFailure(e -> {
ResponseUtil.fireJsonResultResponse(response, JsonResult.error(e.toString()));
@@ -164,7 +175,7 @@ public class ParserApi {
}
/**
* 预览媒体文件
* 预览媒体文件-目录预览
*/
@RouteMapping(value = "/preview", method = RouteMethod.GET, order = 9)
public void viewURL(HttpServerRequest request, HttpServerResponse response, String pwd) {

View File

@@ -63,7 +63,7 @@ cache:
# 该配置未使用后续加入其他Cache实现时区分类型
type: h2db
# 默认时长: 单位分钟,大部分网盘未严格验证,建议不要太大
defaultDuration: 59
defaultDuration: 5
# 具体网盘的缓存配置如果不加配置则不缓存每次请求都会请求网盘API格式网盘标识: 时长
duration:
ce: 5
@@ -93,7 +93,3 @@ proxy:
# username:
# password:
# 代理池配置
#ip-pool:
# api-url: