Commit Graph

4 Commits

Author SHA1 Message Date
John Brooks 1ac9e4f065 cli: Use 'identity.json' by default 2017-09-25 12:30:04 -06: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 4fa48bfa8f cli: Add -tor-control and -connect flags 2016-11-05 22:19:13 -06:00
John Brooks bbc58e5815 Delete backend and rename cli to ricochet-cli
ricochet-cli can act as a headless backend, so for now there is no point
to having a separate backend program. It may be reintroduced later for
multiprocess use by other frontends -- to be determined.
2016-11-05 16:59:22 -06:00