Add one-time setup links as an alternative to the QR code
A config can now be handed over as a one-time link, valid for 1 h, 24 h or 7 days and protected by a PIN by default. Keys are made only when the link is opened; the link works once and is revoked after 5 wrong PINs. Issuing a new config offers the same choice, and the current config keeps working until the link is used. Remove the option to paste a client's public key, in the web UI, the API and the iOS app.
This commit is contained in:
@@ -112,9 +112,18 @@ nonisolated struct Peer: Decodable, Identifiable, Hashable {
|
||||
let effectiveKeepalive: Int
|
||||
let created: Date
|
||||
let configIssued: Date?
|
||||
let setup: SetupInfo? // pending setup link, nil if none
|
||||
let stats: PeerStats
|
||||
}
|
||||
|
||||
/// A pending setup link as peer lists show it. The link itself is not in it.
|
||||
nonisolated struct SetupInfo: Decodable, Hashable {
|
||||
let expires: Date
|
||||
let expired: Bool
|
||||
let pinRequired: Bool
|
||||
let pinFails: Int
|
||||
}
|
||||
|
||||
nonisolated struct PeerList: Decodable {
|
||||
let peers: [Peer]
|
||||
let capacity: Int
|
||||
|
||||
Reference in New Issue
Block a user