feat: update core, support alive api
This commit is contained in:
parent
b28af782bb
commit
4ab50589cf
@ -97,6 +97,7 @@ class ClashProxy: Codable {
|
||||
let all: [ClashProxyName]?
|
||||
let history: [ClashProxySpeedHistory]
|
||||
let now: ClashProxyName?
|
||||
let alive: Bool?
|
||||
weak var enclosingResp: ClashProxyResp?
|
||||
weak var enclosingProvider: ClashProvider?
|
||||
|
||||
@ -130,7 +131,7 @@ class ClashProxy: Codable {
|
||||
}()
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case type, all, history, now, name
|
||||
case type, all, history, now, name, alive
|
||||
}
|
||||
|
||||
lazy var maxProxyNameLength: CGFloat = {
|
||||
|
@ -71,7 +71,11 @@ class ProxyMenuItem: NSMenuItem {
|
||||
assertionFailure()
|
||||
return
|
||||
}
|
||||
updateDelay(info.history.last?.delayDisplay, rawValue: info.history.last?.delay)
|
||||
if info.alive == false {
|
||||
updateDelay(NSLocalizedString("fail", comment: ""), rawValue: 0)
|
||||
} else {
|
||||
updateDelay(info.history.last?.delayDisplay, rawValue: info.history.last?.delay)
|
||||
}
|
||||
}
|
||||
|
||||
@objc private func proxyGroupInfoUpdate(note: Notification) {
|
||||
|
@ -3,7 +3,7 @@ module github.com/yichengchen/clashX/ClashX
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/Dreamacro/clash v1.16.1-0.20230613154448-18c666a1abb7
|
||||
github.com/Dreamacro/clash v1.16.1-0.20230616131910-31fe77ee694d
|
||||
github.com/oschwald/geoip2-golang v1.8.0
|
||||
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
|
||||
)
|
||||
|
@ -1,5 +1,5 @@
|
||||
github.com/Dreamacro/clash v1.16.1-0.20230613154448-18c666a1abb7 h1:9m9KShVQEdmLq/B6vFPNRtW6Sn8caomJi0WrNnrW2uk=
|
||||
github.com/Dreamacro/clash v1.16.1-0.20230613154448-18c666a1abb7/go.mod h1:ZM3UI2gqqUN7UL7L/F9aTHODTByya6sbC/WivQpaoJk=
|
||||
github.com/Dreamacro/clash v1.16.1-0.20230616131910-31fe77ee694d h1:1rdUID6QQmLq0sHdrNU8MId9wE5FzYr1I5oZqQ61dmE=
|
||||
github.com/Dreamacro/clash v1.16.1-0.20230616131910-31fe77ee694d/go.mod h1:ZM3UI2gqqUN7UL7L/F9aTHODTByya6sbC/WivQpaoJk=
|
||||
github.com/Dreamacro/protobytes v0.0.0-20230324064118-87bc784139cd h1:ygk7IF14j4ep4H2ZyeDe3IEoMZF8JdbX851RVVa/4D8=
|
||||
github.com/Dreamacro/protobytes v0.0.0-20230324064118-87bc784139cd/go.mod h1:QvmEZ/h6KXszPOr2wUFl7Zn3hfFNYdfbXwPVDTyZs6k=
|
||||
github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=
|
||||
|
Loading…
Reference in New Issue
Block a user