Kaffeine/telegram-qt

Implement server configuration file

Closed this issue · 1 comments

Make the server configurable — add a config file with at least the follow options:

  • path to the private RSA key
  • list of DC Options

Probably the best option would be a json file. It could be useful to also add RSA key fingerprint (so the file itself can be encrypted but looking at the config file we can be sure that the key is the needed key) and to add an option to differ the binding address from DC Option address. E.g. we can run server on 127.0.0.1:11443 and use a reverse SSH tunnel to route requests from WAN address 99.xx.yy.66:443 (that should be listed in the DC options).

See also: TLConfig, QSettings::beginWriteArray(), Json backend for QSettings.
It is an open question whether it makes sense to use QSettings of QJsonDocument directly.

The task is done (more or less)