Add certificate store

This commit is contained in:
世界
2025-01-08 10:34:45 +08:00
parent 90ec9c8bcb
commit 17576e9f66
30 changed files with 4786 additions and 32 deletions

View File

@@ -72,9 +72,9 @@ func proxyInfo(server *Server, detour adapter.Outbound) *badjson.JSONObject {
info.Put("udp", common.Contains(detour.Network(), N.NetworkUDP))
delayHistory := server.urlTestHistory.LoadURLTestHistory(adapter.OutboundTag(detour))
if delayHistory != nil {
info.Put("history", []*urltest.History{delayHistory})
info.Put("history", []*adapter.URLTestHistory{delayHistory})
} else {
info.Put("history", []*urltest.History{})
info.Put("history", []*adapter.URLTestHistory{})
}
if group, isGroup := detour.(adapter.OutboundGroup); isGroup {
info.Put("now", group.Now())
@@ -116,7 +116,7 @@ func getProxies(server *Server) func(w http.ResponseWriter, r *http.Request) {
"type": "Fallback",
"name": "GLOBAL",
"udp": true,
"history": []*urltest.History{},
"history": []*adapter.URLTestHistory{},
"all": allProxies,
"now": defaultTag,
})
@@ -208,7 +208,7 @@ func getProxyDelay(server *Server) func(w http.ResponseWriter, r *http.Request)
if err != nil {
server.urlTestHistory.DeleteURLTestHistory(realTag)
} else {
server.urlTestHistory.StoreURLTestHistory(realTag, &urltest.History{
server.urlTestHistory.StoreURLTestHistory(realTag, &adapter.URLTestHistory{
Time: time.Now(),
Delay: delay,
})