GithubHelp home page GithubHelp logo

imclab / rtcchat2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from daviddahl/rtcchat2

0.0 1.0 0.0 244 KB

webrtc chat with a focus on privacy - written in go

Home Page: http://mehrvarz.github.io/rtcchat2

License: Other

rtcchat2's Introduction

rtc chat v2

A WebRTC chat service written in Go

rtc chat establishes end-to-end encrypted, P2P and relayed communication links.

Installation

You should have Go 1.1 installed.

Install the following modules:

go get github.com/mehrvarz/rtcchat2
go get github.com/steveyen/gkvlite
go get code.google.com/p/go.net/websocket

Initialize the callee service key/value flat file DB.

cd $GOPATH/src/mehrvarz/rtcchat2
go run rtcchat/gkvCreate.go

Run server without SSL keys (test mode)

rtc chat server should be run with SSL keys installed (see next section). For simple test purposes, you can run rtc chat server without SSL keys (and then use http instead of https):

go run rtcchat/main.go -secure=false

Run server with SSL keys (standard mode)

Create SSL keys for use with HTTPS:

mkdir keys && cd keys
openssl req -new -x509 -nodes -out cert.pem -keyout key.pem -days 100
(answer questions)
cd ..

Alternative: create symbolic links to your existing keys from /etc/nginx

mkdir keys && cd keys
ln -s /etc/nginx/cert.pem cert.pem
ln -s /etc/nginx/key.pem key.pem
cd ..

Note: the "keys" subfolder is expected to contain two files: "cert.pem" and "key.pem".

This is how your installation folder should look:

rtcchat2/

	html/
		index.html
		spinner.gif
		bootstrap.min.css
		...

	rtcchat/
		main.go
		gkvCreate.go
		...

	keys/
		key.pem
		cert.pem

	rtcSignaling.go
	calleeService.go
	callerService.go
	calleePersistKey.go
	udpProxy.go
	stun.go
	LICENSE
	...

To run rtc chat server:

go run rtcchat/main.go

Or simply:

./run

Test your server

  1. Open the following URL in two browser tabs:

    https://127.0.0.1:8077

    or: http://127.0.0.1:8077 for insecure test mode

  2. Enter the same 'secret word' in both browser tabs. You should see the two instances connect.

More Info

You find more info here: http://mehrvarz.github.io/rtcchat2

License

This project uses code from:

bootstrap.js: Copyright 2012 Twitter, Inc; Apache License, Version 2.0.
jquery: Copyright jQuery Foundation and contributors; MIT License.
adapter.js + serverless-webrtc.js: Copyright 2013 Chris Ball [email protected].
gkvlite: Copyright Steve Yen; MIT license.

For the rest:

Copyright (C) 2013 Timur Mehrvarz

Permission is hereby granted, free of charge, to any person obtaining a copy of serverless-webrtc and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED β€œAS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

rtcchat2's People

Contributors

mehrvarz avatar

Watchers

 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.