mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
refactor windows specific session (#7170)
1. Modify the process to have the control side lead the session switching: After the control side sends a `LoginRequest`, the controlled side will add all session information and the current session ID in the `LoginResponse`. Upon receiving the `LoginResponse`, the control side will check if the current session ID matches the ID in the `LoginConfigHandler`. If they match, the control side will send the current session ID. If they don't match, a session selection dialog will pop up, the selected session id will be sent. Upon receiving this message, the controlled side will restart if different or sub service if same . 2. Always show physical console session on the top 3. Show running session and distinguish sessions with the same name 4. Not sub service until correct session id is ensured 5. Fix switch sides not work for multisession session 6. Remove all session string join/split except get_available_sessions in windows.rs 7. Fix prelogin, when share rdp is enabled and there is a rdp session, the console is in login screen, get_active_username will be the rdp's username and prelogin will be false, cm can't be created an that causes disconnection in a loop 8. Rename all user session to windows session Known issue: 1. Use current process session id for `run_as_user`, sahil says it can be wrong but I didn't reproduce. 2. Have not change tray process to current session 3. File transfer doesn't update home directory when session changed 4. When it's in login screen, remote file directory is empty, because cm have not start up Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -122,11 +122,12 @@ message PeerInfo {
|
||||
// Use JSON's key-value format which is friendly for peer to handle.
|
||||
// NOTE: Only support one-level dictionaries (for peer to update), and the key is of type string.
|
||||
string platform_additions = 12;
|
||||
WindowsSessions windows_sessions = 13;
|
||||
}
|
||||
|
||||
message RdpUserSession {
|
||||
string user_session_id = 1;
|
||||
string user_name = 2;
|
||||
message WindowsSession {
|
||||
uint32 sid = 1;
|
||||
string name = 2;
|
||||
}
|
||||
|
||||
message LoginResponse {
|
||||
@@ -594,7 +595,7 @@ message OptionMessage {
|
||||
BoolOption disable_keyboard = 12;
|
||||
// Position 13 is used for Resolution. Remove later.
|
||||
// Resolution custom_resolution = 13;
|
||||
string user_session = 14;
|
||||
BoolOption support_windows_specific_session = 14;
|
||||
}
|
||||
|
||||
message TestDelay {
|
||||
@@ -709,8 +710,9 @@ message PluginFailure {
|
||||
string msg = 3;
|
||||
}
|
||||
|
||||
message RdpUserSessions {
|
||||
repeated RdpUserSession rdp_user_sessions = 1;
|
||||
message WindowsSessions {
|
||||
repeated WindowsSession sessions = 1;
|
||||
uint32 current_sid = 2;
|
||||
}
|
||||
|
||||
message Misc {
|
||||
@@ -744,7 +746,7 @@ message Misc {
|
||||
ToggleVirtualDisplay toggle_virtual_display = 32;
|
||||
TogglePrivacyMode toggle_privacy_mode = 33;
|
||||
SupportedEncoding supported_encoding = 34;
|
||||
RdpUserSessions rdp_user_sessions = 35;
|
||||
uint32 selected_sid = 35;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user