diag(client/macos): 抓 sing-box urltest 内核日志,定位探测为何失败
确认 urltest 为空是内核探测 100% 失败(传输/读取链路均正常)。本次注入 log.level=debug, StatsCollector 新增 Log 命令客户端,抓取内核日志里 urltest/gstatic 相关行(失败原因: DNS/连接/超时),塞进 stats 的 klog 字段经主 app 可读日志透出 —— 直接看到内核报错。 CURRENT_PROJECT_VERSION 51→52。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -67,9 +67,9 @@ final class StatsClient: NSObject {
|
||||
if self.diagTick % 5 == 0 {
|
||||
let urls = (obj["urltestResults"] as? [[String: Any]]) ?? []
|
||||
let pairs = urls.map { "\($0["tag"] ?? "?")=\($0["delayMs"] ?? -1)" }.joined(separator: ",")
|
||||
NSLog("[pangolin/stats] dl=%@ ul=%@ urltest[%d]=%@ diag=%@",
|
||||
NSLog("[pangolin/stats] dl=%@ ul=%@ urltest[%d]=%@ diag=%@ klog=%@",
|
||||
"\(obj["downloadSpeed"] ?? 0)", "\(obj["uploadSpeed"] ?? 0)", urls.count, pairs,
|
||||
"\(obj["diag"] ?? "-")")
|
||||
"\(obj["diag"] ?? "-")", "\(obj["klog"] ?? "-")")
|
||||
}
|
||||
self.emit(obj)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user