Merge branch 'acn' of dan/libricochet-go into master

This commit is contained in:
erinn 2018-11-22 00:20:19 +00:00 committed by Gogs
commit 65fb3992a3
6 changed files with 11 additions and 11 deletions

View File

@ -23,14 +23,14 @@ type RicochetApplication struct {
v3identity identity.Identity
name string
ls connectivity.ListenService
mn connectivity.Mixnet
mn connectivity.ACN
instances []*ApplicationInstance
lock sync.Mutex
aif ApplicationInstanceFactory
}
// Init initializes the underlying RicochetApplication datastructure, making it ready for use
func (ra *RicochetApplication) Init(mn connectivity.Mixnet, name string, v3identity identity.Identity, af ApplicationInstanceFactory, cm ContactManagerInterface) {
func (ra *RicochetApplication) Init(mn connectivity.ACN, name string, v3identity identity.Identity, af ApplicationInstanceFactory, cm ContactManagerInterface) {
ra.mn = mn
ra.name = name
ra.v3identity = v3identity

View File

@ -114,7 +114,7 @@ func main() {
time.Sleep(time.Second * 30)
}
func NewAliceBot(mn connectivity.Mixnet, onion string) alicebot {
func NewAliceBot(mn connectivity.ACN, onion string) alicebot {
alice := alicebot{}
alice.messages = make(map[uint32]string)

View File

@ -19,8 +19,8 @@ type ListenService interface {
Close()
}
// Mixnet is mixnet implementation wrapper that supports Open for new connections and Listen to accept connections
type Mixnet interface {
// ACN is Anonymous Communication Network implementation wrapper that supports Open for new connections and Listen to accept connections
type ACN interface {
// Open takes a hostname and returns a net.Conn to the derived endpoint
// Open allows a client to resolve various hostnames to connections
// The supported types are onions address are:

View File

@ -54,7 +54,7 @@ func (lp *localProvider) Close() {
}
// LocalProvider returns a for testing use only local clearnet implementation of a Mixnet interface
func LocalProvider() Mixnet {
// LocalProvider returns a for testing use only local clearnet implementation of a ACN interface
func LocalProvider() ACN {
return &localProvider{}
}

View File

@ -88,8 +88,8 @@ func (tp *torProvider) Close() {
tp.t.Close()
}
// StartTor creates/starts a Tor mixnet and returns a usable Mixnet object
func StartTor(appDirectory string, bundledTorPath string) (Mixnet, error) {
// StartTor creates/starts a Tor ACN and returns a usable ACN object
func StartTor(appDirectory string, bundledTorPath string) (ACN, error) {
dataDir := path.Join(appDirectory, "tor")
os.MkdirAll(dataDir, 0700)
@ -132,7 +132,7 @@ func StartTor(appDirectory string, bundledTorPath string) (Mixnet, error) {
return nil, errors.New("Could not connect to or start Tor that met requirments")
}
func createFromExisting(controlport *control.Conn, datadir string) Mixnet {
func createFromExisting(controlport *control.Conn, datadir string) ACN {
t := &tor.Tor{
Process: nil,
Control: controlport,

View File

@ -13,7 +13,7 @@ import (
// will be closed. This function blocks until version negotiation has completed.
// The application should call Process() on the returned OpenConnection to continue
// handling protocol messages.
func Open(mn connectivity.Mixnet, remoteHostname string) (*connection.Connection, error) {
func Open(mn connectivity.ACN, remoteHostname string) (*connection.Connection, error) {
conn, remoteHostname, err := mn.Open(remoteHostname)
if err != nil {