Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clientconf 2.0 #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Clientconf 2.0 #100

wants to merge 1 commit into from

Conversation

jmwample
Copy link
Member

Problem

The current client config scheme has numerous problems:

  • Supports only a single config
  • Clients must rely on hardcoded parameters

Solution

Restructure design to allow for multiple configs:

  • Create new struct DeploymentConfig similar to the old ClientConfig with added fields for supported registrars, supported transports, and version number
  • Create new struct ClientConfig2 that stores a list of all DeploymentConfigs

Update ClientConf tool to support new scheme.

Protobuf Changes

New Messages

  • DeploymentConfig
  • ClientConfig2
  • Registrar
  • RegistrarType (enum)
  • RegistrarDNSProtocol (enum)
  • DNSRegConf
  • APIRegConf
  • DecoyRegConf

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.)

* Create initial ClientConf 2.0 proto file

* Add 'Any' type to registrar

* Add CC2 conf editor (except registrar support)

* Add CC2 dev file (empty registrars)

* Add build target for CC2

* Update Registrar message

* Fix null pointer bug when decoy.Pubkey is nil

* Add simple registrar tests

* Implement -add-registrar and printing registrars
Still need to implement updating and deleting registrars

* Add example reg param files

* implement del-registrar
@jmwample jmwample changed the title Clientconf 2.0 (#94) Clientconf 2.0 Sep 30, 2022
@jmwample
Copy link
Member Author

related: #135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants