mirror of
https://github.com/fatedier/frp.git
synced 2026-01-11 22:23:12 +00:00
frps dashboard add stcp
This commit is contained in:
@@ -60,6 +60,12 @@ function DrawProxyChart(elementId, serverInfo) {
|
||||
if (serverInfo.proxy_type_count.https == null) {
|
||||
serverInfo.proxy_type_count.https = 0
|
||||
}
|
||||
if (serverInfo.proxy_type_count.stcp == null) {
|
||||
serverInfo.proxy_type_count.stcp = 0
|
||||
}
|
||||
if (serverInfo.proxy_type_count.xtcp == null) {
|
||||
serverInfo.proxy_type_count.xtcp = 0
|
||||
}
|
||||
let myChart = echarts.init(document.getElementById(elementId), 'macarons')
|
||||
myChart.showLoading()
|
||||
|
||||
@@ -91,6 +97,12 @@ function DrawProxyChart(elementId, serverInfo) {
|
||||
}, {
|
||||
value: serverInfo.proxy_type_count.https,
|
||||
name: 'HTTPS'
|
||||
}, {
|
||||
value: serverInfo.proxy_type_count.stcp,
|
||||
name: 'STCP'
|
||||
}, {
|
||||
value: serverInfo.proxy_type_count.xtcp,
|
||||
name: 'XTCP'
|
||||
}],
|
||||
itemStyle: {
|
||||
emphasis: {
|
||||
|
||||
@@ -22,7 +22,7 @@ class TcpProxy extends BaseProxy {
|
||||
super(proxyStats)
|
||||
this.type = "tcp"
|
||||
if (proxyStats.conf != null) {
|
||||
this.addr = proxyStats.conf.bind_addr + ":" + proxyStats.conf.remote_port
|
||||
this.addr = ":" + proxyStats.conf.remote_port
|
||||
this.port = proxyStats.conf.remote_port
|
||||
} else {
|
||||
this.addr = ""
|
||||
@@ -36,7 +36,7 @@ class UdpProxy extends BaseProxy {
|
||||
super(proxyStats)
|
||||
this.type = "udp"
|
||||
if (proxyStats.conf != null) {
|
||||
this.addr = proxyStats.conf.bind_addr + ":" + proxyStats.conf.remote_port
|
||||
this.addr = ":" + proxyStats.conf.remote_port
|
||||
this.port = proxyStats.conf.remote_port
|
||||
} else {
|
||||
this.addr = ""
|
||||
@@ -87,4 +87,11 @@ class HttpsProxy extends BaseProxy {
|
||||
}
|
||||
}
|
||||
|
||||
export {BaseProxy, TcpProxy, UdpProxy, HttpProxy, HttpsProxy}
|
||||
class StcpProxy extends BaseProxy {
|
||||
constructor(proxyStats) {
|
||||
super(proxyStats)
|
||||
this.type = "stcp"
|
||||
}
|
||||
}
|
||||
|
||||
export {BaseProxy, TcpProxy, UdpProxy, HttpProxy, HttpsProxy, StcpProxy}
|
||||
|
||||
Reference in New Issue
Block a user