api: add /v1/health/ws for health bubbles on dashboard

This commit is contained in:
yusing
2025-01-19 04:34:20 +08:00
parent fe7740f1b0
commit 1adba05065
13 changed files with 89 additions and 23 deletions

View File

@@ -1,6 +1,7 @@
package config
import (
"context"
"os"
"strconv"
"strings"
@@ -146,6 +147,10 @@ func (cfg *Config) Task() *task.Task {
return cfg.task
}
func (cfg *Config) Context() context.Context {
return cfg.task.Context()
}
func (cfg *Config) Start() {
cfg.StartAutoCert()
cfg.StartProxyProviders()

View File

@@ -1,6 +1,8 @@
package types
import (
"context"
"github.com/yusing/go-proxy/internal/net/http/accesslog"
"github.com/yusing/go-proxy/internal/utils"
@@ -31,6 +33,7 @@ type (
Value() *Config
Reload() E.Error
Statistics() map[string]any
Context() context.Context
}
)