mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
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
Terminal Service
A lightweight terminal service for Linux Odyssey player containers, replacing SSH with a more efficient WebSocket-based solution.
Features
- WebSocket-based terminal sessions
- PTY (pseudo-terminal) management
- Quest command execution
- File status and content inspection
- Direct integration with Traefik for frontend access
Architecture
The service is designed to be lightweight and efficient, using:
- gorilla/websocket for WebSocket connections
- creack/pty for terminal management
- Traefik for reverse proxying
Development
Prerequisites
- Go 1.24 or later
- Docker and Docker Compose
- Traefik (for production deployment)
Setup
- Install dependencies:
go mod init github.com/linux-odyssey/linux-odyssey/terminal-service
go get github.com/gorilla/websocket
go get github.com/creack/pty
- Build and run:
go build
./terminal-service
Configuration
Configuration details will be added as the service develops.
Security
The service implements security measures to ensure safe container access and command execution.
License
Same as the main Linux Odyssey project.