mirror of
https://github.com/yhl452493373/frps-panel.git
synced 2026-04-04 06:16:59 +08:00
add full i18n support for server info page
This commit is contained in:
@@ -72,5 +72,22 @@
|
|||||||
"Last Close": "Last Close",
|
"Last Close": "Last Close",
|
||||||
"Network Traffic": "Network Traffic",
|
"Network Traffic": "Network Traffic",
|
||||||
"today": "today",
|
"today": "today",
|
||||||
"now": "now"
|
"now": "now",
|
||||||
|
"Version": "Version",
|
||||||
|
"Bind Port": "Bind Port",
|
||||||
|
"KCP Bind Port": "KCP Bind Port",
|
||||||
|
"QUIC Bind Port": "QUIC Bind Port",
|
||||||
|
"HTTP Port": "HTTP Port",
|
||||||
|
"HTTPS Port": "HTTPS Port",
|
||||||
|
"TCPMUX Port": "TCPMUX Port",
|
||||||
|
"Subdomain Host": "Subdomain Host",
|
||||||
|
"Max Pool Count": "Max Pool Count",
|
||||||
|
"Max Ports Per Client": "Max Ports Per Client",
|
||||||
|
"Heart Beat Timeout": "Heart Beat Timeout",
|
||||||
|
"Allow Ports": "Allow Ports",
|
||||||
|
"TLS Only": "TLS Only",
|
||||||
|
"Current Connections": "Current Connections",
|
||||||
|
"Client Counts": "Client Counts",
|
||||||
|
"Proxy Counts": "Proxy Counts",
|
||||||
|
"Not Set": "Not Set"
|
||||||
}
|
}
|
||||||
@@ -72,5 +72,22 @@
|
|||||||
"Last Close": "上次断开时间",
|
"Last Close": "上次断开时间",
|
||||||
"Network Traffic": "网络流量",
|
"Network Traffic": "网络流量",
|
||||||
"today": "今日",
|
"today": "今日",
|
||||||
"now": "当前"
|
"now": "当前",
|
||||||
|
"Version": "版本号",
|
||||||
|
"Bind Port": "TCP 端口",
|
||||||
|
"KCP Bind Port": "KCP 端口",
|
||||||
|
"QUIC Bind Port": "QUIC 端口",
|
||||||
|
"HTTP Port": "HTTP 端口",
|
||||||
|
"HTTPS Port": "HTTPS 端口",
|
||||||
|
"TCPMUX Port": "TCPMUX 端口",
|
||||||
|
"Subdomain Host": "二级域名后缀",
|
||||||
|
"Max Pool Count": "每个代理最大连接池大小",
|
||||||
|
"Max Ports Per Client": "单个客户端最大同时存在代理数",
|
||||||
|
"Heart Beat Timeout": "心跳连接超时时间",
|
||||||
|
"Allow Ports": "端口限制",
|
||||||
|
"TLS Only": "仅接受启用 TLS 的客户端",
|
||||||
|
"Current Connections": "当前连接数",
|
||||||
|
"Client Counts": "客户端总数",
|
||||||
|
"Proxy Counts": "代理总数",
|
||||||
|
"Not Set": "未配置"
|
||||||
}
|
}
|
||||||
@@ -114,8 +114,8 @@ var loadProxyInfo = (function ($) {
|
|||||||
var datum = res.data[i];
|
var datum = res.data[i];
|
||||||
var useEncryption = datum.conf.use_encryption;
|
var useEncryption = datum.conf.use_encryption;
|
||||||
var useCompression = datum.conf.use_compression;
|
var useCompression = datum.conf.use_compression;
|
||||||
datum.conf.use_encryption = i18n[useEncryption + ''];
|
datum.conf.use_encryption = i18n[useEncryption];
|
||||||
datum.conf.use_compression = i18n[useCompression + ''];
|
datum.conf.use_compression = i18n[useCompression];
|
||||||
console.log(datum)
|
console.log(datum)
|
||||||
var html = layui.laytpl(expandTrTemplateHtml).render({
|
var html = layui.laytpl(expandTrTemplateHtml).render({
|
||||||
index: i,
|
index: i,
|
||||||
|
|||||||
@@ -22,6 +22,18 @@ var loadServerInfo = (function ($) {
|
|||||||
for (var proxy in data.proxy_type_count) {
|
for (var proxy in data.proxy_type_count) {
|
||||||
data.proxy_counts = data.proxy_counts + data.proxy_type_count[proxy];
|
data.proxy_counts = data.proxy_counts + data.proxy_type_count[proxy];
|
||||||
}
|
}
|
||||||
|
data.bind_port = data.bind_port || i18n['Disable'];
|
||||||
|
data.kcp_bind_port = data.kcp_bind_port || i18n['Disable'];
|
||||||
|
data.quic_bind_port = data.quic_bind_port || i18n['Disable'];
|
||||||
|
data.vhost_http_port = data.vhost_http_port || i18n['Disable'];
|
||||||
|
data.vhost_https_port = data.vhost_https_port || i18n['Disable'];
|
||||||
|
data.tcpmux_httpconnect_port = data.tcpmux_httpconnect_port || i18n['Disable'];
|
||||||
|
data.subdomain_host = data.subdomain_host || i18n['NotSet'];
|
||||||
|
data.max_pool_count = data.max_pool_count || i18n['NotSet'];
|
||||||
|
data.max_ports_per_client = data.max_ports_per_client || i18n['NotLimit'];
|
||||||
|
data.heart_beat_timeout = data.heart_beat_timeout || i18n['NotSet'];
|
||||||
|
data.allow_ports_str = data.allow_ports_str || i18n['NotLimit'];
|
||||||
|
data.tls_only = i18n[data.tls_only || false];
|
||||||
renderServerInfo(data);
|
renderServerInfo(data);
|
||||||
} else {
|
} else {
|
||||||
layui.layer.msg(result.message);
|
layui.layer.msg(result.message);
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
<div class="version">
|
<div class="version">
|
||||||
<a href="https://github.com/fatedier/frp" target="_blank">Frp <span id="frpVersion"></span></a>
|
<a href="https://github.com/fatedier/frp" target="_blank">Frp <span id="frpVersion"></span></a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://github.com/yhl452493373/frps-panel" target="_blank">${ .FrpsPanel } v${ .version }</a>
|
<a href="https://github.com/yhl452493373/frps-panel" target="_blank">${ .FrpsPanel } ${ .version }</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-body" id="content"></div>
|
<div class="layui-body" id="content"></div>
|
||||||
@@ -82,67 +82,67 @@
|
|||||||
<section class="server-info">
|
<section class="server-info">
|
||||||
<div class="text-info">
|
<div class="text-info">
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
<div class="text-col">Version</div>
|
<div class="text-col">${ .Version }</div>
|
||||||
<div class="text-col">{{= d.version }}</div>
|
<div class="text-col">{{= d.version }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
<div class="text-col">BindPort</div>
|
<div class="text-col">${ .BindPort }</div>
|
||||||
<div class="text-col">{{= d.bind_port }}</div>
|
<div class="text-col">{{= d.bind_port }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
<div class="text-col">KCP Bind Port</div>
|
<div class="text-col">${ .KCPBindPort }</div>
|
||||||
<div class="text-col">{{= d.kcp_bind_port }}</div>
|
<div class="text-col">{{= d.kcp_bind_port }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
<div class="text-col">QUIC Bind Port</div>
|
<div class="text-col">${ .QUICBindPort }</div>
|
||||||
<div class="text-col">{{= d.quic_bind_port }}</div>
|
<div class="text-col">{{= d.quic_bind_port }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
<div class="text-col">Http Port</div>
|
<div class="text-col">${ .HTTPPort }</div>
|
||||||
<div class="text-col">{{= d.vhost_http_port }}</div>
|
<div class="text-col">{{= d.vhost_http_port }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
<div class="text-col">Https Port</div>
|
<div class="text-col">${ .HTTPSPort }</div>
|
||||||
<div class="text-col">{{= d.vhost_https_port }}</div>
|
<div class="text-col">{{= d.vhost_https_port }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
<div class="text-col">TCPMUX Port</div>
|
<div class="text-col">${ .TCPMUXPort }</div>
|
||||||
<div class="text-col">{{= d.tcpmux_httpconnect_port }}</div>
|
<div class="text-col">{{= d.tcpmux_httpconnect_port }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
<div class="text-col">Subdomain Host</div>
|
<div class="text-col">${ .SubdomainHost }</div>
|
||||||
<div class="text-col">{{= d.subdomain_host }}</div>
|
<div class="text-col">{{= d.subdomain_host }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
<div class="text-col">Max PoolCount</div>
|
<div class="text-col">${ .MaxPoolCount }</div>
|
||||||
<div class="text-col">{{= d.max_pool_count }}</div>
|
<div class="text-col">{{= d.max_pool_count }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
<div class="text-col">Max Ports Per Client</div>
|
<div class="text-col">${ .MaxPortsPerClient }</div>
|
||||||
<div class="text-col">{{= d.max_ports_per_client }}</div>
|
<div class="text-col">{{= d.max_ports_per_client }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
<div class="text-col">HeartBeat Timeout</div>
|
<div class="text-col">${ .HeartBeatTimeout }</div>
|
||||||
<div class="text-col">{{= d.heart_beat_timeout }}</div>
|
<div class="text-col">{{= d.heart_beat_timeout }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
<div class="text-col">Allow Ports</div>
|
<div class="text-col">${ .AllowPorts }</div>
|
||||||
<div class="text-col">{{= d.allow_ports_str || 'Not limit' }}</div>
|
<div class="text-col">{{= d.allow_ports_str }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
<div class="text-col">TLS Only</div>
|
<div class="text-col">${ .TLSOnly }</div>
|
||||||
<div class="text-col">{{= d.tls_only || 'No' }}</div>
|
<div class="text-col">{{= d.tls_only }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
<div class="text-col">Current Connections</div>
|
<div class="text-col">${ .CurrentConnections }</div>
|
||||||
<div class="text-col">{{= d.cur_conns }}</div>
|
<div class="text-col">{{= d.cur_conns }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
<div class="text-col">Client Counts</div>
|
<div class="text-col">${ .ClientCounts }</div>
|
||||||
<div class="text-col">{{= d.client_counts }}</div>
|
<div class="text-col">{{= d.client_counts }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
<div class="text-col">Proxy Counts</div>
|
<div class="text-col">${ .ProxyCounts }</div>
|
||||||
<div class="text-col">{{= d.proxy_counts }}</div>
|
<div class="text-col">{{= d.proxy_counts }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ plugin_port = 7200
|
|||||||
admin_user = admin
|
admin_user = admin
|
||||||
admin_pwd = admin
|
admin_pwd = admin
|
||||||
; frp dashboard info
|
; frp dashboard info
|
||||||
dashboard_addr = frp.yanghuanglin.com
|
dashboard_addr = 127.0.0.1
|
||||||
dashboard_port = 7500
|
dashboard_port = 7500
|
||||||
dashboard_user = admin
|
dashboard_user = admin
|
||||||
dashboard_pwd = 19910621
|
dashboard_pwd = admin
|
||||||
|
|
||||||
; user tokens
|
; user tokens
|
||||||
[users]
|
[users]
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ func (c *HandleController) MakeHandlerFunc() gin.HandlerFunc {
|
|||||||
func (c *HandleController) MakeManagerFunc() func(context *gin.Context) {
|
func (c *HandleController) MakeManagerFunc() func(context *gin.Context) {
|
||||||
return func(context *gin.Context) {
|
return func(context *gin.Context) {
|
||||||
context.HTML(http.StatusOK, "index.html", gin.H{
|
context.HTML(http.StatusOK, "index.html", gin.H{
|
||||||
|
"version": c.Version,
|
||||||
"FrpsPanel": ginI18n.MustGetMessage(context, "Frps Panel"),
|
"FrpsPanel": ginI18n.MustGetMessage(context, "Frps Panel"),
|
||||||
"User": ginI18n.MustGetMessage(context, "User"),
|
"User": ginI18n.MustGetMessage(context, "User"),
|
||||||
"Token": ginI18n.MustGetMessage(context, "Token"),
|
"Token": ginI18n.MustGetMessage(context, "Token"),
|
||||||
@@ -215,7 +216,22 @@ func (c *HandleController) MakeManagerFunc() func(context *gin.Context) {
|
|||||||
"Addr": ginI18n.MustGetMessage(context, "Addr"),
|
"Addr": ginI18n.MustGetMessage(context, "Addr"),
|
||||||
"LastStart": ginI18n.MustGetMessage(context, "Last Start"),
|
"LastStart": ginI18n.MustGetMessage(context, "Last Start"),
|
||||||
"LastClose": ginI18n.MustGetMessage(context, "Last Close"),
|
"LastClose": ginI18n.MustGetMessage(context, "Last Close"),
|
||||||
"version": c.Version,
|
"Version": ginI18n.MustGetMessage(context, "Version"),
|
||||||
|
"BindPort": ginI18n.MustGetMessage(context, "Bind Port"),
|
||||||
|
"KCPBindPort": ginI18n.MustGetMessage(context, "KCP Bind Port"),
|
||||||
|
"QUICBindPort": ginI18n.MustGetMessage(context, "QUIC Bind Port"),
|
||||||
|
"HTTPPort": ginI18n.MustGetMessage(context, "HTTP Port"),
|
||||||
|
"HTTPSPort": ginI18n.MustGetMessage(context, "HTTPS Port"),
|
||||||
|
"TCPMUXPort": ginI18n.MustGetMessage(context, "TCPMUX Port"),
|
||||||
|
"SubdomainHost": ginI18n.MustGetMessage(context, "Subdomain Host"),
|
||||||
|
"MaxPoolCount": ginI18n.MustGetMessage(context, "Max Pool Count"),
|
||||||
|
"MaxPortsPerClient": ginI18n.MustGetMessage(context, "Max Ports Per Client"),
|
||||||
|
"HeartBeatTimeout": ginI18n.MustGetMessage(context, "Heart Beat Timeout"),
|
||||||
|
"AllowPorts": ginI18n.MustGetMessage(context, "Allow Ports"),
|
||||||
|
"TLSOnly": ginI18n.MustGetMessage(context, "TLS Only"),
|
||||||
|
"CurrentConnections": ginI18n.MustGetMessage(context, "Current Connections"),
|
||||||
|
"ClientCounts": ginI18n.MustGetMessage(context, "Client Counts"),
|
||||||
|
"ProxyCounts": ginI18n.MustGetMessage(context, "Proxy Counts"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -248,6 +264,7 @@ func (c *HandleController) MakeLangFunc() func(context *gin.Context) {
|
|||||||
"ShouldCheckUser": ginI18n.MustGetMessage(context, "Please check at least one user"),
|
"ShouldCheckUser": ginI18n.MustGetMessage(context, "Please check at least one user"),
|
||||||
"OperationConfirm": ginI18n.MustGetMessage(context, "Operation confirm"),
|
"OperationConfirm": ginI18n.MustGetMessage(context, "Operation confirm"),
|
||||||
"EmptyData": ginI18n.MustGetMessage(context, "Empty data"),
|
"EmptyData": ginI18n.MustGetMessage(context, "Empty data"),
|
||||||
|
"NotLimit": ginI18n.MustGetMessage(context, "Not limit"),
|
||||||
"AllowedPorts": ginI18n.MustGetMessage(context, "Allowed ports"),
|
"AllowedPorts": ginI18n.MustGetMessage(context, "Allowed ports"),
|
||||||
"AllowedDomains": ginI18n.MustGetMessage(context, "Allowed domains"),
|
"AllowedDomains": ginI18n.MustGetMessage(context, "Allowed domains"),
|
||||||
"AllowedSubdomains": ginI18n.MustGetMessage(context, "Allowed subdomains"),
|
"AllowedSubdomains": ginI18n.MustGetMessage(context, "Allowed subdomains"),
|
||||||
@@ -271,6 +288,7 @@ func (c *HandleController) MakeLangFunc() func(context *gin.Context) {
|
|||||||
"today": ginI18n.MustGetMessage(context, "today"),
|
"today": ginI18n.MustGetMessage(context, "today"),
|
||||||
"now": ginI18n.MustGetMessage(context, "now"),
|
"now": ginI18n.MustGetMessage(context, "now"),
|
||||||
"Proxies": ginI18n.MustGetMessage(context, "Proxies"),
|
"Proxies": ginI18n.MustGetMessage(context, "Proxies"),
|
||||||
|
"NotSet": ginI18n.MustGetMessage(context, "Not Set"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user