Commit Graph

17 Commits

Author SHA1 Message Date
Dan Ballard cf200dcfe4 log and stub of identity gen 2017-11-27 00:16:15 -08:00
John Brooks 32230b77c1 core: Reuse protobuf structures for configuration
The existing configuration was partially compatible with Ricochet's,
but not enough to actually be useful. It also required a bunch of
boilerplate code to copy data between configuration data structures,
internal data structures, and RPC data structures.

Protobuf conveniently supports encoding messages to JSON, and we already
need to store most data (e.g. contacts) in protobuf structures. This
commit changes the configuration to be a protobuf JSON serialization of
the Config message, which can directly reuse RPC messages like Contact.

Additionally, the RWMutex-based configuration type was a deadlock
waiting to happen. There is now a read-only clone of the configuration
available atomically at any time. Writers need an exclusive lock on the
ConfigFile object, which commits its changes to disk and readers on
unlock.
2017-09-24 16:59:44 -06:00
John Brooks b5301c2782 Implement inbound contact request protocol
This implements a handler for inbound contact request connections,
taking advantage of the synchronous Process API.

This is largely untested code at the moment.
2017-09-23 19:19:24 -06:00
John Brooks 0c187e72a0 Port core to the new go-ricochet API
This includes connection management and enough to compile, but doesn't
reimplement most of the protocol messages and functionality yet. There
are problems noted throughout the code, also.
2017-09-23 19:17:43 -06:00
John Brooks dcda924d56 core: Implement inbound contact requests
This does not yet include persistence of inbound requests in the config,
and it's mostly untested, but it's more or less complete.
2017-08-10 11:26:09 -06:00
John Brooks 9c0110dca2 core: Use consistent functions to validate and convert address formats 2016-11-05 21:27:13 -06:00
John Brooks 1c0c3242eb core: Improve start/stop of contact connections 2016-10-28 16:17:19 -06:00
John Brooks 8baf1034f6 core: RPC and config for outbound contact requests 2016-10-27 14:18:00 -06:00
John Brooks d37d40def4 Change imports after moving repository 2016-10-16 22:26:35 -06:00
John Brooks 7fe2363801 core: More of the conversation implementation
Improved parts of the conversation implementation, moved the
conversation event monitor to Identity, added event monitor
population, and other minor changes.
2016-10-15 18:04:19 -06:00
John Brooks f9bc09c520 core: Adapt to protocol API changes 2016-10-09 17:31:26 -07:00
John Brooks a52de9078c core: Attach protocol connections to Contact 2016-09-15 18:32:58 -06:00
John Brooks cf903a3b7d core: Add protocol from s-rah and accept inbound connections
Start using Sarah's protocol implementation (plus some patches to be
merged there), publish the local onion service, and handle inbound
connections.
2016-09-11 21:38:04 -06:00
John Brooks 83d4d8841d core: Change the 'Ricochet' API again 2016-09-10 23:00:26 -06:00
John Brooks 2c4a1c8b37 core: Load contacts from config 2016-08-29 20:46:41 -06:00
John Brooks b74073fd09 core: Load identity from config
Also, slightly refactor Ricochet to be an interface to get the various
top-level components, and let the implementation define it (such as
backend's RicochetCore RPC type)
2016-08-29 19:50:10 -06:00
John Brooks 0508f0b5e3 Skeleton of core API 2016-06-30 21:18:55 -06:00