Dev 0.2.1 #30

Merged
LukeGus merged 47 commits from dev-0.2.1 into main 2025-03-24 03:17:56 +00:00
2 changed files with 18 additions and 4 deletions
Showing only changes of commit f743f8fa9c - Show all commits
+11 -1
View File
@@ -117,8 +117,18 @@ export const NewTerminal = forwardRef(({ hostConfig, isVisible, setIsNoAuthHidde
let isPasting = false; let isPasting = false;
let buffer = "";
let bufferTimeout = null;
terminalInstance.current.onData((data) => { terminalInstance.current.onData((data) => {
socketRef.current.emit("data", data); buffer += data;
if (!bufferTimeout) {
bufferTimeout = setTimeout(() => {
socketRef.current.emit("data", buffer);
buffer = "";
bufferTimeout = null;
}, 20);
}
}); });
terminalInstance.current.attachCustomKeyEventHandler((event) => { terminalInstance.current.attachCustomKeyEventHandler((event) => {
+7 -3
View File
@@ -10,7 +10,10 @@ const io = socketIo(server, {
methods: ["GET", "POST"], methods: ["GET", "POST"],
credentials: true credentials: true
}, },
allowEIO3: true allowEIO3: true,
pingInterval: 2500,
pingTimeout: 5000,
maxHttpBufferSize: 1e7,
}); });
const logger = { const logger = {
@@ -106,8 +109,9 @@ io.on("connection", (socket) => {
kex: ['curve25519-sha256', 'curve25519-sha256@libssh.org', 'ecdh-sha2-nistp256'], kex: ['curve25519-sha256', 'curve25519-sha256@libssh.org', 'ecdh-sha2-nistp256'],
serverHostKey: ['ssh-ed25519', 'ecdsa-sha2-nistp256'] serverHostKey: ['ssh-ed25519', 'ecdsa-sha2-nistp256']
}, },
keepaliveInterval: 30000, keepaliveInterval: 10000,
keepaliveCountMax: 3, keepaliveCountMax: 5,
readyTimeout: 5000,
}); });
}); });