diff --git a/Sources/MWBMac/SettingsWindow/SecurityPane.swift b/Sources/MWBMac/SettingsWindow/SecurityPane.swift index 6f041ea..36fc7d3 100644 --- a/Sources/MWBMac/SettingsWindow/SecurityPane.swift +++ b/Sources/MWBMac/SettingsWindow/SecurityPane.swift @@ -1,5 +1,5 @@ -// The Security pane: the shared key every packet is encrypted with, and the port -// the matrix talks on. +// The Security pane: the shared key every packet is encrypted with, which of the +// two PowerToys stream layouts to speak, and the port the matrix talks on. // // "Encryption key" / "Security key" / "To set up, generate the key on one // machine, and enter it manually on other machines" / "New key" are the modern @@ -7,10 +7,12 @@ // `MouseWithoutBorders_SecurityKey.Description`); the grouped display form and // the 16-character minimum are `Encryption.cs:65-79, 209-242`. // -// Both fields are drafts: changing either tears down and rebuilds every +// The key and the port are drafts: changing either tears down and rebuilds every // connection, so they are saved together on a button press, which is what the // Windows form's single "&Apply" does ("Save changes and reconnect to the -// machines in the matrix", `frmMatrix.Designer.cs:440-441`). +// machines in the matrix", `frmMatrix.Designer.cs:440-441`). The encryption +// compatibility picker is not a draft — one click is already a whole, deliberate +// change, and there is no half-typed state to protect against. import Foundation import MWBCore @@ -48,6 +50,23 @@ struct SecurityPane: View { } } + SettingsSection( + "Encryption compatibility", + note: + "Mouse Without Borders changed how it sets up its encrypted streams in " + + "PowerToys 0.101. The two are not compatible and cannot be negotiated, so " + + "this has to match the PowerToys version on the other machines. If the " + + "menu says a machine has the wrong encryption compatibility setting, the " + + "security key is right and this is the switch to change." + ) { + Picker("Encryption compatibility", selection: model.binding(\.macCipherScheme)) { + Text("PowerToys 0.100 and earlier").tag(CipherScheme.legacy) + Text("PowerToys 0.101 and later").tag(CipherScheme.modern) + } + .pickerStyle(.radioGroup) + .labelsHidden() + } + SettingsSection( "Port", note: