Commit Graph

48 Commits

Author SHA1 Message Date
Dan Ballard 03b9ff1fe8 move log and conectivity packages to standalone versions
the build was successful Details
2020-02-10 14:30:32 -05:00
Dan Ballard 2fd0aa67bd fix race condition around connection count getting
the build was successful Details
2020-02-03 18:40:17 -05:00
Sarah Jamie Lewis 5a1fc1b94d Fixing Race Conditions
the build was successful Details
2019-11-07 16:21:15 -08:00
Sarah Jamie Lewis 877f01a358 Cleaning up ineffectual error checking and misspellings 2019-01-26 14:05:09 -08:00
Sarah Jamie Lewis 64ce11d436 Cleaning up and documenting examples 2019-01-23 11:38:54 -08:00
Sarah Jamie Lewis 9a680cd257 Renaming Instance and InstanceFactory
Now up to standard with go lint
2019-01-21 14:52:26 -08:00
Sarah Jamie Lewis d87a0fcb52 Add Close() Method to Connection.
Explicitly Close Connection
2019-01-21 11:19:49 -08:00
Sarah Jamie Lewis b05567fd81 Fixing Linting, Vetting & Formatting Issues 2019-01-09 15:02:09 -08:00
Sarah Jamie Lewis 90231b0be9 Remove V3 Contact Request 2019-01-08 11:09:23 -08:00
Dan Ballard b34fe84917 log api typo 2018-12-03 13:27:21 -08:00
Dan Ballard 2815e29704 adding new filterable logging system 2018-12-03 11:59:21 -08:00
Dan Ballard 38cff4212d rename local variables acn; Add bootstrap status support to ACN/torprovider 2018-11-21 22:15:35 -08:00
Dan Ballard 0d080e4332 name update 2018-11-21 15:07:57 -08:00
Dan Ballard 8fc60a0495 Mirating from bulb/asaur to bine, adding a generic Mixnet interface 2018-11-20 09:14:14 -08:00
erinn 4d3f52102f allow retrieving handlers from an aif so we can merge them in cwtch peers 2018-10-27 02:17:35 -07:00
erinn ad9d0efb02 updating chatchannels and echobot to use v3 2018-10-25 19:20:58 -07:00
Dan Ballard 29e3a42cc9 asaur-ificate package and imports 2018-10-09 16:03:20 -07:00
erinn e825e52a7c check current onion descriptors on old versions of tor to see if they're out-of-sync 2018-10-09 12:55:42 -07:00
erinn fb8c0cac27 tidying up code paths and making detport selection a little better 2018-10-09 10:14:28 -07:00
erinn 5c98fd575b make local port selection deterministic and detach from the control port to improve performance 2018-10-08 20:19:19 -07:00
erinn 8a7895a359 oops, accidentally included a future change 2018-10-08 18:50:58 -07:00
erinn fd01dca056 forking bulb 2018-10-08 18:48:37 -07:00
Sarah Jamie Lewis 5066380655 v3 onions 2018-10-05 13:06:54 -07:00
Dan Ballard e0411ecb9a fix: off by one error removing dead ricochet instances 2018-06-25 09:14:24 -07:00
Dan Ballard a852bc6678 application deletes application instance when it exit's process; adds CountConnections() 2018-06-23 08:57:22 -07:00
Sarah Jamie Lewis e382c8eb69 Rename 2018-06-08 15:05:22 -07:00
Dan Ballard 5a94afa0f7 add application integration test: (#42)
- start two peers alice, bob
- make alice requests contact with bob
- they send messages
- they shutdown
- verify (and fix) no threads leaked
- verify messages
- add inbound connection handler to chatChannelHandler
- add Open and AcceptAllContactHandler to application
2018-05-30 10:51:40 -07:00
Sarah Jamie Lewis 9980da3bd5 Fixing channelmanager race condition, deleting vendoring 2018-05-09 12:06:34 -07:00
Sarah Jamie Lewis 339995c101 Fixing gofmt 2018-01-12 13:04:20 -05:00
Sarah Jamie Lewis 6e2bfbbc14 Application comments and notes 2018-01-09 17:31:54 -08:00
Sarah Jamie Lewis 1a2fb40d91 Refactoring Application to remove channel handler duplications
Also simplfies application a lot, still not complete, but i like this approach much more
2018-01-07 16:51:46 -08:00
Sarah Jamie Lewis 049a0ea15f Stubbing OutboundVersionNegotiationTest
Actually committing enable features work!
2018-01-02 09:23:20 -08:00
Sarah Jamie Lewis f537fb4f76 Adding Simple Application Broadcast & Features Enabled 2018-01-01 10:06:58 -08:00
Sarah Jamie Lewis 1433b31e6f Change inbound/outbound handlers to use Identity.
Add Inbound Version Negotiation Test
2017-12-13 11:42:54 -08:00
Sarah Jamie Lewis 5057dd68ee Formatting + Checking Connection Error in Echobot 2017-11-02 16:45:27 -07:00
Sarah Jamie Lewis 3e6dc80670 Fixup Application to align with new Connection API 2017-11-02 16:05:01 -07:00
Sarah Jamie Lewis dc285b18a9 Merge branch 'master' of https://github.com/dballard/go-ricochet into dballard-master 2017-11-02 15:53:01 -07:00
Sarah Jamie Lewis 8fe7b84fc9 Merge branch 'fix/chatchannel-api' of https://github.com/special/go-ricochet-protocol into special-fix/chatchannel-api 2017-11-02 15:45:09 -07:00
John Brooks 9a65aeed77 Improve ContactRequestChannel's API
After the RequestOpenChannel changes, it's now possible to specify the
name and message of an outbound request as variables of the channel handler,
instead implementing an interface method to return them.

Also added the SendResponse method, which is necessary to respond to an
inbound request that was in the Pending state.
2017-11-02 15:43:07 -07:00
John Brooks c24773809e Fix and document safety problems with Connection.Do
There were several issues with the Do function that made it nearly
impossible to write safe code.

First, Do cannot be called recursively -- it will deadlock. There is
actually no way to implement a safe and recursive Do (or mutex) in Go,
because there is no primitive that will identify the current goroutine.

RequestOpenChannel used Do internally, which made it impossible to open
channels safely in many circumstances. That has been removed, so all
calls to RequestOpenChannel must be changed to happen under Do now.

Do now has more documentation and a new rule: no code exposed through
API can use Do, unless it has sole custody of the connection (such as
ProcessAuthAsClient).

Related to that problem, Do was impossible to call from inside handlers
(or anything else on the process goroutine) -- it would again just
deadlock. This is resolved by wrapping calls into user code to continue
handling invocations of Do (and only those) while the handler is
executing.

There is a third issue with connection close, but it will be addressed
in a separate commit

And finally, because it's impossible to timeout or interrupt a call to
Do, I also added a DoContext method that takes a go Context, which is
also passed through to the called function.
2017-11-02 15:41:30 -07:00
John Brooks a62d1bbcc9 Improve ChatChannel API for message acknowledgement
ChatChannel didn't return the message ID for sent messages, which made
using the returned ACKs impossible. The SendMessage method now returns
the uin32 messageID.

Also, SendMessage didn't support the TimeDelta field for messages, which
is used for queued or resent messages. This is now available as
SendMessageWithTime.

And finally, the ChatMessageAck callback didn't indicate if mesasges
were accepted or not, which is part of the protocol. That was added as a
field, which is unfortunately a breaking API change, but I've made
enough of those lately to not feel guilty about it.
2017-09-25 13:04:21 -07:00
John Brooks ea788d58ef Don't use pointers to interfaces
There are few situations where a pointer to an interface is useful in
Go, and this isn't one. Interfaces can hold types by value or pointer,
so long as that type fulfills the interface.
2017-09-23 16:44:12 -06:00
Dan Ballard f04239c885 make echobot use new SetupOnion 2017-09-04 20:33:21 -07:00
Dan Ballard 5937ceee73 Add more crypto/utils and extend SetupOnion to support unix sockets 2017-08-14 08:43:33 -07:00
Sarah Jamie Lewis 93baafc2f7 Adding bulb to godep 2017-08-05 12:48:25 -07:00
Sarah Jamie Lewis 22cbf5d738 First Cut of Applications + Bugs, Formatting 2017-07-04 11:29:11 -07:00
Dan Ballard 6f07cff0bc fix syntax errors 2017-06-10 15:20:41 -07:00
Sarah Jamie Lewis 5d767174b1 Brand new API v0.2 2017-05-02 16:33:51 -07:00