Merge pull request #5 from cr2007/master

Index adding to the `README` file
This commit is contained in:
Akilan Selvacoumar
2022-03-07 19:20:37 +04:00
committed by GitHub

View File

@@ -9,12 +9,34 @@
[![made-with-Go](https://img.shields.io/badge/Made%20with-Go-1f425f.svg)](http://golang.org) [![made-with-Go](https://img.shields.io/badge/Made%20with-Go-1f425f.svg)](http://golang.org)
The aim of this project is develop a WebRTC screenshare designed for streaming video games and The aim of this project is develop a WebRTC screenshare designed for streaming video games and
accepting remote inputs. accepting remote inputs.<br>
There will be ansible instructions which can be executed inside into any virtual environment. This will There will be ansible instructions which can be executed inside into any virtual environment. This will
be a plugin which complements the project [P2PRC](https://p2prc.akilan.io) be a plugin which complements the project [P2PRC](https://p2prc.akilan.io)
## Testing with Xplane 11 # Index
[![IMAGE ALT TEXT](https://i.ytimg.com/vi/65dn7TRgzeE/hqdefault.jpg)](https://www.youtube.com/watch?v=65dn7TRgzeE "Running Xplane 11 using WebRTC")
- [Testing with X-Plane 11](#testing-with-x-plane-11)
- [Laplace](#laplace)
- [Installation](#installation)
- [Installation required to share keyboard and mouse](#installation-required-to-share-keyboard-and-mouse)
- [What is x2x?](#what-is-x2x)
- [What is Barrier KVM](#what-is-barrier-kvm)
- [Barrier KVM build status and links to install](#barrier-kvm-build-status-and-links-to-install)
- [Build from Source](#build-from-source)
- [Program Execution](#program-execution)
- [Starting game when screen-share is triggered](#starting-game-when-screen-share-is-triggered)
- [Ex: Start X-Plane 11](#ex-start-x-plane-11)
- [Open config file](#open-config-file)
- [Call from built script which starts the server , creates room and outputs the ID](#call-from-built-script-which-starts-the-server--creates-room-and-outputs-the-id)
- [Starting the Server](#starting-server)
- [Starting the Screenshare](#starting-screenshare)
- [Contributing](#contributing)
- [Discord Server Link](#or)
---
## Testing with [X-Plane 11](https://www.x-plane.com/)
[![A screenshot of X-Plane 11 (flight simulator game) running smoothly via WebRTC](https://i.ytimg.com/vi/65dn7TRgzeE/hqdefault.jpg)](https://www.youtube.com/watch?v=65dn7TRgzeE "Running X-Plane 11 using WebRTC")
## Laplace ## Laplace
Based on the fork: Based on the fork:
@@ -24,16 +46,16 @@ https://github.com/Akilan1999/laplace/tree/keyboard_mouse
### Installation required to share keyboard and mouse ### Installation required to share keyboard and mouse
Currently, you can either use [x2x](https://github.com/dottedmag/x2x) or [Barrier KVM]() Currently, you can either use [x2x](https://github.com/dottedmag/x2x) or [Barrier KVM]()<br>
We need to ensure that the client has SSH client installed or Barrierc. We need to ensure that the client has SSH client installed or Barrierc.
#### What is x2x? #### What is x2x?
x2x allows the keyboard, mouse on one X display to be used to control another X [x2x](https://github.com/dottedmag/x2x) allows the keyboard, mouse on one X display to be used to control another X
display. It also shares X clipboards between the displays. display. It also shares X clipboards between the displays.
Note: x2x runs on top of SSH. Note: x2x runs on top of SSH.
#### What is Barrier kvm? #### What is Barrier KVM?
Barrier is software that mimics the functionality of a KVM switch, which historically would allow you to use a single Barrier is software that mimics the functionality of a KVM switch, which historically would allow you to use a single
keyboard and mouse to control multiple computers by physically turning a dial on the box to switch the machine you're keyboard and mouse to control multiple computers by physically turning a dial on the box to switch the machine you're
@@ -89,9 +111,9 @@ go build .
# Open config.json file and add SSH password for x2x # Open config.json file and add SSH password for x2x
``` ```
### Program Execution ## Program Execution
Executing this project basically serves an HTTP server that will host the frontend and the WebSocket implementation. Executing this project basically serves an HTTP server that will host the frontend and the WebSocket implementation.<br>
Note that you sometimes need to run HTTPs in order for browser to connect to websocket. Note that you sometimes need to run HTTPs in order for browser to connect to websocket.
```bash ```bash
@@ -118,19 +140,19 @@ $ ./laplace --help
Use TLS Use TLS
``` ```
By default, you can run the executable without any argument to listen to TLS port 443. By default, you can run the executable without any argument to listen to TLS port 443.<br>
A self-signed certificate files are provided to ease up development. If you want to run A self-signed certificate files are provided to ease up development. If you want to run
with barrier KVM. Run as non-root. with barrier KVM. Run as non-root.
### Starting game when screen-share is triggered ### Starting game when screen-share is triggered
This requires creating a bash script to trigger when the screenshare begins. This requires creating a bash script to trigger when the screenshare begins.
#### Ex: Start Xplane 11 #### Ex: Start X-Plane 11
Let's call this script xplane11.sh Let's call this script `xplane11.sh`
```bash ```bash
# Navigating to the directory where XPlane11 is present # Navigating to the directory where X-Plane11 is present
cd /path/.local/share/Steam/steamapps/common/X-Plane\ 11/ cd /path/.local/share/Steam/steamapps/common/X-Plane\ 11/
# Execute Xplane 11 binary # Execute X-Plane 11 binary
./X-Plane-x86_64 ./X-Plane-x86_64
``` ```
#### Open config file #### Open config file
@@ -149,7 +171,7 @@ cd /path/.local/share/Steam/steamapps/common/X-Plane\ 11/
```bash ```bash
sh run.sh <IPV6 or Public IPV4 address of server> sh run.sh <IPV6 or Public IPV4 address of server>
``` ```
Note: This script starts the server using the port 8888 by default Note: This script starts the server using the port 8888 by default<br>
The 2 steps below are if you want to start them command by command The 2 steps below are if you want to start them command by command
### Starting server ### Starting server
@@ -163,7 +185,7 @@ $ ./laplace -tls -addr 0.0.0.0:8888
./laplace -headless -addr <public ip address of server> ./laplace -headless -addr <public ip address of server>
``` ```
You can then open https://localhost:8888/ to view Laplace page. You can then open https://localhost:8888/ to view Laplace page.<br>
You may need to add certificate exceptions. In Chrome, you can type `thisisunsafe`. You may need to add certificate exceptions. In Chrome, you can type `thisisunsafe`.
@@ -175,5 +197,3 @@ Pull requests are welcome. For major changes, please open an issue first to disc
### or ### or
[![Support Server](https://discordapp.com/api/guilds/854397492795277322/widget.png?style=banner2)](https://discord.gg/b4nRGTjYqy) [![Support Server](https://discordapp.com/api/guilds/854397492795277322/widget.png?style=banner2)](https://discord.gg/b4nRGTjYqy)