用户代理通道超时关闭(暂时跳过认证)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user