Commit Graph

1149 Commits

Author SHA1 Message Date
yukaidi
85fe910f25 fix(bug): ParamUtil 修复数组越界问题
原代码当 kv.length == 0 时访问 kv[0] 会抛出异常。
改为跳过空参数,使用 split(=, 2) 限制分割次数。
2026-05-29 00:32:56 +08:00
yukaidi
6c60b0116f fix(resource): JDBCPoolInit 实现 AutoCloseable 添加 close() 方法
原代码单例模式无关闭方法,应用退出时数据库连接池无法释放。

改为:
- 实现 AutoCloseable 接口
- 添加 close() 方法关闭连接池
- 关闭后将 pool 置 null 防止重复关闭
2026-05-29 00:32:26 +08:00
yukaidi
8dfcf510f6 fix(resource): JsParserExecutor WorkerExecutor 懒加载 + 关闭支持
原代码静态初始化 WorkerExecutor,应用关闭时无法释放线程资源。

改为:
- 懒加载创建 WorkerExecutor
- 实现 AutoCloseable 接口
- 添加 shutdownExecutor() 静态方法供应用关闭时调用
2026-05-29 00:32:13 +08:00
yukaidi
be1ed3d46d fix(memory): ReflectionUtil 添加 SoftReference + TTL 缓存清理
原代码使用永久缓存 Reflections 实例,占用大量内存且不释放。

改为:
- 使用 SoftReference 允许 GC 在内存不足时回收
- 添加 1 小时 TTL 防止长期占用
- 每次获取时自动清理过期条目
2026-05-29 00:32:02 +08:00
yukaidi
1fca578c07 fix(resource): ReqIpUtil 使用统一 Vertx 单例
原代码在字段级别直接创建 Vertx.vertx() 实例,
可能导致多个 Vertx 实例重复创建,浪费系统资源。

改为使用 WebClientVertxInit.get() 获取统一单例。
2026-05-29 00:31:49 +08:00
yukaidi
a83665ac44 fix(security): SecurityClassFilter 改为白名单策略
原黑名单策略默认放行所有类,存在安全风险。
改为白名单策略,仅允许明确安全的 Java 类被 JS 访问。

