feat: connect terminal service to backend

feat: put terminal service into container

refactor: separate main into terminal and websocket

feat: create zsh using commander in home

feat: pass backendUrl to container

feat: pass token to ws server to cmd-hook

feat: gen terminal access token for frontend

feat: success to connect through traefik

fix: handle invalid jwt

feat: connect to session container via traefik
This commit is contained in:
Justin Lin committed 2025-05-05 19:53:33 +08:00
1 parent 0b08a9a5d9
commit 5e81db2759
20 files changed
+281 -209

No files matched your search

+5 -1
View File
@@ -39,9 +39,13 @@
term.open(document.getElementById('terminal'))
fitAddon.fit()
const token = new URLSearchParams(window.location.search).get('token')
// Create WebSocket connection
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:'
const ws = new WebSocket(`${protocol}//${window.location.host}/ws`)
const ws = new WebSocket(
`${protocol}//${window.location.host}${window.location.pathname}/ws?token=${token}`
)
// Handle WebSocket connection
ws.onopen = () => {