Commit Graph

182 Commits

Author SHA1 Message Date
yukaidi
3c428f6a6d fix: ShutdownHook 注册顺序调整,确保 Vert.x 先于 JDBCPoolInit 关闭
JVM ShutdownHook 按注册逆序执行。将 AppMain 的 hook 移到 Deploy.start() 之前注册,
使执行顺序变为:Deploy hook(关闭 Vert.x)-> AppMain hook(关闭 JDBCPoolInit/JsParserExecutor)。
2026-05-29 09:01:08 +08:00
yukaidi
d1569195e4 fix: AppMain 注册 ShutdownHook 关闭 JDBCPoolInit 和 JsParserExecutor
审查发现 9c3945f 因模块依赖问题回退了 ShutdownHook 中的清理逻辑,
导致 JDBCPoolInit 连接池和 JsParserExecutor WorkerExecutor 在进程退出时
无法被显式关闭。将清理逻辑移到 web-service 模块的 AppMain(可依赖所有模块)。
2026-05-29 07:22:57 +08:00
yukaidi
d6e88f0c53 fix: PlaygroundApi 移除重复 import 和未使用的 getStackTrace 死代码
审查发现 42925c8 引入了重复的 StandardCharsets import,且 getStackTrace
方法在移除堆栈泄露后无任何调用方,属于死代码。
2026-05-29 07:06:53 +08:00
yukaidi
2a9fa81e56 fix: CacheManager registerPeriodicCleanup 添加防重入和 Vertx 就绪检查
审查发现 static 块中注册定时任务存在时序风险:如果 CacheServiceImpl 在 Vertx
初始化前被加载,定时任务将注册失败且无法恢复。添加 cleanupRegistered 标志防止
重复注册,Vertx 未就绪时跳过并等待下次调用。
2026-05-29 07:02:23 +08:00
yukaidi
5eed1fdfa0 revert: 回退 MyData.java 的构造函数修改,恢复为空 TODO
用户明确表示不需要改动 MyData 的 TODO,回退 741d7aa 对该文件的修改。
2026-05-29 06:58:41 +08:00
yukaidi
741d7aa8ca fix: implement MyData @DataObject constructor deserialization
Implement the MyData(JsonObject) constructor to deserialize `id` and
`maxSize` fields from the provided JsonObject, replacing the empty TODO.
2026-05-29 06:28:39 +08:00
yukaidi
7d5831b5f4 fix: 彻底消除用户枚举和异常信息泄露的遗留问题
- UserServiceImpl: 3处"用户不存在"统一改为"用户名或密码错误"/"认证失败"
- RouterHandlerFactory: failureHandler 中 ctx.failure().getMessage() 改为"服务器内部错误"
2026-05-29 05:53:40 +08:00
yukaidi
7ca63985bd fix(test): 删除空的 ParserApiClientLinkTest 文件
该文件仅包含空行,无实际测试代码,直接删除。
2026-05-29 04:06:21 +08:00
yukaidi
c4f94a2bc7 fix: replace printStackTrace/System.out.println with logger in JsHttpClient, PlaygroundApi, LogStatistics, CacheServiceImpl, JsPlaygroundExecutor, JsPlaygroundLogger 2026-05-29 03:48:11 +08:00
yukaidi
da715c8a8f fix: CacheManager 消除双括号初始化,改用标准 HashMap 写法 2026-05-29 02:55:32 +08:00
yukaidi
746c7ad5b3 fix: 替换 e.printStackTrace() 和 System.out.println 为 logger 调用
- HttpProxyVerticle: err.printStackTrace() / e.printStackTrace() -> LOGGER.error()
- RouterHandlerFactory: 5处 printStackTrace() -> LOGGER.error()
- CommonUtil: e.printStackTrace() -> LOGGER.error()
- ReflectionUtil: 新增 LOGGER,3处 printStackTrace() -> LOGGER.error()
- CreateDatabase: e.printStackTrace() -> LOGGER.error()
- URLUtil: 新增 LOGGER,e.printStackTrace() -> LOGGER.error()
- LzTool: e.printStackTrace() -> log.error()
- MkwTool: 3处 System.out.println + 1处 printStackTrace -> log.debug()/log.error()
- PdbTool: e.printStackTrace() -> log.error()
- ParserApi: t.printStackTrace() -> log.error()
- CacheManager: 2处 Throwable::printStackTrace -> LOGGER.error()
- QQTool: 3处 System.out.println -> log.debug()
- FjTool: System.out.println -> log.debug()
2026-05-29 02:50:06 +08:00
yukaidi
1dddec110e fix: 修复 PasswordUtil.checkPassword 中的时序攻击漏洞,使用 MessageDigest.isEqual() 2026-05-29 02:39:31 +08:00
yukaidi
46e9999e4c fix: 修复 CacheManager.updateTotalByField 中 getShareKeyTotal 缺少 onFailure 导致 Promise 永不完成 2026-05-29 02:39:05 +08:00
yukaidi
a664ae3a56 fix: 修复 ParserApi 中 redirectUrl() 和 viewUrl() 的 Promise 未 complete 问题 2026-05-29 02:38:27 +08:00
yukaidi
d323376bed 修复RateLimiter count++非原子操作:将volatile int改为AtomicInteger,使用incrementAndGet() 2026-05-29 02:25:07 +08:00
yukaidi
42925c857c 修复Playground密码时序攻击和堆栈泄露:使用MessageDigest.isEqual()比较密码,移除返回给客户端的完整堆栈信息 2026-05-29 02:22:52 +08:00
yukaidi
4159b884de 修复登录用户枚举和异常信息泄露:统一登录失败提示为'用户名或密码错误',隐藏数据库异常详情 2026-05-29 02:19:22 +08:00
yukaidi
36b38421e5 修复JWT签名验证时序攻击:使用MessageDigest.isEqual()替代String.equals()进行签名比较 2026-05-29 02:18:43 +08:00
yukaidi
b77c8a80e9 fix(web-service): ParserApi 中 CacheManager/ServerApi 改为 static 避免每次请求重复创建
CacheManager 和 ServerApi 无请求级状态,每次 new 会造成不必要的对象分配,
改为 static final 字段复用;同时修复 viewURL 中内联 new ServerApi()。
2026-05-29 02:14:32 +08:00
yukaidi
886dcd039f fix(web-service): DbServiceImpl Thread.sleep 改为 vertx.setTimer 避免阻塞 event loop
sayOk() 中使用 Thread.sleep(4000) 会阻塞 Vert.x event loop 线程,
改为 vertx.setTimer 异步延迟完成 promise。
2026-05-29 02:13:42 +08:00
yukaidi
9c3945f45a fix: 修复编译错误,core 模块不能依赖 web-service/parser/core-database
core 模块的 Deploy.java 和 PostExecVerticle.java 直接引用了上层模块的类,
导致编译失败(package does not exist)。