允许: java.util.*, java.time.*, java.lang 基础类型, Nashorn API
拒绝: 默认拒绝所有未在白名单中的类
2026-05-29 00:31:38 +08:00
yukaidi
21e8a370c3 fix: ShutdownHook 改为同步等待 vertx.close(),修复 JVM 提前退出导致资源未释放
审查发现 vertx.close() 是异步操作,ShutdownHook 线程提交关闭任务后立即退出,
JVM 在资源实际释放前就终止了,与未修复时行为等价。
改为 CompletableFuture.get(10s) 阻塞等待,超时有 warn 日志。
同时移除无用的 mainVertx 字段,修正 JsExecUtils 误导性注释。
2026-05-28 23:58:52 +08:00
yukaidi
3dd4dd139b fix: 缓存清理异常日志级别从 debug 改为 warn,确保生产环境可见
审查发现数据库异常时 debug 级别会被静默吞掉,运维无法感知。
2026-05-28 23:43:07 +08:00
yukaidi
afe2046bc8 fix: RateLimiter 移除 synchronized 并添加 volatile,修复事件循环阻塞
审查发现 synchronized 在 Vert.x 事件循环中会严重阻塞并发。
ConcurrentHashMap 本身已线程安全,移除 synchronized 锁。
RequestInfo 字段添加 volatile 保证多线程内存可见性。
2026-05-28 23:42:40 +08:00
yukaidi
6d24388690 fix: ServiceVerticle 保存 MessageConsumer 引用,修复 unregister 参数类型错误
审查发现 unregister(address) 参数类型不匹配,ServiceBinder.unregister() 需要
MessageConsumer 而非 String。改为保存 register() 返回的 MessageConsumer,
stop() 中直接调用 consumer.unregister()。同时修复日志在 clear() 后读 size 始终为 0 的 bug。
2026-05-28 23:42:24 +08:00
yukaidi
0b024a849a fix: 添加缓存表定时清理任务,修复 cache_link_info 无限增长
- CacheManager 添加 cleanupExpiredCache() 方法删除过期缓存记录
- PostExecVerticle 注册每小时执行一次的定时清理任务
- 原实现只有读时惰性检查过期,过期记录永远不会被删除,长期运行后数据库持续膨胀
2026-05-28 23:20:17 +08:00
yukaidi
8745dc3567 fix: RateLimiter 添加过期条目清理,修复 ipRequestMap 无限增长
当 Map 超过 1000 条目时触发惰性清理,移除所有已过期的 IP 条目。
原实现中过期条目只重置计数不删除 key,长期运行后 Map 持续膨胀。
同时消除多余的 ipRequestMap.get(ip) 调用,直接使用 compute() 返回值。
2026-05-28 23:16:53 +08:00
yukaidi
1f4c7019d4 fix: ServiceVerticle 添加 stop() 方法注销 EventBus 消费者,修复重部署时消费者累积泄漏
保存已注册的 EventBus 地址列表,在 stop() 中通过 ServiceBinder 逐一注销。
原实现有 start() 无 stop(),Verticle 重部署时旧消费者不会被注销,导致重复注册。
2026-05-28 23:15:12 +08:00
yukaidi
255e7b2fb5 fix: JsParserExecutor 和 JsHttpClient 添加资源清理,修复解析完成后资源泄漏
- JsHttpClient 添加 close() 方法释放 WebClient 连接池
- JsParserExecutor 添加 close() 方法,清除 ScriptEngine 中注入的 Java 对象引用
- parse()/parseFileList()/parseById() 均在 onComplete 回调中调用 close() 释放资源
2026-05-28 23:13:09 +08:00
yukaidi
7419e536cf fix: JsExecUtils 缓存 ScriptEngineManager,避免每次调用都创建新实例
ScriptEngineManager 是重量级对象(含类加载器扫描等),将其缓存为 static 字段,
executeDynamicJs/executeOtherJs 每次调用只创建轻量的 ScriptEngine 实例。
2026-05-28 23:08:50 +08:00
yukaidi
74df000287 fix: PanBase WebClient 改为静态共享单例,修复每请求创建4个实例的资源泄漏
WebClient 是线程安全的,将 client/clientNoRedirects/clientDisableUA 改为 static 共享实例,
避免每次解析请求创建4个独立 WebClient(各含连接池)。
clientSession 仍保持实例级(管理 cookie,非线程安全)。
代理模式下仍创建独立 WebClient 实例。
2026-05-28 23:06:45 +08:00
yukaidi
2e0127d609 fix: 注册 JVM ShutdownHook,修复 Vert.x 实例进程退出时不关闭的资源泄漏
Deploy.deployVerticle() 中创建的 Vert.x 实例是局部变量,进程退出时无法优雅关闭,
导致 Netty EventLoopGroup、JDBC 连接池、内部定时器等资源泄漏。
添加 ShutdownHook 在 JVM 关闭时调用 vertx.close() 级联释放所有资源。
2026-05-28 23:04:54 +08:00
qaiu
2b9168e8df 更新 LzTool.java
fix:蓝奏目录识别问题
v3.0.3
2026-05-28 12:33:16 +08:00
qaiu
7bb3cf7c51 Update README.md 2026-05-17 21:59:19 +08:00
qaiu
2ce5058be0 Add professional version cloud storage options 2026-05-17 21:57:39 +08:00
q
a5fc41f152 1 2026-04-29 22:40:57 +08:00
q
3245a27156 release v3.0.2 v3.0.2 2026-04-29 22:37:07 +08:00
q
ce0fbf65aa fixed test docx 2026-04-28 15:57:50 +08:00
qaiu
eb87c3d865 Update app.properties 2026-04-27 20:06:19 +08:00
qaiu
990a90e461 更新 README.md 2026-04-27 12:04:29 +08:00
qaiu
45cb255a4d 更新 README.md 2026-04-27 12:01:11 +08:00
qaiu
5e8b8a3575 更新 README.md 2026-04-24 03:05:29 +08:00
qaiu
c317e53c24 Merge pull request #182 from qaiu/copilot/update-readme-netdisk-comparison
README: Remove 奶牛快传(cowtransfer) references
2026-04-23 19:41:33 +08:00
copilot-swe-agent[bot]
29b59d8450 Remove 奶牛快传(cowtransfer) from README.md
Agent-Logs-Url: https://github.com/qaiu/netdisk-fast-download/sessions/63030ac7-158c-43ca-9dcd-254e03c6f8f4

Co-authored-by: qaiu <29825328+qaiu@users.noreply.github.com>
2026-04-23 11:27:04 +00:00
qaiu
97b7e2f86e Merge pull request #181 from qaiu/copilot/check-authentication-mechanism
fix: 演练场密码登录后所有API返回"未授权访问"
2026-04-23 09:34:18 +08:00
copilot-swe-agent[bot]
2f55294b58 fix: 修复演练场输入密码后提示未授权访问的问题
根本原因:框架 RouterHandlerFactory 未注册 SessionHandler,
导致 ctx.session() 始终返回 null。登录时密码校验通过但认证
状态被静默丢弃,后续所有请求均返回"未授权访问"。

修复方案:将 Session 鉴权改为 Token(Bearer)鉴权:
- PlaygroundConfig: 新增 generateToken()/validateToken(),
  使用 SecureRandom 生成密码学安全 Token,并在生成时
  清理过期 Token 防止内存泄漏
