Refactor and cleanup.

This commit is contained in:
Jared Goodwin 2020-04-11 09:52:46 -07:00
parent 4005db4fa5
commit 337754df1a
169 changed files with 218 additions and 875 deletions

View File

@ -1,14 +1,4 @@
using Remotely.Agent.Installer.Win.Services;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using System.Windows;
using System.Windows;
namespace Remotely.Agent.Installer.Win
{

View File

@ -1,19 +1,7 @@
using Remotely.Agent.Installer.Win.Services;
using Remotely.Agent.Installer.Win.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Remotely.Agent.Installer.Win
{

View File

@ -1,6 +1,4 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;

View File

@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace Remotely.Agent.Installer.Win.Services

View File

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace Remotely.Agent.Installer.Win.Services

View File

@ -12,7 +12,6 @@ using System.Net;
using System.Reflection;
using System.Security.Principal;
using System.ServiceProcess;
using System.Text;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
using System.Windows;
@ -24,7 +23,7 @@ namespace Remotely.Agent.Installer.Win.Services
public event EventHandler<string> ProgressMessageChanged;
public event EventHandler<int> ProgressValueChanged;
public static string CoreRuntimeVersion => "3.1.2";
public static string CoreRuntimeVersion => "3.1.3";
private string InstallPath => Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "Program Files", "Remotely");
private string Platform => Environment.Is64BitOperatingSystem ? "x64" : "x86";
private JavaScriptSerializer Serializer { get; } = new JavaScriptSerializer();
@ -330,11 +329,11 @@ namespace Remotely.Agent.Installer.Win.Services
var downloadUrl = string.Empty;
if (Environment.Is64BitOperatingSystem)
{
downloadUrl = "https://download.visualstudio.microsoft.com/download/pr/3240250e-6fe0-4258-af69-85abef6c00de/e01ee0af6c65d894f4a02bdf6705ec7b/windowsdesktop-runtime-3.1.2-win-x64.exe";
downloadUrl = "https://download.visualstudio.microsoft.com/download/pr/5954c748-86a1-4823-9e7d-d35f6039317a/169e82cbf6fdeb678c5558c5d0a83834/windowsdesktop-runtime-3.1.3-win-x64.exe";
}
else
{
downloadUrl = "https://download.visualstudio.microsoft.com/download/pr/b824906f-bd6e-4067-86a6-95c61620674d/cfcdab84a01cee94fdaa31271c3d4d47/windowsdesktop-runtime-3.1.2-win-x86.exe";
downloadUrl = "https://download.visualstudio.microsoft.com/download/pr/7cd5c874-5d11-4e72-81f0-4a005d956708/0eb310169770c893407169fc3abaac4f/windowsdesktop-runtime-3.1.3-win-x86.exe";
}
var targetFile = Path.Combine(Path.GetTempPath(), "windowsdesktop-runtime.exe");
await client.DownloadFileTaskAsync(downloadUrl, targetFile);

View File

@ -1,11 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Remotely.Agent.Installer.Win.Services
{

View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows;
namespace Remotely.Agent.Installer.Win.Services
{

View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
namespace Remotely.Agent.Installer.Win.Services
{

View File

@ -1,15 +1,12 @@
using Remotely.Agent.Installer.Win.Services;
using Remotely.Shared.Models;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Security.Principal;
using System.ServiceProcess;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
using System.Windows;

View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
namespace Remotely.Agent.Installer.Win.ViewModels
{

View File

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO.Pipes;
using System.Text;
using System.IO.Pipes;
namespace Remotely.Agent.Models
{

View File

@ -1,23 +1,17 @@
using Remotely.Agent.Services;
using Remotely.Shared.Services;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.ServiceProcess;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Threading;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Remotely.Shared.Utilities;
namespace Remotely.Agent
{
public class Program
{
public static bool IsDebug { get; set; }
public static IServiceProvider Services { get; set; }
@ -65,7 +59,7 @@ namespace Remotely.Agent
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Logger.Write(e.ExceptionObject as Exception);
if (OSUtils.IsWindows)
if (EnvironmentHelper.IsWindows)
{
// Remove Secure Attention Sequence policy to allow app to simulate Ctrl + Alt + Del.
var subkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", true);
@ -76,43 +70,16 @@ namespace Remotely.Agent
}
}
private static async Task HandleConnection()
{
while (true)
{
try
{
if (!Services.GetRequiredService<DeviceSocket>().IsConnected)
{
var waitTime = new Random().Next(1000, 30000);
Logger.Write($"Websocket closed. Reconnecting in {waitTime / 1000} seconds...");
await Task.Delay(waitTime);
await Services.GetRequiredService<DeviceSocket>().Connect();
await Services.GetRequiredService<Updater>().CheckForUpdates();
}
}
catch (Exception ex)
{
Logger.Write(ex);
}
Thread.Sleep(1000);
}
}
private static async Task Init()
{
try
{
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
#if DEBUG
IsDebug = true;
#endif
SetWorkingDirectory();
if (!IsDebug && OSUtils.IsWindows)
if (!EnvironmentHelper.IsDebug && EnvironmentHelper.IsWindows)
{
_ = Task.Run(() =>
{
@ -120,7 +87,7 @@ namespace Remotely.Agent
});
}
if (!IsDebug)
if (!EnvironmentHelper.IsDebug)
{
await Services.GetRequiredService<Updater>().BeginChecking();
}
@ -130,7 +97,7 @@ namespace Remotely.Agent
}
finally
{
await HandleConnection();
await Services.GetRequiredService<DeviceSocket>().HandleConnection();
}
}

View File

@ -1,13 +1,12 @@
using Microsoft.AspNetCore.SignalR.Client;
using Remotely.Shared.Models;
using Remotely.Shared.Services;
using Remotely.Shared.Utilities;
using Remotely.Shared.Win32;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Remotely.Agent.Services
@ -25,7 +24,7 @@ namespace Remotely.Agent.Services
{
try
{
var rcBinaryPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ScreenCast", OSUtils.ScreenCastExecutableFileName);
var rcBinaryPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ScreenCast", EnvironmentHelper.ScreenCastExecutableFileName);
if (!File.Exists(rcBinaryPath))
{
await hubConnection.SendAsync("DisplayMessage", "Chat executable not found on target device.", "Executable not found on device.", requesterID);
@ -34,10 +33,10 @@ namespace Remotely.Agent.Services
// Start ScreenCast.
await hubConnection.SendAsync("DisplayMessage", $"Starting chat service...", "Starting chat service.", requesterID);
if (OSUtils.IsWindows)
if (EnvironmentHelper.IsWindows)
{
if (Program.IsDebug)
if (EnvironmentHelper.IsDebug)
{
return Process.Start(rcBinaryPath, $"-mode Chat -requester {requesterID} -organization \"{orgName}\"").Id;
}
@ -54,7 +53,7 @@ namespace Remotely.Agent.Services
}
}
}
else if (OSUtils.IsLinux)
else if (EnvironmentHelper.IsLinux)
{
var args = $"xterm -e {rcBinaryPath} -mode Chat -requester {requesterID} -organization \"{orgName}\" & disown";
return StartLinuxScreenCaster(args);
@ -72,7 +71,7 @@ namespace Remotely.Agent.Services
{
try
{
var rcBinaryPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ScreenCast", OSUtils.ScreenCastExecutableFileName);
var rcBinaryPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ScreenCast", EnvironmentHelper.ScreenCastExecutableFileName);
if (!File.Exists(rcBinaryPath))
{
await hubConnection.SendAsync("DisplayMessage", "Remote control executable not found on target device.", "Executable not found on device.", requesterID);
@ -82,10 +81,10 @@ namespace Remotely.Agent.Services
// Start ScreenCast.
await hubConnection.SendAsync("DisplayMessage", $"Starting remote control...", "Starting remote control.", requesterID);
if (OSUtils.IsWindows)
if (EnvironmentHelper.IsWindows)
{
if (Program.IsDebug)
if (EnvironmentHelper.IsDebug)
{
Process.Start(rcBinaryPath, $"-mode Unattended -requester {requesterID} -serviceid {serviceID} -deviceid {ConnectionInfo.DeviceID} -host {ConnectionInfo.Host}");
}
@ -98,7 +97,7 @@ namespace Remotely.Agent.Services
}
}
}
else if (OSUtils.IsLinux)
else if (EnvironmentHelper.IsLinux)
{
var args = $"{rcBinaryPath} -mode Unattended -requester {requesterID} -serviceid {serviceID} -deviceid {ConnectionInfo.DeviceID} -host {ConnectionInfo.Host} & disown";
StartLinuxScreenCaster(args);
@ -114,12 +113,12 @@ namespace Remotely.Agent.Services
{
try
{
var rcBinaryPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ScreenCast", OSUtils.ScreenCastExecutableFileName);
var rcBinaryPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ScreenCast", EnvironmentHelper.ScreenCastExecutableFileName);
// Start ScreenCast.
if (OSUtils.IsWindows)
if (EnvironmentHelper.IsWindows)
{
Logger.Write("Restarting screen caster.");
if (Program.IsDebug)
if (EnvironmentHelper.IsDebug)
{
Process.Start(rcBinaryPath, $"-mode Unattended -requester {requesterID} -serviceid {serviceID} -deviceid {ConnectionInfo.DeviceID} -host {ConnectionInfo.Host} -relaunch true -viewers {String.Join(",", viewerIDs)}");
}
@ -146,7 +145,7 @@ namespace Remotely.Agent.Services
}
}
}
else if (OSUtils.IsLinux)
else if (EnvironmentHelper.IsLinux)
{
var args = $"{rcBinaryPath} -mode Unattended -requester {requesterID} -serviceid {serviceID} -deviceid {ConnectionInfo.DeviceID} -host {ConnectionInfo.Host} -relaunch true -viewers {string.Join(",", viewerIDs)} & disown";
StartLinuxScreenCaster(args);
@ -164,7 +163,7 @@ namespace Remotely.Agent.Services
{
var xauthority = string.Empty;
var processes = OSUtils.StartProcessWithResults("ps", "-eaf").Split(Environment.NewLine);
var processes = EnvironmentHelper.StartProcessWithResults("ps", "-eaf").Split(Environment.NewLine);
var xorgLine = processes.FirstOrDefault(x => x.Contains("xorg"));
var xorgSplit = xorgLine.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries).ToList();
var auth = xorgSplit[xorgSplit.IndexOf("-auth") + 1];
@ -174,7 +173,7 @@ namespace Remotely.Agent.Services
}
var display = ":0";
var whoString = OSUtils.StartProcessWithResults("w", "-h")?.Trim();
var whoString = EnvironmentHelper.StartProcessWithResults("w", "-h")?.Trim();
var username = string.Empty;
if (!string.IsNullOrWhiteSpace(whoString))

View File

@ -1,8 +1,6 @@
using Remotely.Shared.Models;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Threading;
using System.Collections.Concurrent;
using Microsoft.Extensions.DependencyInjection;

View File

@ -1,10 +1,7 @@
using Remotely.Shared.Models;
using Newtonsoft.Json;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Threading;
using Microsoft.Extensions.DependencyInjection;

View File

@ -1,14 +1,11 @@
using Microsoft.AspNetCore.SignalR.Client;
using Remotely.Agent.Models;
using Remotely.Shared.Services;
using Remotely.Shared.Utilities;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Pipes;
using System.Linq;
using System.Runtime.Caching;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@ -44,7 +41,7 @@ namespace Remotely.Agent.Services
ChatSession chatSession;
if (!ChatClients.Contains(senderConnectionID))
{
var rcBinaryPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ScreenCast", OSUtils.ScreenCastExecutableFileName);
var rcBinaryPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ScreenCast", EnvironmentHelper.ScreenCastExecutableFileName);
var procID = await AppLauncher.LaunchChatService(orgName, senderConnectionID, hubConnection);
var clientPipe = new NamedPipeClientStream(".", "Remotely_Chat" + senderConnectionID, PipeDirection.InOut, PipeOptions.Asynchronous);

View File

@ -1,7 +1,6 @@
using Microsoft.AspNetCore.SignalR.Client;
using Remotely.Shared.Services;
using Remotely.Shared.Utilities;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
@ -41,7 +40,7 @@ namespace Remotely.Agent.Services
break;
}
case "winps":
if (OSUtils.IsWindows)
if (EnvironmentHelper.IsWindows)
{
var result = WindowsPS.GetCurrent(senderConnectionID).WriteInput(command, commandID);
var serializedResult = JsonSerializer.Serialize(result);
@ -57,7 +56,7 @@ namespace Remotely.Agent.Services
}
break;
case "cmd":
if (OSUtils.IsWindows)
if (EnvironmentHelper.IsWindows)
{
var result = CMD.GetCurrent(senderConnectionID).WriteInput(command, commandID);
var serializedResult = JsonSerializer.Serialize(result);
@ -73,7 +72,7 @@ namespace Remotely.Agent.Services
}
break;
case "bash":
if (OSUtils.IsLinux)
if (EnvironmentHelper.IsLinux)
{
var result = Bash.GetCurrent(senderConnectionID).WriteInput(command, commandID);
var serializedResult = JsonSerializer.Serialize(result);
@ -111,21 +110,21 @@ namespace Remotely.Agent.Services
break;
case "winps":
if (OSUtils.IsWindows)
if (EnvironmentHelper.IsWindows)
{
var result = WindowsPS.GetCurrent(senderUserName).WriteInput(command, commandID);
await SendResultsViaAjax("WinPS", result);
}
break;
case "cmd":
if (OSUtils.IsWindows)
if (EnvironmentHelper.IsWindows)
{
var result = CMD.GetCurrent(senderUserName).WriteInput(command, commandID);
await SendResultsViaAjax("CMD", result);
}
break;
case "bash":
if (OSUtils.IsLinux)
if (EnvironmentHelper.IsLinux)
{
var result = Bash.GetCurrent(senderUserName).WriteInput(command, commandID);
await SendResultsViaAjax("Bash", result);

View File

@ -1,9 +1,9 @@
using Remotely.Shared.Models;
using Remotely.Shared.Utilities;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text.Json;
namespace Remotely.Agent.Services
@ -45,7 +45,7 @@ namespace Remotely.Agent.Services
public ConnectionInfo GetConnectionInfo()
{
if (Program.IsDebug && Debugger.IsAttached)
if (EnvironmentHelper.IsDebug && Debugger.IsAttached)
{
return new ConnectionInfo()
{

View File

@ -3,17 +3,16 @@ using Remotely.Shared.Services;
using Microsoft.AspNetCore.SignalR.Client;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
using System.Reflection;
using Remotely.Shared.Win32;
using Microsoft.Extensions.DependencyInjection;
using System.Text.Json;
using System.Threading;
namespace Remotely.Agent.Services
{
@ -39,7 +38,7 @@ namespace Remotely.Agent.Services
private CommandExecutor CommandExecutor { get; }
private ConfigService ConfigService { get; }
private ConnectionInfo ConnectionInfo { get; set; }
private Timer HeartbeatTimer { get; set; }
private System.Timers.Timer HeartbeatTimer { get; set; }
private HubConnection HubConnection { get; set; }
private bool IsServerVerified { get; set; }
private ScriptRunner ScriptRunner { get; }
@ -89,11 +88,34 @@ namespace Remotely.Agent.Services
}
HeartbeatTimer?.Dispose();
HeartbeatTimer = new Timer(TimeSpan.FromMinutes(5).TotalMilliseconds);
HeartbeatTimer = new System.Timers.Timer(TimeSpan.FromMinutes(5).TotalMilliseconds);
HeartbeatTimer.Elapsed += HeartbeatTimer_Elapsed;
HeartbeatTimer.Start();
}
public async Task HandleConnection()
{
while (true)
{
try
{
if (!IsConnected)
{
var waitTime = new Random().Next(1000, 30000);
Logger.Write($"Websocket closed. Reconnecting in {waitTime / 1000} seconds...");
await Task.Delay(waitTime);
await Program.Services.GetRequiredService<DeviceSocket>().Connect();
await Program.Services.GetRequiredService<Updater>().CheckForUpdates();
}
}
catch (Exception ex)
{
Logger.Write(ex);
}
Thread.Sleep(1000);
}
}
public async Task SendHeartbeat()
{
var currentInfo = await DeviceInformation.Create(ConnectionInfo.DeviceID, ConnectionInfo.OrganizationID);

View File

@ -1,12 +1,8 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Remotely.Agent.Services
{

View File

@ -1,11 +1,8 @@
using Remotely.Shared.Models;
using Newtonsoft.Json;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
using System.Text;
using System.Timers;
using Microsoft.Extensions.DependencyInjection;

View File

@ -1,10 +1,8 @@
using Microsoft.AspNetCore.SignalR.Client;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace Remotely.Agent.Services

View File

@ -1,11 +1,7 @@
using Remotely.Shared.Services;
using Remotely.Shared.Utilities;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Management.Automation;
using System.Text;
namespace Remotely.Agent.Services
{
@ -13,13 +9,13 @@ namespace Remotely.Agent.Services
{
public void UninstallAgent()
{
if (OSUtils.IsWindows)
if (EnvironmentHelper.IsWindows)
{
Process.Start("cmd.exe", "/c sc delete Remotely_Service");
var currentDir = AppDomain.CurrentDomain.BaseDirectory;
Process.Start("cmd.exe", $"/c timeout 5 & rd /s /q \"{currentDir}\"");
}
else if (OSUtils.IsLinux)
else if (EnvironmentHelper.IsLinux)
{
Process.Start("sudo", "systemctl stop remotely-agent").WaitForExit();
Directory.Delete("/usr/local/bin/Remotely", true);

View File

@ -1,15 +1,11 @@
using Remotely.Shared.Services;
using Microsoft.AspNetCore.SignalR.Client;
using System;
using System;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Management.Automation;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Linq;
using System.Threading;
using Remotely.Shared.Utilities;
namespace Remotely.Agent.Services
{
@ -60,7 +56,7 @@ namespace Remotely.Agent.Services
await Task.Delay(TimeSpan.FromSeconds(waitTime));
Logger.Write($"Service Updater: Downloading installer.");
if (OSUtils.IsWindows)
if (EnvironmentHelper.IsWindows)
{
var filePath = Path.Combine(Path.GetTempPath(), "Remotely_Installer.exe");
@ -75,7 +71,7 @@ namespace Remotely.Agent.Services
Process.Start(filePath, $"-install -quiet -serverurl {connectionInfo.Host} -organizationid {connectionInfo.OrganizationID}");
}
else if (OSUtils.IsLinux)
else if (EnvironmentHelper.IsLinux)
{
var filePath = Path.Combine(Path.GetTempPath(), "RemotelyUpdate.sh");

View File

@ -2,9 +2,7 @@
using Remotely.Shared.Models;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Threading;
namespace Remotely.Agent.Services

View File

@ -1,12 +1,7 @@
using Remotely.Shared.Services;
using Remotely.Shared.Utilities;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.ServiceProcess;
using System.Text;
namespace Remotely.Agent.Services
{
@ -46,12 +41,9 @@ namespace Remotely.Agent.Services
try
{
if (OSUtils.IsWindows)
{
// Set Secure Attention Sequence policy to allow app to simulate Ctrl + Alt + Del.
var subkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", true);
subkey.SetValue("SoftwareSASGeneration", "3", Microsoft.Win32.RegistryValueKind.DWord);
}
// Set Secure Attention Sequence policy to allow app to simulate Ctrl + Alt + Del.
var subkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", true);
subkey.SetValue("SoftwareSASGeneration", "3", Microsoft.Win32.RegistryValueKind.DWord);
}
catch (Exception ex)
{
@ -63,14 +55,11 @@ namespace Remotely.Agent.Services
{
try
{
if (OSUtils.IsWindows)
// Remove Secure Attention Sequence policy to allow app to simulate Ctrl + Alt + Del.
var subkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", true);
if (subkey.GetValue("SoftwareSASGeneration") != null)
{
// Remove Secure Attention Sequence policy to allow app to simulate Ctrl + Alt + Del.
var subkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", true);
if (subkey.GetValue("SoftwareSASGeneration") != null)
{
subkey.DeleteValue("SoftwareSASGeneration");
}
subkey.DeleteValue("SoftwareSASGeneration");
}
}
catch (Exception ex)

View File

@ -1,9 +1,6 @@
using System;
using Avalonia;
using Avalonia;
using Avalonia.Logging.Serilog;
using Avalonia.ReactiveUI;
using Remotely.Desktop.Linux.ViewModels;
using Remotely.Desktop.Linux.Views;
namespace Remotely.Desktop.Linux
{

View File

@ -1,11 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
namespace Remotely.Desktop.Linux.Services
{

View File

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace Remotely.Desktop.Linux.Services

View File

@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using System.Windows.Input;
using Avalonia.Controls;
using ReactiveUI;
using Remotely.Desktop.Linux.Services;

View File

@ -12,19 +12,17 @@ using Remotely.ScreenCast.Core.Services;
using Remotely.ScreenCast.Core.Communication;
using Remotely.ScreenCast.Linux.Services;
using Remotely.Shared.Models;
using Remotely.Shared.Services;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Remotely.Shared.Utilities;
namespace Remotely.Desktop.Linux.ViewModels
{
@ -38,7 +36,7 @@ namespace Remotely.Desktop.Linux.ViewModels
public MainWindowViewModel()
{
Current = this;
if (!OSUtils.IsLinux)
if (!EnvironmentHelper.IsLinux)
{
return;
}

View File

@ -1,9 +1,6 @@
using Avalonia.Controls;
using Remotely.Desktop.Linux.Controls;
using Remotely.Desktop.Linux.Services;
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Input;
namespace Remotely.Desktop.Linux.ViewModels

View File

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using ReactiveUI;
using ReactiveUI;
namespace Remotely.Desktop.Linux.ViewModels
{

View File

@ -2,7 +2,6 @@
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Remotely.Desktop.Linux.ViewModels;
using System.Threading.Tasks;
namespace Remotely.Desktop.Linux.Views
{

View File

@ -1,16 +1,9 @@
using Microsoft.Extensions.DependencyInjection;
using Remotely.Desktop.Win.Services;
using Remotely.Desktop.Win.ViewModels;
using Remotely.ScreenCast.Core;
using Remotely.ScreenCast.Core.Services;
using Remotely.Shared.Win32;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using System.Windows;
namespace Remotely.Desktop.Win

View File

@ -1,17 +1,4 @@
using Remotely.Desktop.Win.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows;
namespace Remotely.Desktop.Win.Controls
{

View File

@ -1,23 +1,11 @@
using Remotely.Desktop.Win.ViewModels;
using Remotely.ScreenCast.Core.Models;
using Remotely.ScreenCast.Core.Services;
using Remotely.Shared.Win32;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Remotely.Desktop.Win
{

View File

@ -1,11 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
namespace Remotely.Desktop.Win.Services
{

View File

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace Remotely.Desktop.Win.Services

View File

@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Remotely.Desktop.Win.ViewModels
namespace Remotely.Desktop.Win.ViewModels
{
public class HostNamePromptViewModel : ViewModelBase
{

View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
namespace Remotely.Desktop.Win.ViewModels
{

View File

@ -1,20 +1,15 @@
using Microsoft.AspNetCore.SignalR.Client;
using Remotely.Shared.Models;
using Remotely.ScreenCast.Core.Models;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.IO;
using System.Net;
using Remotely.ScreenCast.Core.Services;
using Remotely.ScreenCast.Core.Interfaces;
using Remotely.Shared.Win32;
using Microsoft.Extensions.DependencyInjection;
using Remotely.Shared.Services;
namespace Remotely.ScreenCast.Core.Communication
{

View File

@ -4,10 +4,7 @@ using Remotely.ScreenCast.Core.Services;
using Remotely.Shared.Models;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Remotely.ScreenCast.Core.Communication

View File

@ -1,6 +1,5 @@
using Remotely.Shared.Models;
using Remotely.ScreenCast.Core.Enums;
using Remotely.ScreenCast.Core.Interfaces;
using Remotely.ScreenCast.Core.Models;
using Remotely.ScreenCast.Core.Communication;
using Remotely.ScreenCast.Core.Services;
@ -16,9 +15,6 @@ namespace Remotely.ScreenCast.Core
public Conductor(CasterSocket casterSocket)
{
CasterSocket = casterSocket;
#if DEBUG
IsDebug = true;
#endif
}
public event EventHandler<ScreenCastRequest> ScreenCastRequested;
@ -33,7 +29,6 @@ namespace Remotely.ScreenCast.Core
public CasterSocket CasterSocket { get; private set; }
public string DeviceID { get; private set; }
public string Host { get; private set; }
public bool IsDebug { get; }
public AppMode Mode { get; private set; }
public string OrganizationName { get; private set; }
public string RequesterID { get; private set; }

View File

@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Remotely.ScreenCast.Core.Enums
namespace Remotely.ScreenCast.Core.Enums
{
public enum AppMode
{

View File

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Remotely.ScreenCast.Core.Interfaces
namespace Remotely.ScreenCast.Core.Interfaces
{
public interface IAudioCapturer
{

View File

@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Remotely.ScreenCast.Core.Interfaces
{

View File

@ -1,9 +1,4 @@
using Remotely.ScreenCast.Core.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Remotely.ScreenCast.Core.Interfaces
{

View File

@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Remotely.ScreenCast.Core.Interfaces
{

View File

@ -1,7 +1,4 @@
using Remotely.Shared.Models;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace Remotely.ScreenCast.Core.Interfaces

View File

@ -2,10 +2,7 @@
using Remotely.ScreenCast.Core.Interfaces;
using Remotely.ScreenCast.Core.Services;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Threading.Tasks;
namespace Remotely.ScreenCast.Core.Models

View File

@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Remotely.ScreenCast.Core
{

View File

@ -1,11 +1,6 @@
using Remotely.ScreenCast.Core.Communication;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System;
using System.IO;
using System.IO.Pipes;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

View File

@ -1,8 +1,6 @@
using Remotely.ScreenCast.Core.Models;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Text;
using System.Timers;
namespace Remotely.ScreenCast.Core.Services

View File

@ -1,23 +1,15 @@
using Microsoft.AspNetCore.SignalR.Client;
using Remotely.ScreenCast.Core.Models;
using Remotely.ScreenCast.Core.Models;
using Remotely.ScreenCast.Core.Communication;
using Remotely.ScreenCast.Core.Services;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Remotely.Shared.Services;
using Remotely.Shared.Win32;
using Remotely.ScreenCast.Core.Interfaces;
using System.Diagnostics;
using System.Threading;
using System.Drawing.Imaging;
using Microsoft.Extensions.DependencyInjection;
using Remotely.ScreenCast.Core.Utilities;
using Remotely.Shared.Utilities;
namespace Remotely.ScreenCast.Core.Services
{
@ -53,7 +45,7 @@ namespace Remotely.ScreenCast.Core.Services
conductor.InvokeViewerAdded(viewer);
}
if (OSUtils.IsWindows)
if (EnvironmentHelper.IsWindows)
{
await InitializeWebRtc(viewer, casterSocket);
}
@ -82,7 +74,7 @@ namespace Remotely.ScreenCast.Core.Services
break;
}
if (conductor.IsDebug)
if (EnvironmentHelper.IsDebug)
{
while (fpsQueue.Any() && DateTimeOffset.Now - fpsQueue.Peek() > TimeSpan.FromSeconds(1))
{

View File

@ -1,14 +1,9 @@
using Remotely.ScreenCast.Core.Models;
using System;
using System.Collections.Generic;
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Threading.Tasks;
namespace Remotely.ScreenCast.Core.Utilities
{

View File

@ -1,7 +1,4 @@
using Remotely.ScreenCast.Core.Interfaces;
using System;
using System.Collections.Generic;
using System.Text;
namespace Remotely.ScreenCast.Linux.Services
{

View File

@ -1,10 +1,8 @@
using Remotely.ScreenCast.Core.Interfaces;
using Remotely.ScreenCast.Core.Services;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
namespace Remotely.ScreenCast.Linux.Services
{

View File

@ -1,11 +1,7 @@
using Remotely.ScreenCast.Core.Interfaces;
using Remotely.ScreenCast.Core.Services;
using Remotely.ScreenCast.Linux.X11Interop;
using Remotely.ScreenCast.Core;
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using Remotely.ScreenCast.Core.Models;
namespace Remotely.ScreenCast.Linux.Services

View File

@ -7,7 +7,6 @@ using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace Remotely.ScreenCast.Linux.Services
{

View File

@ -6,7 +6,6 @@ using Remotely.Shared.Models;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using System.Threading.Tasks;
namespace Remotely.ScreenCast.Linux.Services

View File

@ -25,11 +25,7 @@ in this Software without prior written authorization from The Open Group.
*/
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using System.Text;
namespace Remotely.ScreenCast.Linux.X11Interop
{

View File

@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
namespace Remotely.ScreenCast.Linux.X11Interop
{

View File

@ -1,8 +1,6 @@
using SharpDX.Direct3D11;
using SharpDX.DXGI;
using System;
using System.Collections.Generic;
using System.Text;
namespace Remotely.ScreenCast.Win.Models
{

View File

@ -3,7 +3,6 @@ using Remotely.ScreenCast.Core;
using Remotely.ScreenCast.Core.Services;
using System;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Remotely.Shared.Win32;
using System.Threading;
@ -12,7 +11,6 @@ using Remotely.ScreenCast.Core.Interfaces;
using Remotely.ScreenCast.Core.Communication;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System.Windows.Forms;
namespace Remotely.ScreenCast.Win
{

View File

@ -1,11 +1,7 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
using Microsoft.Extensions.DependencyInjection;
using NAudio.Wave;
using Remotely.ScreenCast.Core;

View File

@ -1,13 +1,8 @@
using Remotely.ScreenCast.Core.Interfaces;
using Remotely.ScreenCast.Core.Services;
using Remotely.ScreenCast.Core.Communication;
using Remotely.Shared.Win32;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Remotely.ScreenCast.Win.Services

View File

@ -1,14 +1,8 @@
using Remotely.ScreenCast.Core;
using Remotely.ScreenCast.Core.Models;
using System;
using System.Collections.Generic;
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
using System.Windows.Forms;
using Remotely.Shared.Win32;

View File

@ -9,6 +9,7 @@ using Remotely.ScreenCast.Core.Services;
using System.Collections.Concurrent;
using System.Threading.Tasks;
using Remotely.ScreenCast.Core;
using System.Runtime.InteropServices;
namespace Remotely.ScreenCast.Win.Services
{
@ -16,7 +17,7 @@ namespace Remotely.ScreenCast.Win.Services
{
public KeyboardMouseInputWin()
{
StartInputActionThread();
StartInputActionTask();
Application.ApplicationExit += Application_ApplicationExit;
}
@ -24,7 +25,7 @@ namespace Remotely.ScreenCast.Win.Services
private ConcurrentQueue<Action> InputActions { get; } = new ConcurrentQueue<Action>();
private Thread InputActionsThread { get; set; }
private Task InputActionsTask { get; set; }
private bool IsInputBlocked { get; set; }
@ -320,54 +321,36 @@ namespace Remotely.ScreenCast.Win.Services
return keyCode;
}
private void StartInputActionThread()
private void StartInputActionTask()
{
InputActionsThread?.Abort();
InputActionsThread = new Thread(() =>
InputActionsTask?.Dispose();
InputActionsTask = Task.Run(CheckQueue);
}
private void CheckQueue()
{
while (!ShutdownStarted && !Environment.HasShutdownStarted)
{
while (!ShutdownStarted && !Environment.HasShutdownStarted)
if (InputActions.TryDequeue(out var action))
{
if (InputActions.TryDequeue(out var action))
{
action();
}
Thread.Sleep(1);
action();
}
});
InputActionsThread.SetApartmentState(ApartmentState.STA);
InputActionsThread.Start();
Thread.Sleep(1);
}
}
private void TryOnInputDesktop(Action inputAction)
{
if (!InputActionsThread.IsAlive)
if (InputActionsTask.Status != TaskStatus.Running)
{
StartInputActionThread();
StartInputActionTask();
}
InputActions.Enqueue(() =>
{
if (!Win32Interop.SwitchToInputDesktop())
{
if (IsInputBlocked)
{
BlockInput(false);
}
Task.Run(() =>
{
Win32Interop.SwitchToInputDesktop();
inputAction();
}).Wait();
if (IsInputBlocked)
{
BlockInput(true);
}
}
else
{
inputAction();
Logger.Write("Switch failed. Last Error: " + Marshal.GetLastWin32Error().ToString());
}
inputAction();
});
}
}

View File

@ -26,17 +26,13 @@ using Remotely.ScreenCast.Core.Services;
using Remotely.ScreenCast.Win.Models;
using Remotely.Shared.Win32;
using SharpDX;
using SharpDX.Direct3D;
using SharpDX.Direct3D11;
using SharpDX.DXGI;
using SharpDX.Mathematics.Interop;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
namespace Remotely.ScreenCast.Win.Services

View File

@ -1,17 +1,12 @@
using Remotely.ScreenCast.Core.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Remotely.ScreenCast.Core.Enums;
using Remotely.ScreenCast.Core.Services;
using Remotely.ScreenCast.Core;
using Remotely.ScreenCast.Core.Models;
using Remotely.Shared.Models;
using Remotely.Shared.Win32;
using Microsoft.Extensions.DependencyInjection;
using System.Threading;
namespace Remotely.ScreenCast.Win.Services
{

View File

@ -1,10 +1,7 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Remotely.Server.Services;
using System;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
namespace Remotely.Server.API
{

View File

@ -1,14 +1,10 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using Remotely.Server.Auth;
using Remotely.Server.Services;
using Remotely.Shared.Models;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;

View File

@ -1,22 +1,15 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.FileProviders;
using Microsoft.AspNetCore.Hosting;
using Remotely.Server.Services;
using Remotely.Server.Auth;
using Remotely.Shared.Models;
using System.Text.Json;
using System.Text;
using Microsoft.Extensions.Configuration;
using System.Diagnostics;
using System.Threading;
using Remotely.Shared.Services;
namespace Remotely.Server.API
{

View File

@ -1,14 +1,11 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
using Remotely.Shared.Models;
using Remotely.Server.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Remotely.Server.Auth;

View File

@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Collections.Generic;
using Remotely.Shared.Models;
using Remotely.Server.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Remotely.Server.Auth;

View File

@ -1,13 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Remotely.Server.Services;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Net.Http.Headers;
// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860

View File

@ -1,13 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
using Remotely.Shared.Models;
using Remotely.Server.Data;
using Remotely.Server.Models;
using Remotely.Server.Services;
using Microsoft.AspNetCore.SignalR;

View File

@ -1,17 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Encodings.Web;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
using Remotely.Shared.Models;
using Remotely.Shared.ViewModels;
using Remotely.Server.Data;
using Remotely.Server.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Remotely.Shared.ViewModels.Organization;
using Microsoft.AspNetCore.Identity.UI.Services;
using System.Text;
using Microsoft.AspNetCore.WebUtilities;
using Remotely.Server.Auth;

View File

@ -1,15 +1,11 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.SignalR;
using Remotely.Shared.Models;
using Remotely.Server.Data;
using Remotely.Server.Models;
using Remotely.Server.Services;
using Remotely.Server.Auth;

View File

@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.SignalR;
using Remotely.Server.Services;
@ -9,7 +8,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Remotely.Shared.Helpers;
using Microsoft.AspNetCore.Http;
using System.IO;
using Remotely.Server.Auth;

View File

@ -1,16 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mime;
using System.Text;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Remotely.Server.Auth;
using Remotely.Server.Services;
using Remotely.Shared.Models;
namespace Remotely.Server.API
{

View File

@ -1,12 +1,4 @@
using System;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.UI;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Remotely.Server.Data;
using Remotely.Shared.Models;
using Microsoft.AspNetCore.Hosting;
[assembly: HostingStartup(typeof(Remotely.Server.Areas.Identity.IdentityHostingStartup))]
namespace Remotely.Server.Areas.Identity

View File

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;

View File

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;

View File

@ -1,12 +1,9 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.Text.Encodings.Web;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.UI.Services;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.WebUtilities;

View File

@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
@ -9,7 +8,6 @@ using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
using Remotely.Server.Data;
using Remotely.Shared.Models;
namespace Remotely.Server.Areas.Identity.Pages.Account

View File

@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;

View File

@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;

View File

@ -1,7 +1,4 @@
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using System.Text.Encodings.Web;
using System.Linq;
@ -10,7 +7,6 @@ using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
using Remotely.Server.Data;
using Remotely.Shared.Models;
namespace Remotely.Server.Areas.Identity.Pages.Account.Manage

View File

@ -1,11 +1,8 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
using Remotely.Shared.Models;
using Remotely.Server.Data;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

View File

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace Remotely.Server.Areas.Identity.Pages.Account.Manage

View File

@ -1,10 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Remotely.Shared.Models;
using Remotely.Server.Services;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

View File

@ -1,5 +1,4 @@
using Remotely.Shared.Models;
using Remotely.Shared.ViewModels;
using Remotely.Server.Services;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc.RazorPages;
@ -11,8 +10,6 @@ using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using System.Text.Encodings.Web;
using Microsoft.AspNetCore.Identity.UI.Services;
using System;
namespace Remotely.Server.Areas.Identity.Pages.Account.Manage
{

View File

@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Remotely.Server.Services;

View File

@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
@ -8,12 +7,10 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.UI.Services;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.Extensions.Logging;
using Remotely.Server.Data;
using Remotely.Server.Services;
using Remotely.Shared.Models;

View File

@ -1,10 +1,6 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Remotely.Server.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Remotely.Server.Auth
{

View File

@ -1,7 +1,4 @@
using System.Security.Principal;
using System.Security.Cryptography;
using System.Threading;
using System.Collections.Specialized;
using System.Security.Cryptography;
using System;
namespace Remotely.Server.Auth

View File

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Text;
using Remotely.Shared.Models;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;

Some files were not shown because too many files have changed in this diff Show More