mirror of
https://gitee.com/IrisVega/frp.git
synced 2024-11-01 22:31:29 +08:00
dashbaord_api: more info
This commit is contained in:
parent
76b04f52d1
commit
96b94d9164
@ -36,13 +36,17 @@ type GeneralResponse struct {
|
|||||||
type ServerInfoResp struct {
|
type ServerInfoResp struct {
|
||||||
GeneralResponse
|
GeneralResponse
|
||||||
|
|
||||||
Version string `json:"version"`
|
Version string `json:"version"`
|
||||||
VhostHttpPort int `json:"vhost_http_port"`
|
BindPort int `json:"bind_port"`
|
||||||
VhostHttpsPort int `json:"vhost_https_port"`
|
BindUdpPort int `json:"bind_udp_port"`
|
||||||
AuthTimeout int64 `json:"auth_timeout"`
|
VhostHttpPort int `json:"vhost_http_port"`
|
||||||
SubdomainHost string `json:"subdomain_host"`
|
VhostHttpsPort int `json:"vhost_https_port"`
|
||||||
MaxPoolCount int64 `json:"max_pool_count"`
|
KcpBindPort int `json:"kcp_bind_port"`
|
||||||
HeartBeatTimeout int64 `json:"heart_beat_timeout"`
|
AuthTimeout int64 `json:"auth_timeout"`
|
||||||
|
SubdomainHost string `json:"subdomain_host"`
|
||||||
|
MaxPoolCount int64 `json:"max_pool_count"`
|
||||||
|
MaxPortsPerClient int64 `json:"max_ports_per_client"`
|
||||||
|
HeartBeatTimeout int64 `json:"heart_beat_timeout"`
|
||||||
|
|
||||||
TotalTrafficIn int64 `json:"total_traffic_in"`
|
TotalTrafficIn int64 `json:"total_traffic_in"`
|
||||||
TotalTrafficOut int64 `json:"total_traffic_out"`
|
TotalTrafficOut int64 `json:"total_traffic_out"`
|
||||||
@ -64,13 +68,17 @@ func apiServerInfo(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
|
|||||||
cfg := &g.GlbServerCfg.ServerCommonConf
|
cfg := &g.GlbServerCfg.ServerCommonConf
|
||||||
serverStats := StatsGetServer()
|
serverStats := StatsGetServer()
|
||||||
res = ServerInfoResp{
|
res = ServerInfoResp{
|
||||||
Version: version.Full(),
|
Version: version.Full(),
|
||||||
VhostHttpPort: cfg.VhostHttpPort,
|
BindPort: cfg.BindPort,
|
||||||
VhostHttpsPort: cfg.VhostHttpsPort,
|
BindUdpPort: cfg.BindUdpPort,
|
||||||
AuthTimeout: cfg.AuthTimeout,
|
VhostHttpPort: cfg.VhostHttpPort,
|
||||||
SubdomainHost: cfg.SubDomainHost,
|
VhostHttpsPort: cfg.VhostHttpsPort,
|
||||||
MaxPoolCount: cfg.MaxPoolCount,
|
KcpBindPort: cfg.KcpBindPort,
|
||||||
HeartBeatTimeout: cfg.HeartBeatTimeout,
|
AuthTimeout: cfg.AuthTimeout,
|
||||||
|
SubdomainHost: cfg.SubDomainHost,
|
||||||
|
MaxPoolCount: cfg.MaxPoolCount,
|
||||||
|
MaxPortsPerClient: cfg.MaxPortsPerClient,
|
||||||
|
HeartBeatTimeout: cfg.HeartBeatTimeout,
|
||||||
|
|
||||||
TotalTrafficIn: serverStats.TotalTrafficIn,
|
TotalTrafficIn: serverStats.TotalTrafficIn,
|
||||||
TotalTrafficOut: serverStats.TotalTrafficOut,
|
TotalTrafficOut: serverStats.TotalTrafficOut,
|
||||||
|
Loading…
Reference in New Issue
Block a user