mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2025-12-16 12:23:03 +00:00
feat: 新增客户端协议生成系统,支持8种主流下载工具
🚀 核心功能 - 新增完整的客户端下载链接生成器系统 - 支持ARIA2、Motrix、比特彗星、迅雷、wget、cURL、IDM、FDM、PowerShell等8种客户端 - 自动处理防盗链参数(User-Agent、Referer、Cookie等) - 提供可扩展的生成器架构,支持自定义客户端 🔧 技术实现 - ClientLinkGeneratorFactory: 工厂模式管理生成器 - DownloadLinkMeta: 元数据存储下载信息 - ClientLinkUtils: 便捷工具类 - 线程安全的ConcurrentHashMap设计 🌐 前端集成 - 新增ClientLinks.vue界面,支持客户端链接展示 - Element Plus图标系统,混合图标显示 - 客户端检测逻辑优化,避免自动打开外部应用 - 移动端和PC端环境判断 📚 文档完善 - 完整的CLIENT_LINK_GENERATOR_GUIDE.md使用指南 - API文档和测试用例 - 输出示例和最佳实践 从单纯的网盘解析工具升级为完整的下载解决方案生态
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
package cn.qaiu.vx.core.verticle.conf;
|
||||
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.core.json.JsonArray;
|
||||
import io.vertx.core.json.impl.JsonUtil;
|
||||
import java.time.Instant;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Base64;
|
||||
|
||||
/**
|
||||
* Converter and mapper for {@link cn.qaiu.vx.core.verticle.conf.HttpProxyConf}.
|
||||
* NOTE: This class has been automatically generated from the {@link cn.qaiu.vx.core.verticle.conf.HttpProxyConf} original class using Vert.x codegen.
|
||||
*/
|
||||
public class HttpProxyConfConverter {
|
||||
|
||||
|
||||
private static final Base64.Decoder BASE64_DECODER = JsonUtil.BASE64_DECODER;
|
||||
private static final Base64.Encoder BASE64_ENCODER = JsonUtil.BASE64_ENCODER;
|
||||
|
||||
static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, HttpProxyConf obj) {
|
||||
for (java.util.Map.Entry<String, Object> member : json) {
|
||||
switch (member.getKey()) {
|
||||
case "password":
|
||||
if (member.getValue() instanceof String) {
|
||||
obj.setPassword((String)member.getValue());
|
||||
}
|
||||
break;
|
||||
case "port":
|
||||
if (member.getValue() instanceof Number) {
|
||||
obj.setPort(((Number)member.getValue()).intValue());
|
||||
}
|
||||
break;
|
||||
case "preProxyOptions":
|
||||
if (member.getValue() instanceof JsonObject) {
|
||||
obj.setPreProxyOptions(new io.vertx.core.net.ProxyOptions((io.vertx.core.json.JsonObject)member.getValue()));
|
||||
}
|
||||
break;
|
||||
case "timeout":
|
||||
if (member.getValue() instanceof Number) {
|
||||
obj.setTimeout(((Number)member.getValue()).intValue());
|
||||
}
|
||||
break;
|
||||
case "username":
|
||||
if (member.getValue() instanceof String) {
|
||||
obj.setUsername((String)member.getValue());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void toJson(HttpProxyConf obj, JsonObject json) {
|
||||
toJson(obj, json.getMap());
|
||||
}
|
||||
|
||||
static void toJson(HttpProxyConf obj, java.util.Map<String, Object> json) {
|
||||
if (obj.getPassword() != null) {
|
||||
json.put("password", obj.getPassword());
|
||||
}
|
||||
if (obj.getPort() != null) {
|
||||
json.put("port", obj.getPort());
|
||||
}
|
||||
if (obj.getPreProxyOptions() != null) {
|
||||
json.put("preProxyOptions", obj.getPreProxyOptions().toJson());
|
||||
}
|
||||
if (obj.getTimeout() != null) {
|
||||
json.put("timeout", obj.getTimeout());
|
||||
}
|
||||
if (obj.getUsername() != null) {
|
||||
json.put("username", obj.getUsername());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user