After you start a server in a tab, you can't change legacy/client auth settings, because this would require changing the saved onion key

This commit is contained in:
Micah Lee 2019-12-08 10:29:00 -08:00
parent 76d109747e
commit de57a2ce55
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
2 changed files with 13 additions and 0 deletions

View file

@ -185,6 +185,17 @@ class ModeSettingsWidget(QtWidgets.QWidget):
else:
self.client_auth_checkbox.hide()
# If the server has been started in the past, prevent changing legacy option
if self.settings.get("onion", "private_key"):
if self.legacy_checkbox.isChecked():
# If using legacy, disable legacy and client auth options
self.legacy_checkbox.setEnabled(False)
self.client_auth_checkbox.setEnabled(False)
else:
# If using v3, hide legacy and client auth options
self.legacy_checkbox.hide()
self.client_auth_checkbox.hide()
def persistent_checkbox_clicked(self):
self.settings.set("persistent", "enabled", self.persistent_checkbox.isChecked())
self.settings.set("persistent", "mode", self.tab.mode)

View file

@ -225,6 +225,8 @@ class ServerStatus(QtWidgets.QWidget):
self.copy_url_button.hide()
self.copy_hidservauth_button.hide()
self.mode_settings_widget.update_ui()
# Button
if (
self.mode == self.common.gui.MODE_SHARE