- PlaygroundApi: login() 返回 Token;checkAuth() 从
  Authorization 请求头中读取并校验 Token
- playgroundApi.js: 添加请求拦截器自动携带 Token;
  login() 从响应中提取并保存 Token 到 localStorage
- Playground.vue: 后端报告未认证时同步清除 playground_token

Agent-Logs-Url: https://github.com/qaiu/netdisk-fast-download/sessions/52144d13-cd49-4a3d-b279-9b8d6cbad757

Co-authored-by: qaiu <29825328+qaiu@users.noreply.github.com>
2026-04-23 01:22:09 +00:00
q
2161190d9a config: switch active profile to dev v3.0.1 2026-04-22 16:10:22 +08:00
q
aaae301cbc release v3.0.0: core refactoring, new AppRun/PostExecVerticle, proxy and router improvements v3.0.0 2026-04-22 15:57:35 +08:00
qaiu
9ca6511235 Merge pull request #180 from qaiu/copilot/fix-filemanagerplugin-copy-back
fix: restore missing copy of build output to webroot/nfd-front in vue.config.js
2026-04-22 12:57:06 +08:00
copilot-swe-agent[bot]
8582290db3 fix: restore copy of nfd-front to webroot/nfd-front in vue.config.js
Agent-Logs-Url: https://github.com/qaiu/netdisk-fast-download/sessions/e4e9323a-d8f5-48b1-9476-7efab611f978

Co-authored-by: qaiu <29825328+qaiu@users.noreply.github.com>
2026-04-22 04:40:03 +00:00
copilot-swe-agent[bot]
5ff33d7c58 Initial plan 2026-04-22 04:39:22 +00:00
q
0cfb69a240 fix frontend shortcut parsing and proxy static serving 2026-04-22 04:24:22 +08:00
q
110a9beda4 fix parser onedrive url decoding and bump vulnerable deps 2026-04-22 02:03:04 +08:00
qaiu
fd6a3f5929 更新 README.md 2026-04-21 23:22:52 +08:00
qaiu
82ad6ec427 更新 README.md 2026-04-20 07:51:57 +08:00
qaiu
1bfc7c960d 更新 README.md 2026-04-19 19:34:57 +08:00
qaiu
332f49f483 更新 README.md 2026-04-19 19:32:13 +08:00
q
b967c7a1bb Merge pull request #177 from qaiu/pr-177
# Conflicts:
#	parser/src/main/java/cn/qaiu/parser/PanDomainTemplate.java
#	parser/src/test/java/cn/qaiu/parser/PanDomainTemplateTest.java
2026-04-19 08:51:44 +08:00
q
519dbe1f77 docs: update fs support and dev proxy port 2026-04-19 08:47:01 +08:00
q
c64855d4ad feat: improve downloader integration for parsed files 2026-04-19 08:43:27 +08:00
qaiu
d50d10ba89 Merge pull request #178 from qaiu/copilot/implement-feishu-share-parser-java
feat: 支持飞书云盘分享解析
2026-04-18 16:47:33 +08:00
copilot-swe-agent[bot]
e79478c421 refactor: address code review - extract constants, improve logging
- Extract Pattern constants as static final fields
- Extract PAGE_SIZE constant for API pagination
- Add logging for NumberFormatException in file size parsing

Agent-Logs-Url: https://github.com/qaiu/netdisk-fast-download/sessions/56418d09-a396-40cf-a080-c71e4a69c323

Co-authored-by: qaiu <29825328+qaiu@users.noreply.github.com>
2026-04-18 08:46:06 +00:00
copilot-swe-agent[bot]
c401a84eb8 feat: add Feishu cloud disk share parser (file + folder support)
Add FsTool parser for Feishu (飞书) cloud disk share links.
Supports both file and folder share URL formats:
- File: https://xxx.feishu.cn/file/{token}
- Folder: https://xxx.feishu.cn/drive/folder/{token}

The parser:
- Fetches anonymous session cookies from share page
- Uses Range probe to detect filename and size
- Returns download URL with required headers (Cookie, Referer)
- Supports folder listing via v3 API with pagination
- Updates README with Feishu in supported cloud disk list

Agent-Logs-Url: https://github.com/qaiu/netdisk-fast-download/sessions/56418d09-a396-40cf-a080-c71e4a69c323

Co-authored-by: qaiu <29825328+qaiu@users.noreply.github.com>
2026-04-18 08:43:26 +00:00
copilot-swe-agent[bot]
a9978a6202 Initial plan 2026-04-18 08:36:17 +00:00
qaiu
cc9d0a4b30 更新 README.md 2026-04-15 05:16:47 +08:00