feat(api): add endpoint to retrieve all proxies

This commit is contained in:
2025-10-20 20:36:42 +08:00
parent a76ba823ee
commit 2d63296576
3 changed files with 30 additions and 3 deletions

View File

@@ -206,8 +206,9 @@ func (m *serverMetrics) GetProxiesByType(proxyType string) []*ProxyStats {
m.mu.Lock()
defer m.mu.Unlock()
filterAll := proxyType == "" || proxyType == "all"
for name, proxyStats := range m.info.ProxyStatistics {
if proxyStats.ProxyType != proxyType {
if !filterAll && proxyStats.ProxyType != proxyType {
continue
}
@@ -233,8 +234,9 @@ func (m *serverMetrics) GetProxiesByTypeAndName(proxyType string, proxyName stri
m.mu.Lock()
defer m.mu.Unlock()
filterAll := proxyType == "" || proxyType == "all"
for name, proxyStats := range m.info.ProxyStatistics {
if proxyStats.ProxyType != proxyType {
if !filterAll && proxyStats.ProxyType != proxyType {
continue
}

View File

@@ -14,7 +14,7 @@
package version
var version = "0.66.0"
var version = "LoliaFRP 0.66.0"
func Full() string {
return version