Completely finish up the raw changes to the sysadm-server so it can operator over a bridge connection (untested).

This also adds some stand-alone CLI options to the sysadm-binary utility:
"bridge_list": List any bridge connections in the settings file. Output Format: "name (url)"
"bridge_add <name> <url>": Add a bridge connection to the settings with the given name. (if websocket server is running, this change will take effect within 5 minutes).
"bridge_remove <name>": Remove a bridge connection from the settings. If a websocket server is running, this change will take effect within 5 minutes (closing the connection to the removed bridge as needed).

There is also a new option in the global server config file:
BRIDGE_CONNECTIONS_ONLY=[true/false]
If true, this will allow the websocket server to run without listening on any ports, and instead force all traffic through the existing bridge connections.
This commit is contained in:
Ken Moore
2016-05-12 10:25:16 -04:00
parent 916069ce69
commit 8a16f9a4d0
7 changed files with 123 additions and 17 deletions

View File

@@ -233,9 +233,12 @@ QString AuthorizationManager::GenerateEncCheckString(){
QString AuthorizationManager::GenerateEncString_bridge(QString str){
//Get the private key
return str; //NOT IMPLEMENTED YET
QByteArray privkey = "";//SSL_cfg.privateKey().toPem();
QFile keyfile("/usr/local/etc/sysadm/ws_bridge.key");
keyfile.open(QIODevice::ReadOnly);
QSslKey key(&keyfile, QSsl::Rsa);
QByteArray privkey = key.toPem();
keyfile.close();
//Now use this private key to encode the given string
unsigned char encode[4098] = {};
RSA *rsa= NULL;