p8p9 / termbox

Instant Linux terminals

Home Page:https://termbox.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Termbox

Termbox provides instant Linux terminal access via a web interface.

Note: this is not Termbox the user interface library.

wercker status

Installation

First, install hyperd.

By default, hyperd is accessible via a socket file at /var/run/hyper.sock. You can pass this file to Termbox, or configure hyperd to listen on a TCP address. Due to the lack of built in authentication, both methods should be used with care.

Termbox is distributed as a Docker image:

docker run -v /var/run/hyper.sock:/var/run/hyper.sock -p 7842:7842 termbox/termbox

Now open localhost:7842 and you should see the app loading up.

Development

Install the following first:

Get the code and its dependencies:

go get -d github.com/termbox/termbox
cd $GOPATH/github.com/termbox/termbox

glide install
npm install
jspm install

Run the server:

make run

Now open localhost:7842.

Configuration

Termbox is configured via environment variabes, although a .env file is supported as well.

  • TERMBOX_ADDR: Address and port to listen on. Defaults to :7842.
  • TERMBOX_ENV: When set to production, enables various optimizations and loads the script bundle. Defaults to development.
  • TERMBOX_RCSITEKEY and TERMBOX_RCSECRET: Recaptcha site key and secret. No captcha checks are performed if not set.
  • TERMBOX_AUTOTLS: If set to true, enables TLS and automatically obtains a certificate from Let's Encrypt.
  • TERMBOX_TLSCERT and TERMBOX_TLSKEY: Enables TLS using the specificed certificate and key.
  • TERMBOX_BOXMEMORY: RAM assigned to boxes in megabytes. Defaults to 256.
  • TERMBOX_BOXCPUS: CPUs assigned to boxes. Defaults to 1.
  • TERMBOX_BOXDURATION: Time in hours after which boxes are deleted. Defaults to 3.
  • TERMBOX_PUBLICADDR: The public address of the server. Setting this enables public ports.
  • TERMBOX_HYPERPROTO: Protocol to access hyperd. Set to unix (default) or tcp.
  • TERMBOX_HYPERADDR: Address to access hyperd. Defaults to /var/run/hyper.sock.

To generate a self signed cert for development, run:

go run /usr/lib/golang/src/crypto/tls/generate_cert.go --host localhost

About

Instant Linux terminals

https://termbox.io

License:MIT License


Languages

Language:JavaScript 72.7%Language:Go 24.1%Language:CSS 1.6%Language:HTML 0.9%Language:Makefile 0.8%