feat: 保存节点调试进度
Build Windows / 编译 libcore (Windows) (20.15.1) (push) Successful in 20m7s
Build Windows / build (push) Has been cancelled

This commit is contained in:
2025-11-13 22:43:27 -08:00
parent 46295f4543
commit 670eb7ebc9
4 changed files with 209 additions and 170 deletions
+8 -2
View File
@@ -28,11 +28,12 @@ class KROutboundItem {
/// URL
String url = "";
// ✅ 1. 将传入的 nodeListItem 保存为类的 final 成员变量
final KrNodeListItem nodeListItem;
/// 服务器类型
/// 构造函数,接受 KrItem 对象并初始化 KROutboundItem
KROutboundItem(KrNodeListItem nodeListItem) {
KROutboundItem(this.nodeListItem) {
id = nodeListItem.id.toString();
protocol = nodeListItem.protocol;
latitude = nodeListItem.latitude;
@@ -211,6 +212,11 @@ class KROutboundItem {
// 解析配置
}
@override
String toString() {
// 现在它可以正确地访问已保存的 nodeListItem 成员
return 'KROutboundItem(name: ${nodeListItem.name}, protocol: ${nodeListItem.protocol}, server: ${nodeListItem.serverAddr}, port: ${nodeListItem.port})';
}
/// 构建传输配置
Map<String, dynamic> _buildTransport(Map<String, dynamic> json) {
final transportType = json["transport"] as String?;