feat(api): add endpoint to retrieve all proxies

This commit is contained in:
2025-12-25 22:18:38 +08:00
parent a76ba823ee
commit 2d63296576
3 changed files with 30 additions and 3 deletions
+4 -2
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
}
+1 -1
View File
@@ -14,7 +14,7 @@
package version
var version = "0.66.0"
var version = "LoliaFRP 0.66.0"
func Full() string {
return version