No Description

Dan Ballard b34fe84917 log api typo 1 week ago
application b34fe84917 log api typo 1 week ago
channels 2815e29704 adding new filterable logging system 1 week ago
connection b34fe84917 log api typo 1 week ago
connectivity b34fe84917 log api typo 1 week ago
identity 5066380655 v3 onions 2 months ago
log b34fe84917 log api typo 1 week ago
policies e382c8eb69 Rename 6 months ago
testing 2815e29704 adding new filterable logging system 1 week ago
utils d54ed0b106 Adding IsValidHostname function 2 weeks ago
wire 5066380655 v3 onions 2 months ago
.drone.yml b1fb04a880 drone only email on fail 2 weeks ago
.gitignore cdb458647f drone build file 5 months ago
.travis.yml 6f9718596d fmt and travis update 7 months ago
CONTRIBUTING.md e382c8eb69 Rename 6 months ago
LICENSE b3c09e5409 ricochet protobuf files, for completeness 5 months ago
README.md 8fc60a0495 Mirating from bulb/asaur to bine, adding a generic Mixnet interface 3 weeks ago
inbound_version_negotiation_test.go e382c8eb69 Rename 6 months ago
outbound_version_negotiation_test.go e382c8eb69 Rename 6 months ago
private_key bfe5b74364 Refactor GoRicochet 2 years ago
ricochet.go 38cff4212d rename local variables acn; Add bootstrap status support to ACN/torprovider 2 weeks ago
ricochet_test.go 38cff4212d rename local variables acn; Add bootstrap status support to ACN/torprovider 2 weeks ago
testing.md 7f215e86c4 Adding Open Connection Failed Test 11 months ago

README.md

libricochet-go Build Status Go Report Card Coverage Status

libricochet-go is an experimental implementation of the Ricochet Protocol in Go.

Features

  • A simple API that you can use to build Automated Ricochet Applications
  • A suite of regression tests that test protocol compliance.

Building an Automated Ricochet Application

Below is a simple echo bot, which responds to any chat message. You can also find this code under examples/echobot

package main

import (
  "git.openprivacy.ca/openprivacy/libricochet-go/application"
  "git.openprivacy.ca/openprivacy/libricochet-go/utils"
  "log"
  "time"
)

func main() {
  echobot := new(application.RicochetApplication)
  pk, err := utils.LoadPrivateKeyFromFile("./private_key")

  if err != nil {
    log.Fatalf("error reading private key file: %v", err)
  }

  l, err := application.SetupOnion("127.0.0.1:9051", "tcp4", "", pk, 9878)

  if err != nil {
    log.Fatalf("error setting up onion service: %v", err)
  }

  echobot.Init(pk, new(application.AcceptAllContactManager))
  echobot.OnChatMessage(func(rai *application.RicochetApplicationInstance, id uint32, timestamp time.Time, message string) {
    log.Printf("message from %v - %v", rai.RemoteHostname, message)
    rai.SendChatMessage(message)
  })
  log.Printf("echobot listening on %s", l.Addr().String())
  echobot.Run(l)
}

Each automated ricochet service can extend of the StandardRicochetService. From there certain functions can be extended to fully build out a complete application.

Security and Usage Note

This project is experimental and has not been independently reviewed. If you are looking for a quick and easy way to use ricochet please check out Ricochet IM.