用户代理通道超时关闭(暂时跳过认证)

This commit is contained in:
2025-03-06 18:08:57 +08:00
parent 2a50237af2
commit 791f20d2d7
4 changed files with 67 additions and 11 deletions

View File

@@ -21,6 +21,12 @@ type AuthContext struct {
}
func CheckIp(conn net.Conn) (*AuthContext, error) {
return &AuthContext{
Timeout: 0,
Payload: Payload{
1,
},
}, nil
// 获取用户地址
remoteAddr := conn.RemoteAddr().String()
@@ -74,6 +80,12 @@ func CheckIp(conn net.Conn) (*AuthContext, error) {
}
func CheckPass(conn net.Conn, username, password string) (*AuthContext, error) {
return &AuthContext{
Timeout: 0,
Payload: Payload{
1,
},
}, nil
// 查询通道配置
var channel models.Channel