GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - valorisa/ShellFromBrowser: Network-traversing web terminal in Go. Works anywhere a browser can reach port 443 β€” airports, corporate networks, anywhere. Spiritual successor to ShellInBox (port 4200). WebSocket + xterm.js, SSH client, multi-sessions, file transfer, session recording. Single binary, Docker ready.

BranchesTags
Open more actions menu

Latest commit

 

History

110 Commits
110 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
cmd/shellfb
cmd/shellfb
 
 
docs
docs
 
 
internal
internal
 
 
web
web
 
 
.dockerignore
.dockerignore
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
AUTHORS
AUTHORS
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CITATION.cff
CITATION.cff
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Caddyfile.example
Caddyfile.example
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.fr.md
README.fr.md
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
SESSION_RESUME.md
SESSION_RESUME.md
 
 
ShellFromBrowser_Implementation_Plan.md
ShellFromBrowser_Implementation_Plan.md
 
 
config.example.yaml
config.example.yaml
 
 
docker-compose.reverse-proxy.yml
docker-compose.reverse-proxy.yml
 
 
docker-compose.yml
docker-compose.yml
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 

Repository files navigation

ShellFromBrowser

CI Go Version License: MIT Platform Docker

πŸ‡«πŸ‡· Lire en franΓ§ais

A network-traversing, web-based terminal emulator. ShellFromBrowser works everywhere a browser can open a website β€” airports, train stations, corporate networks, anywhere. It uses standard HTTPS on port 443: no firewall can tell it apart from a regular web visit.

A modern, cross-platform terminal emulator written in Go. Spiritual successor to ShellInBox β€” rebuilt from scratch with WebSocket, xterm.js, SSH client support, multi-sessions, file transfer, and session recording.


Features

Feature Description
Browser-based terminal Full xterm.js emulation β€” 256 colors, Unicode, mouse support, clipboard
Multi-session tabs Open multiple terminal sessions in one browser window, switch between them
SSH client Connect to remote hosts directly from the browser (user@host:port)
Authentication JWT-based auth with bcrypt password hashing, configurable per-user
TLS/HTTPS Built-in TLS support β€” just provide cert and key paths
File transfer Upload/download files through the web interface with path traversal protection
Session recording Record and replay terminal sessions in asciicast v2 format (asciinema-compatible)
Cross-platform Runs natively on Linux, macOS, and Windows (ConPTY)
Single binary Zero runtime dependencies β€” frontend, assets, everything embedded via go:embed
Docker ready Multi-stage Dockerfile + docker-compose included

Quick Start

Prerequisites

  • Go 1.27+ installed (required for Options 1, 2, and 4)
  • Docker installed (required for Option 3 only)

Option 1: Quick test (no install needed)

The fastest way to try ShellFromBrowser. Works on Windows, macOS, and Linux β€” Go handles the cross-platform differences automatically.

git clone https://github.com/valorisa/ShellFromBrowser.git
cd ShellFromBrowser

# Launch directly without installing (compiles and runs in one step)
go run ./cmd/shellfb

Then open http://localhost:4200 in your browser. You should see an interactive terminal (xterm.js).

This does not install anything on your system. It compiles a temporary binary and runs it. Stop it with Ctrl+C.

Option 2: Install globally

Installs the shellfb binary into your $GOPATH/bin (or %GOPATH%\bin on Windows), making it available system-wide.

go install github.com/valorisa/ShellFromBrowser/cmd/shellfb@latest

# Run with defaults (no auth, port 4200)
shellfb

# Run with custom address
shellfb --addr :3000

# Run with configuration file
shellfb --config config.yaml

# Display version
shellfb --version

Then open http://localhost:4200 (or your custom port) in your browser. Stop it with Ctrl+C.

Option 3: Docker (deployment)

The default docker-compose.yml exposes ports 80/443 with auto-TLS β€” designed for deployment on restricted networks (airports, train stations, corporate firewalls) where only standard HTTPS traffic passes through.

git clone https://github.com/valorisa/ShellFromBrowser.git
cd ShellFromBrowser

# Create your configuration
cp config.example.yaml config.yaml
# Edit config.yaml: set your domain, auth, etc.

docker compose up -d

Open https://your-domain.com β€” the terminal is ready. To stop: docker compose down.

Local testing with Docker? You can run without TLS:

docker build -t shellfb .
docker run --rm --name shellfb-test -p 4200:4200 shellfb

Then open http://localhost:4200. Stop it with Ctrl+C, or from another terminal: docker stop shellfb-test.

Option 4: Build from source (Makefile)

