feat: add xterm.js web terminal frontend
WebSocket-to-SSH proxy on :8080. Browser connects via xterm.js, server bridges to localhost:2222 SSH. Single HTML file, CDN deps. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
10
main.go
10
main.go
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/tolelom/catacombs/game"
|
||||
"github.com/tolelom/catacombs/server"
|
||||
"github.com/tolelom/catacombs/store"
|
||||
"github.com/tolelom/catacombs/web"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -20,7 +21,14 @@ func main() {
|
||||
|
||||
lobby := game.NewLobby()
|
||||
|
||||
log.Println("Catacombs server starting on :2222")
|
||||
// Start web terminal server in background
|
||||
go func() {
|
||||
if err := web.Start(":8080", 2222); err != nil {
|
||||
log.Printf("Web server error: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
log.Println("Catacombs server starting — SSH :2222, Web :8080")
|
||||
if err := server.Start("0.0.0.0", 2222, lobby, db); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user