同步平台业务模块能力

This commit is contained in:
baiyanyun
2026-07-13 09:13:30 +08:00
parent e612f5e434
commit a1a38f62d8
224 changed files with 22331 additions and 1224 deletions

View File

@@ -19,6 +19,9 @@ public class SandboxConfigValue {
@Schema(description = "VNC服务端口")
private int vncPort;
@Schema(description = "终端服务端口")
private int ttydPort;
@Schema(description = "文件服务端口")
private int fileServerPort;

View File

@@ -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);
}
}
}

View File

@@ -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);