feat: 保存节点调试进度
This commit is contained in:
@@ -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?;
|
||||
|
||||
Reference in New Issue
Block a user