GithubHelp home page GithubHelp logo

ananthuanil13 / webrtc-remote-desktop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deshmukhpooja/webrtc-remote-desktop

0.0 0.0 0.0 146 KB

WebRTC Remote Desktop - Browser based remote desktop using Javascript & GO.

License: MIT License

Makefile 1.19% Go 74.04% CSS 4.75% HTML 2.77% JavaScript 17.25%

webrtc-remote-desktop's Introduction

WebRTC Remote Desktop

GO based WebRTC Remote Desktop allows you to control the computers remotely (like any other RDP softwares) using WebRTC from modern browsers. The backend is a pure GO implmentation using Pion WebRTC & RobotGo.


Insipiration

The project is inspired from "WebRTC remote screen (https://github.com/rviscarra/webrtc-remote-screen)". Thanks for such a lovely contribution Rafael Viscarra.


Features

  • Remote screen viewing
  • Mouse controls ( Move, Click, Double Click, Scroll )
  • Keyboard ( Basic controls )
  • ... Working on more features !

Dependencies

  • Go 1.12+ (https://golang.org/doc/install)
  • If you want h264 support: libx264 (included in x264-go, you'll need a C compiler / assembler to build it) (Supports Mac only)
  • If you want VP8 support: libvpx (Supports Windows & Mac)

For Windows libvpx installation, follow below installation steps:

1. Download and install latest MYSYS2 installer from https://www.msys2.org/
2. Open MYSYS Shell
3. Install Mingw Toolchain
- 32 bit:  pacman -S mingw-w64-i686-toolchain 
- 64 bit:  pacman -S mingw-w64-x86_64-toolchain
4. pacman -S mingw-w64-x86_64-libvpx

Running in development mode

git clone https://github.com/imtiyazs/webrtc-remote-desktop.git
cd webrtc-remote-desktop
go mod tidy
go run -tags "h264enc" cmd/agent.go

Open https://localhost:9000 in the browser

Optional Params:

  • --http.port=8888
  • --stun.server=stun:stun.l.google.com:19302
  • For H264 stream: "h264enc"
  • For VP8 stream: "vp8enc"

Building for production

Build the deployment package by runnning make. This should create a tar file with the binary and web directory, by default only support for h264 is included, if you want to use VP8 run make encoders=vp8, if you want both then make encoders=vp8,h264.

Copy the archive to a remote server, decompress it and run ./agent. The agent application assumes the web dir. is in the same directory.

WebRTC requires a secure domain to work, the recommended approach towards this is to forward the agent port thru SSH tunneling:

ssh -L YOUR_LOCAL_PORT:localhost:9000 

Then access the application on https://localhost:YOUR_LOCAL_PORT, localhost should be considered secure by modern browsers.

  • Tip for production: You need to write your own gateway server for exchanging SDP with the computers behind the NAT.

Contributing

Amazing people responsible for making this possible:


License

MIT - see LICENSE for the full text.

webrtc-remote-desktop's People

Contributors

imtiyazs 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.