修改域名匹配的一个Bug,并增大域名的缓存容量,节点状态上传连接数

This commit is contained in:
GoEdgeLab
2020-11-01 18:01:51 +08:00
parent ee3edece00
commit 6e2f5f976f
2 changed files with 3 additions and 2 deletions

View File

@@ -174,10 +174,10 @@ func (this *BaseListener) findNamedServer(name string) (serverConfig *serverconf
}
// 只记录N个记录防止内存耗尽
maxNamedServers := 10240
maxNamedServers := 100_0000
// 是否严格匹配域名
matchDomainStrictly := group.IsHTTPS() && sharedNodeConfig.GlobalConfig != nil && sharedNodeConfig.GlobalConfig.HTTPAll.MatchDomainStrictly
matchDomainStrictly := (group.IsHTTP() || group.IsHTTPS()) && sharedNodeConfig.GlobalConfig != nil && sharedNodeConfig.GlobalConfig.HTTPAll.MatchDomainStrictly
// 如果只有一个server则默认为这个
if countServers == 1 && !matchDomainStrictly {

View File

@@ -59,6 +59,7 @@ func (this *NodeStatusExecutor) update() {
status.Arch = runtime.GOARCH
status.ConfigVersion = sharedNodeConfig.Version
status.IsActive = true
status.ConnectionCount = sharedListenerManager.TotalActiveConnections()
hostname, _ := os.Hostname()
status.Hostname = hostname