mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-08-14 17:42:40 +08:00
add password to --connect command in flutter, --connect id [passord]
This commit is contained in:
@ -1523,6 +1523,11 @@ bool checkArguments() {
|
||||
}
|
||||
String? id =
|
||||
kBootArgs.length < connectIndex + 1 ? null : kBootArgs[connectIndex + 1];
|
||||
String? password =
|
||||
kBootArgs.length < connectIndex + 2 ? null : kBootArgs[connectIndex + 2];
|
||||
if (password != null && password.startsWith("--")) {
|
||||
password = null;
|
||||
}
|
||||
final switchUuidIndex = kBootArgs.indexOf("--switch_uuid");
|
||||
String? switchUuid = kBootArgs.length < switchUuidIndex + 1
|
||||
? null
|
||||
@ -1536,7 +1541,8 @@ bool checkArguments() {
|
||||
kBootArgs.removeAt(connectIndex);
|
||||
// fallback to peer id
|
||||
Future.delayed(Duration.zero, () {
|
||||
rustDeskWinManager.newRemoteDesktop(id, switch_uuid: switchUuid);
|
||||
rustDeskWinManager.newRemoteDesktop(id,
|
||||
password: password, switch_uuid: switchUuid);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user