mirror of
https://gitee.com/IrisVega/frp.git
synced 2024-11-01 22:31:29 +08:00
commit
6d81e4c8c6
@ -1,6 +1,6 @@
|
|||||||
# frp
|
# frp
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/fatedier/frp.svg)](https://travis-ci.org/fatedier/frp)
|
[![Build Status](https://travis-ci.org/fatedier/frp.svg?branch=master)](https://travis-ci.org/fatedier/frp)
|
||||||
|
|
||||||
[README](README.md) | [中文文档](README_zh.md)
|
[README](README.md) | [中文文档](README_zh.md)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# frp
|
# frp
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/fatedier/frp.svg)](https://travis-ci.org/fatedier/frp)
|
[![Build Status](https://travis-ci.org/fatedier/frp.svg?branch=master)](https://travis-ci.org/fatedier/frp)
|
||||||
|
|
||||||
[README](README.md) | [中文文档](README_zh.md)
|
[README](README.md) | [中文文档](README_zh.md)
|
||||||
|
|
||||||
|
@ -32,9 +32,14 @@ type ServerStatistics struct {
|
|||||||
TotalTrafficOut metric.DateCounter
|
TotalTrafficOut metric.DateCounter
|
||||||
CurConns metric.Counter
|
CurConns metric.Counter
|
||||||
|
|
||||||
|
// counter for clients
|
||||||
ClientCounts metric.Counter
|
ClientCounts metric.Counter
|
||||||
|
|
||||||
|
// counter for proxy types
|
||||||
ProxyTypeCounts map[string]metric.Counter
|
ProxyTypeCounts map[string]metric.Counter
|
||||||
|
|
||||||
|
// statistics for different proxies
|
||||||
|
// key is proxy name
|
||||||
ProxyStatistics map[string]*ProxyStatistics
|
ProxyStatistics map[string]*ProxyStatistics
|
||||||
|
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
@ -84,7 +89,7 @@ func StatsNewProxy(name string, proxyType string) {
|
|||||||
globalStats.ProxyTypeCounts[proxyType] = counter
|
globalStats.ProxyTypeCounts[proxyType] = counter
|
||||||
|
|
||||||
proxyStats, ok := globalStats.ProxyStatistics[name]
|
proxyStats, ok := globalStats.ProxyStatistics[name]
|
||||||
if !ok {
|
if !(ok && proxyStats.ProxyType == proxyType) {
|
||||||
proxyStats = &ProxyStatistics{
|
proxyStats = &ProxyStatistics{
|
||||||
ProxyType: proxyType,
|
ProxyType: proxyType,
|
||||||
CurConns: metric.NewCounter(),
|
CurConns: metric.NewCounter(),
|
||||||
|
@ -111,6 +111,7 @@ func NewService() (svr *Service, err error) {
|
|||||||
err = fmt.Errorf("Create dashboard web server error, %v", err)
|
err = fmt.Errorf("Create dashboard web server error, %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
log.Info("Dashboard listen on %s:%d", config.ServerCommonCfg.BindAddr, config.ServerCommonCfg.DashboardPort)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user