added setup files

This commit is contained in:
2021-07-25 00:07:41 +04:00
parent 1d2debbb3f
commit a0971f13cf
5 changed files with 37 additions and 16 deletions

2
.gitignore vendored
View File

@@ -1,5 +1,5 @@
config.json config.json
env/ env/
remotegameplay remotegameplay
rooms.json room.json
laplace laplace

View File

@@ -1,14 +0,0 @@
# Remote game play
The aim of this project is develop a WebRTC screenshare designed for streaming video games and
accpeting remote inputs.
There will be ansible intrcutions which can be executed inside into any virtual environment. This will
a plugin which complements the project [P2PRC](https://p2prc.akilan.io)
## Laplace Binary
The laplace binary is generated from the fork:
https://github.com/Akilan1999/laplace/tree/keyboard_mouse
## Running Laplace headless
```
chromium --auto-select-desktop-capture-source=Entire screen --url https://0.0.0.0:8888/?mode=headless
```

20
main.go
View File

@@ -21,6 +21,9 @@ func main() {
keyFile := flag.String("keyFile", "files/server.key", "TLS key file") keyFile := flag.String("keyFile", "files/server.key", "TLS key file")
headless := flag.Bool("headless", false, "Creating screenshare using headless mode") headless := flag.Bool("headless", false, "Creating screenshare using headless mode")
roomInfo := flag.Bool("roomInfo", false, "Getting room id of headless server") roomInfo := flag.Bool("roomInfo", false, "Getting room id of headless server")
killServer := flag.Bool("killServer", false, "Kills the laplace")
killChromium := flag.Bool("killChromium", false, "Kills all chromuim")
flag.Parse() flag.Parse()
// Action performed when the config file is called // Action performed when the config file is called
@@ -54,6 +57,23 @@ func main() {
return return
} }
// kills laplace server
if *killServer {
cmd := exec.Command("pkill" ,"laplace")
if err := cmd.Run(); err != nil {
log.Fatalln(err)
}
return
}
// kills chromium server
if *killChromium {
cmd := exec.Command("pkill" ,"chromium")
if err := cmd.Run(); err != nil {
log.Fatalln(err)
}
return
}
if *tls { if *tls {
log.Println("Listening on TLS:", *addr) log.Println("Listening on TLS:", *addr)

View File

@@ -1 +0,0 @@
null

16
setup.sh Normal file
View File

@@ -0,0 +1,16 @@
export REMOTEGAMEPLAY=$PWD
go build .
./laplace -setconfig
./laplace -tls -addr 0.0.0.0:8888 &
./laplace -headless -addr 0.0.0.0:8888 &
sleep 2
./laplace -headless -roomInfo