1、服务端、客户端认证逻辑调整.
2、解决端口映射被禁用时,客户端启动依然能访问的问题
This commit is contained in:
+3
-3
@@ -26,13 +26,13 @@ public class ProxyMessageAuthHandler implements ProxyMessageHandler {
|
||||
JSONObject data = JSONObject.parseObject(info);
|
||||
Integer code = data.getInteger("code");
|
||||
log.info("认证结果:{}", info);
|
||||
if (ExceptionEnum.CONNECT_FAILED.getCode().equals(code)) {
|
||||
context.channel().close();
|
||||
} else if (ExceptionEnum.AUTH_FAILED.getCode().equals(code)) {
|
||||
if (ExceptionEnum.AUTH_FAILED.getCode().equals(code)) {
|
||||
// 客户端认证失败,直接停止服务
|
||||
log.info("client auth failed , client stop.");
|
||||
context.channel().close();
|
||||
Solon.stop();
|
||||
} else {
|
||||
context.channel().close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user