同步平台业务模块能力
This commit is contained in:
@@ -19,6 +19,9 @@ public class SandboxConfigValue {
|
||||
@Schema(description = "VNC服务端口")
|
||||
private int vncPort;
|
||||
|
||||
@Schema(description = "终端服务端口")
|
||||
private int ttydPort;
|
||||
|
||||
@Schema(description = "文件服务端口")
|
||||
private int fileServerPort;
|
||||
|
||||
|
||||
@@ -321,7 +321,11 @@ public class ServerChannelHandler extends SimpleChannelInboundHandler<ProxyMessa
|
||||
}
|
||||
String clientKey = ctx.channel().attr(CHANNEL_CLIENT_KEY).get();
|
||||
if (clientKey != null) {
|
||||
reverseServerContainer.userSandboxOfflineTouch(clientKey);
|
||||
try {
|
||||
reverseServerContainer.userSandboxOfflineTouch(clientKey);
|
||||
} catch (Exception e) {
|
||||
logger.warn("userSandboxOfflineTouch error", e);
|
||||
}
|
||||
}
|
||||
ProxyChannelManager.removeCmdChannel(ctx.channel());
|
||||
}
|
||||
@@ -334,4 +338,4 @@ public class ServerChannelHandler extends SimpleChannelInboundHandler<ProxyMessa
|
||||
logger.error("exception caught", cause);
|
||||
super.exceptionCaught(ctx, cause);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.xspaceagi.sandbox.infra.dao.service.SandboxProxyService;
|
||||
import com.xspaceagi.sandbox.infra.dao.vo.SandboxProxyBackend;
|
||||
import com.xspaceagi.sandbox.infra.network.protocol.Constants;
|
||||
import com.xspaceagi.sandbox.infra.network.protocol.ProxyMessage;
|
||||
import com.xspaceagi.system.spec.cache.SimpleJvmHashCache;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.ByteBufAllocator;
|
||||
import io.netty.buffer.Unpooled;
|
||||
@@ -17,7 +16,6 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.net.ssl.SSLHandshakeException;
|
||||
import java.net.InetAddress;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Queue;
|
||||
|
||||
@@ -134,6 +132,11 @@ public class TempLinkHttpProxyHandler extends ChannelInboundHandlerAdapter {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
Object pending;
|
||||
while ((pending = receivedLastMessagesWhenConnect.poll()) != null) {
|
||||
ReferenceCountUtil.release(pending);
|
||||
}
|
||||
super.channelInactive(ctx);
|
||||
}
|
||||
|
||||
@@ -141,6 +144,7 @@ public class TempLinkHttpProxyHandler extends ChannelInboundHandlerAdapter {
|
||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
||||
if (cause.getCause() != null && (cause.getCause() instanceof SSLHandshakeException)) {
|
||||
logger.warn("SSLHandshakeException: {}", cause.getCause().getMessage());
|
||||
ctx.close();
|
||||
return;
|
||||
}
|
||||
super.exceptionCaught(ctx, cause);
|
||||
|
||||
@@ -168,6 +168,7 @@ public class SandboxConfigController {
|
||||
if (StringUtils.isBlank(sandboxRegDto.getSandboxConfigValue().getHostWithScheme())) {
|
||||
sandboxRegDto.getSandboxConfigValue().setHostWithScheme("http://127.0.0.1");
|
||||
}
|
||||
sandboxRegDto.getSandboxConfigValue().setVncPort(sandboxRegDto.getSandboxConfigValue().getTtydPort());
|
||||
if (StringUtils.isNotBlank(sandboxRegDto.getSavedKey())) {
|
||||
SandboxConfigDto byKey = sandboxConfigApplicationService.getByKey(sandboxRegDto.getSavedKey());
|
||||
if (byKey != null) {
|
||||
|
||||
Reference in New Issue
Block a user