Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The current client config scheme has numerous problems:
Solution
Restructure design to allow for multiple configs:
Update ClientConf tool to support new scheme.
Protobuf Changes
New Messages
The DeploymentConfig message has the same fields as ClientConfig with two added: suported_transports and registrars. The supported_transports field is an enum previously defined in signalling.proto. The Registrar message has a field of parameters for the desired registrar type: DNS, API, and decoy.
The ClientConfig2 message houses all the DeploymentConfigs in a repeated field.
ClientConfig Tool Changes
The existing ClientConfig tool had to be updated to handle the updated CC-2.0 scheme. Since ClientConfig2 could have multiply DeployConfigs, a new flag
-update-config
is required (for edits & deletions), specifying the DeploymentConfig's index in its parent ClientConfig2. Because of this, only one DeploymentConfig can be edited at a time.When parsing registrars, the program edits, deletes, and adds a registrar in that order. Because there are too many fields in a registrar's params, the params must be set in a simple TOML file (examples for each available in the reg_toml_examples directory.)