优化连接效率

This commit is contained in:
2025-03-07 15:50:57 +08:00
parent 791f20d2d7
commit 053041ae34
13 changed files with 564 additions and 418 deletions

View File

@@ -40,7 +40,7 @@ func CheckIp(conn net.Conn) (*AuthContext, error) {
_, localPort, err := net.SplitHostPort(localAddr)
// 查询权限记录
slog.Info("用户 " + remoteHost + " 请求连接到 " + localPort)
slog.Debug("用户 " + remoteHost + " 请求连接到 " + localPort)
var channels []models.Channel
err = orm.DB.
Joins("INNER JOIN public.nodes n ON channels.node_id = n.id AND n.name = ?", localPort).