feat: ed2k protocol support (#1316)

This commit is contained in:
Levi authored and GitHub committed 2026-03-17 19:42:16 +08:00
1 parent f7b26753c1
commit 09f7c88ed3
35 files changed
+1129 -35

No files matched your search

@@ -31,6 +31,7 @@ class DownloaderConfig {
class ProtocolConfig {
HttpConfig http = HttpConfig();
BtConfig bt = BtConfig();
Ed2kConfig ed2k = Ed2kConfig();
ProtocolConfig();
@@ -80,6 +81,28 @@ class BtConfig {
Map<String, dynamic> toJson() => _$BtConfigToJson(this);
}
@JsonSerializable()
class Ed2kConfig {
int listenPort;
int udpPort;
String serverAddr;
String serverMet;
String nodesDat;
Ed2kConfig({
this.listenPort = 0,
this.udpPort = 0,
this.serverAddr = '',
this.serverMet = '',
this.nodesDat = '',
});
factory Ed2kConfig.fromJson(Map<String, dynamic> json) =>
_$Ed2kConfigFromJson(json);
Map<String, dynamic> toJson() => _$Ed2kConfigToJson(this);
}
@JsonSerializable(explicitToJson: true)
class ExtraConfig {
String themeMode;