Compiles the binary into ./bin/shellfb. Useful for development or packaging.

git clone https://github.com/valorisa/ShellFromBrowser.git
cd ShellFromBrowser

# Build the binary
make build

# Run it
./bin/shellfb

# Run the test suite
make test

Then open http://localhost:4200 in your browser. Stop it with Ctrl+C.


Configuration

Copy config.example.yaml to config.yaml and customize:

server:
  addr: ":4200"
  tls:
    enabled: true
    cert: "/path/to/cert.pem"
    key: "/path/to/key.pem"

auth:
  enabled: true
  jwt_secret: "generate-a-random-string-here"
  users:
    - username: admin
      password_hash: "$2a$10$..."
    - username: developer
      password_hash: "$2a$10$..."

shell:
  # Leave empty for system default (SHELL on Unix, COMSPEC on Windows)
  command: ""
  env:
    - "TERM=xterm-256color"

sessions:
  max_per_user: 10
  idle_timeout: "30m"

ssh:
  enabled: true
  known_hosts: "~/.ssh/known_hosts"

recording:
  enabled: true
  dir: "./recordings"

Generate a password hash

shellfb hash-password
# Enter password: ********
# $2a$10$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Copy the output into your config.yaml under password_hash.

CLI options

Flag Default Description
--addr :4200 Listen address (overrides config file)
--config none Path to YAML configuration file
--version β€” Print version and exit

Subcommands:

Command Description
hash-password Generate a bcrypt hash for use in config

SSH Client Usage

Connect to remote hosts directly from the browser by opening a WebSocket connection to /ws/ssh:

ws://localhost:4200/ws/[email protected]:22&password=secret&token=JWT_TOKEN

Parameters:

  • target (required): SSH target in format user@host:port (port defaults to 22)
  • password: Password authentication
  • key: Path to private key file (server-side)
  • token: JWT authentication token

API Endpoints

Method Path Auth Description
POST /api/login No Authenticate and receive JWT token
GET /api/sessions Yes List active terminal sessions
DELETE /api/sessions?id=X Yes Destroy a specific session
POST /api/upload Yes Upload a file (multipart)
GET /api/download?file=X Yes Download a file
GET /api/recordings Yes List recorded sessions
GET /api/recordings/get?id=X Yes Get recording data (asciicast v2)
WS /ws Yes Terminal WebSocket (local shell)
WS /ws/ssh Yes SSH WebSocket (remote host)

Security

  • Authentication: JWT tokens with configurable expiry (24h default)
  • Rate limiting: Login endpoint limited to 5 attempts per minute per IP
  • Security headers: CSP, X-Frame-Options (DENY), X-Content-Type-Options, Referrer-Policy
  • Path traversal protection: All file operations validated against base directory
  • No eval(): No inline scripts, no dynamic code execution in frontend
  • TLS: Built-in HTTPS support β€” no reverse proxy required
  • WebSocket auth: All WebSocket connections require valid JWT token when auth is enabled

Project Structure

ShellFromBrowser/
β”œβ”€β”€ cmd/shellfb/          # Entry point, CLI
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ auth/             # JWT + bcrypt authentication
β”‚   β”œβ”€β”€ config/           # YAML configuration
β”‚   β”œβ”€β”€ recording/        # Asciicast v2 session recording
β”‚   β”œβ”€β”€ server/           # HTTP server, WebSocket, middleware
β”‚   β”œβ”€β”€ ssh/              # SSH client wrapper
β”‚   β”œβ”€β”€ terminal/         # PTY session management (Unix + Windows)
β”‚   └── transfer/         # File upload/download
β”œβ”€β”€ web/
β”‚   └── static/           # Embedded frontend (xterm.js, CSS, JS)
β”œβ”€β”€ config.example.yaml   # Example configuration
β”œβ”€β”€ Dockerfile            # Multi-stage Docker build
β”œβ”€β”€ docker-compose.yml    # Ready-to-use deployment
└── Makefile              # Build automation

License

MIT β€” Copyright (c) 2026 valorisa

About

Network-traversing web terminal in Go. Works anywhere a browser can reach port 443 β€” airports, corporate networks, anywhere. Spiritual successor to ShellInBox (port 4200). WebSocket + xterm.js, SSH client, multi-sessions, file transfer, session recording. Single binary, Docker ready.

github.com/valorisa/ShellFromBrowser

Topics

browserclicross-platformdevtoolsdockerfile-transfergogolangjwtptysession-recordingshellinaboxsshssh-clientterminaltlsweb-terminalwebsocketxtermxtermjs

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.