Giter Club home page Giter Club logo

rotcore's Introduction

Rotcore (RoTCore)

Rotcore was a project that allowed a chatroom to gather and spin up a light Linux VM, take over the Xorg display controls and browse the web via Firefox together. This was accomplished via WebRTC (p2p streaming) and Websocket (chat & input control).

This repository acts as a monorepo for all the source code of all of the programs needed to run a Rotcore room.

RTC

RTC is the Golang application which responds to WebRTC peer calls, and streams the RTC desktop stream to them.

It runs an HTTP server using Twirp to respond to remote procedure calls from authorized applications.

It takes a secret used to authenticate requests, and binds to arbitrary UDP ports to stream.

KBM

KBM is a Rust program which allows interaction with the mouse & keyboard in x11. It connects to the x11 $DISPLAY, and starts a TCP server which authenticates only one single TCP stream if it provides an acceptable challenge.

That server responds to special commands to click, scroll, type, etc.

As such, it will want the same secret as RTC.

Streamer

Streamer a tiny C program which takes a gstreamer pipeline string as an argument and runs it.

In the future, it is planned to automatically restart, log events such as backlogged queues, etc.

Provision

Provision contains some data used to actually build a room virtual machine from scratch.

Deploy

A series of programs is also needed to make Rotcore useful, including an X11 display, PulseAudio, Firefox, and their related configuration files for usability and security.

The deploy folder contains a series of scripts which run all of the aforementioned applications with specific flags and settings, culminating in deploy.js which spawns RTC, KBM, Streamer, X11, and Firefox, all from one easy to run NodeJS script. Configuration is done by copying config.ex.js -> config.js.

Building

Before running deploy.js, a build needs to be done of the 3 executables. There's a handy Dockerfile and associated docker_build.sh that can do this. It takes GIT_TOKEN as an environment variable, builds RTC, KBM, Streamer, and copies the resulting executables into ./deploy/bin to be run by deploy.js

TL;DR

pacman -S nodejs firefox xorg-server pulseaudio # v8+
GIT_TOKEN=aaabbbcccdddeeefff docker_build.sh
cd deploy
PUBLIC_IPS=xxx.xxx.xx.xx,yyy.yyy.yy.yy node deploy.js

rotcore's People

Contributors

izzymg avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.