Fix group status updates broken by API service

The URL test history update hook and the Clash mode update hook were
single-slot: the API service's attached service overwrote the hook set
by the daemon, so clients stopped receiving group updates. Replace both
with multicast hook lists.

Also share a single URL test history storage via context: Clash API
looked it up under a key nobody registered and fell back to its own
empty storage, so dashboards showed no delay once an API service was
configured. Selector changes now notify through the shared storage,
covering selections made from any API surface.
This commit is contained in:
世界
2026-06-13 09:30:11 +08:00
parent 6a351d3366
commit f0f2617b79
9 changed files with 49 additions and 52 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ type Instance struct {
trafficManager *trafficcontrol.Manager
cacheFile adapter.CacheFile
pauseManager pause.Manager
urlTestHistoryStorage adapter.URLTestHistoryStorage
urlTestHistoryStorage *urltest.HistoryStorage
outboundManager adapter.OutboundManager
endpointManager adapter.EndpointManager
logFactory log.Factory