- Deploy.java: 移除对 JDBCPoolInit 和 JsParserExecutor 的显式调用,
  vertx.close() 会级联关闭 Vert.x 创建的资源
- PostExecVerticle.java: 移除缓存定时清理逻辑(不能引用 web-service 的 CacheManager)
- CacheManager: 添加 registerPeriodicCleanup() 静态方法,通过 VertxHolder 注册定时任务
- CacheServiceImpl: static 块中调用 CacheManager.registerPeriodicCleanup(),服务加载时自动注册
2026-05-29 01:08:15 +08:00
yukaidi
afe2046bc8 fix: RateLimiter 移除 synchronized 并添加 volatile,修复事件循环阻塞
审查发现 synchronized 在 Vert.x 事件循环中会严重阻塞并发。
ConcurrentHashMap 本身已线程安全,移除 synchronized 锁。
RequestInfo 字段添加 volatile 保证多线程内存可见性。
2026-05-28 23:42:40 +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
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 2026-04-22 16:10:22 +08:00
q
aaae301cbc release v3.0.0: core refactoring, new AppRun/PostExecVerticle, proxy and router improvements 2026-04-22 15:57:35 +08:00
rensumo
cbf2294a8e fix: randomAuth only returns encryptedAuth 2026-02-22 20:49:24 +08:00
rensumo
9d558bf4e2 fix: avoid NPE in randomAuth code check 2026-02-22 20:23:46 +08:00
q
fdf067c25e 更新 夸克解析、小飞机解析,前端版本号 2026-02-22 19:15:15 +08:00
rensumo
b150641e3b fix: stabilize auth/decrypt flow and refresh donate account counts 2026-02-22 16:06:22 +08:00
rensumo
6355c35452 fix: 修复捐赠账号失败计数与路由外部访问问题 2026-02-22 12:36:20 +08:00
rensumo
81ffbbd6b1 feat: harden donated-account failure token and document key usage 2026-02-22 12:24:47 +08:00
rensumo
07c650a474 feat: Add validation for donateAccount endpoint 2026-02-22 11:12:35 +08:00
rensumo
04443bcb5e feat: 添加捐赠账号功能,支持数据库存储和随机选择账号解析 2026-02-19 12:59:47 +08:00
q
3a25e5f2ae feat(v0.2.1): 添加认证参数支持和客户端下载命令生成
主要更新:
- 新增 auth 参数加密传递支持 (QK/UC Cookie认证)
- 实现下载命令自动生成 (curl/aria2c/迅雷)
- aria2c 命令支持 8 线程 8 片段下载
- 修复 cookie 字段映射问题
- 优化前端 clientLinks 页面
- 添加认证参数文档和测试用例
- 更新 .gitignore 忽略编译目录
2026-02-05 20:35:47 +08:00
qaiu
cb132359fd 启用在线脚本解析器 2026-01-06 02:21:19 +08:00
q
b58b3658b5 更新Playground和JsHttpClient相关功能,整理文档结构 2026-01-06 00:00:37 +08:00
q
047a8eab89 更新代码和文档 2026-01-03 21:11:04 +08:00
q
93ab3f3f3f Remove TypeScript-related code and documentation
- Remove TypeScript API endpoints from PlaygroundApi
- Remove TypeScript methods from DbService interface and implementation
- Delete PlaygroundTypeScriptCode model class
- Delete TypeScript documentation files
- Clean up unused imports
2026-01-02 19:27:21 +08:00
q
ce1c4ee669 Fix playground bugs and remove TypeScript compiler
- Fix BUG1: JavaScript timeout with proper thread interruption using ScheduledExecutorService
- Fix BUG2: Add URL regex validation before execution in playground test API
- Fix BUG3: Register published parsers to CustomParserRegistry on save/update/delete
- Remove TypeScript compiler functionality (tsCompiler.js, dependencies, UI)
- Add password authentication for playground access
- Add mobile responsive layout support
- Load playground parsers on application startup
2026-01-02 19:24:47 +08:00
copilot-swe-agent[bot]
3775cd0259 Address code review feedback: protect types.js endpoint and improve code readability
Co-authored-by: qaiu <29825328+qaiu@users.noreply.github.com>
2025-12-07 05:27:07 +00:00
copilot-swe-agent[bot]
bec342d778 Fix JsonResult API calls and add documentation
Co-authored-by: qaiu <29825328+qaiu@users.noreply.github.com>
2025-12-07 05:24:38 +00:00
copilot-swe-agent[bot]
6305d805dd Add playground loading animation, password auth, and mobile layout support
Co-authored-by: qaiu <29825328+qaiu@users.noreply.github.com>
2025-12-07 05:20:06 +00:00
copilot-swe-agent[bot]
57ef723368 Add TypeScript compiler integration - core implementation
Co-authored-by: qaiu <29825328+qaiu@users.noreply.github.com>
2025-12-07 04:43:36 +00:00
q
f82267f8a7 js演练场漏洞修复 2025-11-30 02:07:56 +08:00
q
e74d5ea97e js演练场 2025-11-29 03:41:51 +08:00
q
f87a66bc79 fixed. 123跨区下载错误 2025-11-28 19:48:19 +08:00
q
474eea5f80 - [汽水音乐-qishui_music](https://music.douyin.com/qishui/)
- [咪咕音乐-migu](https://music.migu.cn/)
- [一刻相册-baidu_photo](https://photo.baidu.com/)
2025-11-15 21:49:40 +08:00
q
3b63f48dfa ce盘优化 2025-11-13 19:32:44 +08:00