So while browsing reddit, I came across this neat package, shellinabox. Â Simply put, it runs as a process on your ‘box’ and fronts it with a javascript terminal interface. Â So as long as you have a halfway modern machine with javascript support you too can just connect to a machine and run CLI based stuff.
So as a test I setup a game of tetris, and a telnet session to my BBS.
There isn’t much to ‘setup’ in the way of shellinabox, because it’s all command line driven.
/shellinabox-2.14/shellinaboxd -t -s /:LOGIN -s “/bbs:nobody:nogroup:/:/usr/bin/telnet localhost” -s /tetris:nobody:nogroup:/:/usr/games/tetris-bsd –css /shellinabox-2.14/shellinabox/white-on-black.css -b
So this will create a new web server that by default listens on TCP port 4200 which in turn uses the virtual directories / for a login, /bbs which launches telent, and /tetris which starts the BSD tetris for terminals game.  Now as many of you are aware, not all people with internet connections have the luxury of having all outbound TCP/IP ports. Even the most excellent flashterm still establishes a TCP session.  That is what makes this different is that all the traffic is done via HTTP, which means it can be proxied.  Now the real trick is having a web server do the proxing for you, so that all the user has to do is hit a special URL, and the server will proxy the request to shellinabox’s web server.
Enter Apache2’s reverse proxy!
So on my BBS’es apache config, I add in the following lines:
ProxyPass /tetris http://localhost:4200/tetris
ProxyPassReverse /tetris http://localhost:4200/tetris
ProxyPass /bbs http://localhost:4200/bbs
ProxyPassReverse /bbs http://localhost:4200/bbs
I’m not sure exactly of the specific modules to enable, but hammering away this got it to work:
a2enmod proxy
a2enmod mod_proxy
a2enmod rewrite
a2enmod mod_proxy
a2enmod proxy_http
a2enmod proxy_module
a2enmod headers
a2enmod deflate
Under my virtual server’s ‘root’ directory.  So now when you access https://virtuallyfun.com/tetris/ Apache will proxy your request into the shellinabox http server, and you’ll get…
So now only using HTTP you can play tetris!
So where to go from here? Â I was thinking some kind of SIMH CP/M on demand thing. Â There is a command line Wyse 60 emulator, so maybe that’d be fun. Â I may even bring back something I had ages ago, access into a bunch of legacy systems. Â This is a great ‘solution’ to enable multiplexing without having to use another software MUX.
You ran into it years ago but probably missed it. It is what servers the newsreader on http://olduse.net/
I don’t recall it being so easy to deploy back then, otherwise I would have…
pretty sure there’s an HTML5 one somewhere…
Be sure to build with SSL. Otherwise, all you passwords/inputs go over the wire in plaintext. https://code.google.com/p/shellinabox/issues/detail?id=110
And HTML5 is overrated. This will work with extremely old browsers as well.