frps dashboard add stcp

This commit is contained in:
fatedier
2018-05-20 19:06:05 +08:00
parent e1918f6396
commit 6eb8146334
43 changed files with 5115 additions and 3248 deletions

View File

@@ -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: {

View File

@@ -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}