diff --git a/src/ui/Desktop/Apps/Terminal/Terminal.tsx b/src/ui/Desktop/Apps/Terminal/Terminal.tsx index 8b371083..551aece9 100644 --- a/src/ui/Desktop/Apps/Terminal/Terminal.tsx +++ b/src/ui/Desktop/Apps/Terminal/Terminal.tsx @@ -313,9 +313,9 @@ export const Terminal = forwardRef(function SSHTerminal( ? "wss://" : "ws://"; const wsHost = baseUrl.replace(/^https?:\/\//, ""); - return `${wsProtocol}${wsHost}/ssh/websocket/`; + return `${wsProtocol}${wsHost.replace(':8081', ':8082')}/`; })() - : `${window.location.protocol === "https:" ? "wss" : "ws"}://${window.location.host}/ssh/websocket/`; + : `${window.location.protocol === "https:" ? "wss" : "ws"}://${window.location.hostname}:8082/`; // Clean up existing connection to prevent duplicates - Linus principle: eliminate complexity if (webSocketRef.current && webSocketRef.current.readyState !== WebSocket.CLOSED) { diff --git a/src/ui/Mobile/Apps/Terminal/Terminal.tsx b/src/ui/Mobile/Apps/Terminal/Terminal.tsx index bdbcd93a..861bfd80 100644 --- a/src/ui/Mobile/Apps/Terminal/Terminal.tsx +++ b/src/ui/Mobile/Apps/Terminal/Terminal.tsx @@ -321,7 +321,7 @@ export const Terminal = forwardRef(function SSHTerminal( ? "wss://" : "ws://"; const wsHost = baseUrl.replace(/^https?:\/\//, ""); - return `${wsProtocol}${wsHost}/ssh/websocket/`; + return `${wsProtocol}${wsHost.replace(':8081', ':8082')}/ssh/websocket/`; })() : `${window.location.protocol === "https:" ? "wss" : "ws"}://${window.location.host}/ssh/websocket/`;