HTTP 探测改为填写网址,缺本机引擎时立刻失败

HTTP 模式不再单独填端口。完整网址沿用其中的协议、端口和路径;只写主机名或 IP 时按 http 和 80 端口。超时默认改为 5000 毫秒。本机找不到或启动不了 netquality-reflector 时直接说明原因,并建议改用远程节点,不再记成一次全部失败。

Co-authored-by: yanjiu0721 <yanjiu0721@users.noreply.github.com>
This commit is contained in:
Cursor Agentandyanjiu0721 committed 2026-11-22 07:56:16 +00:00
1 parent 846e40c023
commit 918ec8f190
20 files changed
+807 -131

No files matched your search

+10 -6
View File
@@ -34,11 +34,14 @@ class TargetEntry {
}
String get label {
final where = httpUrl.trim().isNotEmpty ? httpUrl.trim() : host.trim();
final methodText = profileId == 'http' && method.trim().isNotEmpty
? ' ${method.trim().toUpperCase()}'
: '';
return '$where:$port · $profileId$methodText';
if (profileId == 'http') {
final where = httpUrl.trim().isNotEmpty ? httpUrl.trim() : host.trim();
final methodText = method.trim().isNotEmpty
? ' ${method.trim().toUpperCase()}'
: '';
return '$where · HTTP$methodText';
}
return '${host.trim()}:$port · $profileId';
}
Map<String, Object?> toJson() => {
@@ -94,7 +97,8 @@ class TargetHistory {
TargetHistory clear() => empty;
String encode() => jsonEncode(entries.map((entry) => entry.toJson()).toList());
String encode() =>
jsonEncode(entries.map((entry) => entry.toJson()).toList());
factory TargetHistory.decode(String raw) {
if (raw.trim().isEmpty) {