mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Update projects.
This commit is contained in:
parent
d8e659c711
commit
39044acb02
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
||||
<Copyright>Copyright © 2021 Translucency Software</Copyright>
|
||||
@ -23,16 +23,17 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.1.3" />
|
||||
<PackageReference Include="Microsoft.WSMan.Management" Version="7.1.3" />
|
||||
<PackageReference Include="Microsoft.WSMan.Runtime" Version="7.1.3" />
|
||||
<PackageReference Include="System.Management.Automation" Version="7.1.3" />
|
||||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.0" />
|
||||
<PackageReference Include="Microsoft.WSMan.Management" Version="7.2.0" />
|
||||
<PackageReference Include="Microsoft.WSMan.Runtime" Version="7.2.0" />
|
||||
<PackageReference Include="System.Management.Automation" Version="7.2.0" />
|
||||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -42,6 +42,7 @@ namespace Remotely.Agent
|
||||
private static void BuildServices()
|
||||
{
|
||||
var serviceCollection = new ServiceCollection();
|
||||
serviceCollection.AddHttpClient();
|
||||
serviceCollection.AddLogging(builder =>
|
||||
{
|
||||
builder.AddConsole().AddDebug();
|
||||
|
||||
@ -6,6 +6,8 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
@ -16,17 +18,19 @@ namespace Remotely.Agent.Services
|
||||
|
||||
public class UpdaterLinux : IUpdater
|
||||
{
|
||||
private readonly SemaphoreSlim _checkForUpdatesLock = new SemaphoreSlim(1, 1);
|
||||
private readonly SemaphoreSlim _checkForUpdatesLock = new(1, 1);
|
||||
private readonly ConfigService _configService;
|
||||
private readonly IWebClientEx _webClientEx;
|
||||
private readonly SemaphoreSlim _installLatestVersionLock = new SemaphoreSlim(1, 1);
|
||||
private readonly IHttpClientFactory _httpClientFactory;
|
||||
private readonly SemaphoreSlim _installLatestVersionLock = new(1, 1);
|
||||
private DateTimeOffset _lastUpdateFailure;
|
||||
private readonly System.Timers.Timer _updateTimer = new System.Timers.Timer(TimeSpan.FromHours(6).TotalMilliseconds);
|
||||
private readonly System.Timers.Timer _updateTimer = new(TimeSpan.FromHours(6).TotalMilliseconds);
|
||||
|
||||
public UpdaterLinux(ConfigService configService, IWebClientEx webClientEx)
|
||||
public UpdaterLinux(ConfigService configService, IWebClientEx webClientEx, IHttpClientFactory httpClientFactory)
|
||||
{
|
||||
_configService = configService;
|
||||
_webClientEx = webClientEx;
|
||||
_httpClientFactory = httpClientFactory;
|
||||
_webClientEx.SetRequestTimeout((int)_updateTimer.Interval);
|
||||
}
|
||||
|
||||
@ -75,10 +79,12 @@ namespace Remotely.Agent.Services
|
||||
|
||||
try
|
||||
{
|
||||
var wr = WebRequest.CreateHttp(fileUrl);
|
||||
wr.Method = "Head";
|
||||
wr.Headers.Add("If-None-Match", lastEtag);
|
||||
using var response = (HttpWebResponse)await wr.GetResponseAsync();
|
||||
using var httpClient = _httpClientFactory.CreateClient();
|
||||
using var request = new HttpRequestMessage(HttpMethod.Head, fileUrl);
|
||||
request.Headers.IfNoneMatch.Add(new EntityTagHeaderValue(lastEtag));
|
||||
|
||||
using var response = await httpClient.SendAsync(request);
|
||||
|
||||
if (response.StatusCode == HttpStatusCode.NotModified)
|
||||
{
|
||||
Logger.Write("Service Updater: Version is current.");
|
||||
@ -109,6 +115,7 @@ namespace Remotely.Agent.Services
|
||||
public void Dispose()
|
||||
{
|
||||
_webClientEx?.Dispose();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
public async Task InstallLatestVersion()
|
||||
@ -150,7 +157,8 @@ namespace Remotely.Agent.Services
|
||||
serverUrl + $"/API/AgentUpdate/DownloadPackage/linux/{downloadId}",
|
||||
zipPath);
|
||||
|
||||
(await WebRequest.CreateHttp(serverUrl + $"/api/AgentUpdate/ClearDownload/{downloadId}").GetResponseAsync()).Dispose();
|
||||
using var httpClient = _httpClientFactory.CreateClient();
|
||||
using var response = httpClient.GetAsync($"{serverUrl}/api/AgentUpdate/ClearDownload/{downloadId}");
|
||||
|
||||
Logger.Write("Launching installer to perform update.");
|
||||
|
||||
|
||||
@ -6,6 +6,8 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
@ -17,16 +19,18 @@ namespace Remotely.Agent.Services
|
||||
public class UpdaterMac : IUpdater
|
||||
{
|
||||
private readonly string _achitecture = RuntimeInformation.OSArchitecture.ToString().ToLower();
|
||||
private readonly SemaphoreSlim _checkForUpdatesLock = new SemaphoreSlim(1, 1);
|
||||
private readonly SemaphoreSlim _checkForUpdatesLock = new(1, 1);
|
||||
private readonly ConfigService _configService;
|
||||
private readonly IHttpClientFactory _httpClientFactory;
|
||||
private readonly IWebClientEx _webClientEx;
|
||||
private readonly SemaphoreSlim _installLatestVersionLock = new SemaphoreSlim(1, 1);
|
||||
private readonly SemaphoreSlim _installLatestVersionLock = new(1, 1);
|
||||
private DateTimeOffset _lastUpdateFailure;
|
||||
private readonly System.Timers.Timer _updateTimer = new System.Timers.Timer(TimeSpan.FromHours(6).TotalMilliseconds);
|
||||
private readonly System.Timers.Timer _updateTimer = new(TimeSpan.FromHours(6).TotalMilliseconds);
|
||||
|
||||
public UpdaterMac(ConfigService configService, IWebClientEx webClientEx)
|
||||
public UpdaterMac(ConfigService configService, IWebClientEx webClientEx, IHttpClientFactory httpClientFactory)
|
||||
{
|
||||
_configService = configService;
|
||||
_httpClientFactory = httpClientFactory;
|
||||
_webClientEx = webClientEx;
|
||||
_webClientEx.SetRequestTimeout((int)_updateTimer.Interval);
|
||||
}
|
||||
@ -76,10 +80,12 @@ namespace Remotely.Agent.Services
|
||||
|
||||
try
|
||||
{
|
||||
var wr = WebRequest.CreateHttp(fileUrl);
|
||||
wr.Method = "Head";
|
||||
wr.Headers.Add("If-None-Match", lastEtag);
|
||||
using var response = (HttpWebResponse)await wr.GetResponseAsync();
|
||||
using var httpClient = _httpClientFactory.CreateClient();
|
||||
using var request = new HttpRequestMessage(HttpMethod.Head, fileUrl);
|
||||
request.Headers.IfNoneMatch.Add(new EntityTagHeaderValue(lastEtag));
|
||||
|
||||
using var response = await httpClient.SendAsync(request);
|
||||
|
||||
if (response.StatusCode == HttpStatusCode.NotModified)
|
||||
{
|
||||
Logger.Write("Service Updater: Version is current.");
|
||||
@ -110,6 +116,7 @@ namespace Remotely.Agent.Services
|
||||
public void Dispose()
|
||||
{
|
||||
_webClientEx?.Dispose();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
public async Task InstallLatestVersion()
|
||||
@ -136,7 +143,8 @@ namespace Remotely.Agent.Services
|
||||
serverUrl + $"/API/AgentUpdate/DownloadPackage/macos-{_achitecture}/{downloadId}",
|
||||
zipPath);
|
||||
|
||||
(await WebRequest.CreateHttp(serverUrl + $"/api/AgentUpdate/ClearDownload/{downloadId}").GetResponseAsync()).Dispose();
|
||||
using var httpClient = _httpClientFactory.CreateClient();
|
||||
using var response = httpClient.GetAsync($"{serverUrl}/api/AgentUpdate/ClearDownload/{downloadId}");
|
||||
|
||||
Logger.Write("Launching installer to perform update.");
|
||||
|
||||
|
||||
@ -4,6 +4,8 @@ using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@ -11,18 +13,20 @@ namespace Remotely.Agent.Services
|
||||
{
|
||||
public class UpdaterWin : IUpdater
|
||||
{
|
||||
private readonly SemaphoreSlim _checkForUpdatesLock = new SemaphoreSlim(1, 1);
|
||||
private readonly SemaphoreSlim _checkForUpdatesLock = new(1, 1);
|
||||
private readonly ConfigService _configService;
|
||||
private readonly IWebClientEx _webClientEx;
|
||||
private readonly SemaphoreSlim _installLatestVersionLock = new SemaphoreSlim(1, 1);
|
||||
private readonly System.Timers.Timer _updateTimer = new System.Timers.Timer(TimeSpan.FromHours(6).TotalMilliseconds);
|
||||
private readonly IHttpClientFactory _httpClientFactory;
|
||||
private readonly SemaphoreSlim _installLatestVersionLock = new(1, 1);
|
||||
private readonly System.Timers.Timer _updateTimer = new(TimeSpan.FromHours(6).TotalMilliseconds);
|
||||
private DateTimeOffset _lastUpdateFailure;
|
||||
|
||||
|
||||
public UpdaterWin(ConfigService configService, IWebClientEx webClientEx)
|
||||
public UpdaterWin(ConfigService configService, IWebClientEx webClientEx, IHttpClientFactory httpClientFactory)
|
||||
{
|
||||
_configService = configService;
|
||||
_webClientEx = webClientEx;
|
||||
_httpClientFactory = httpClientFactory;
|
||||
_webClientEx.SetRequestTimeout((int)_updateTimer.Interval);
|
||||
}
|
||||
|
||||
@ -71,10 +75,11 @@ namespace Remotely.Agent.Services
|
||||
|
||||
try
|
||||
{
|
||||
var wr = WebRequest.CreateHttp(fileUrl);
|
||||
wr.Method = "Head";
|
||||
wr.Headers.Add("If-None-Match", lastEtag);
|
||||
using var response = (HttpWebResponse)await wr.GetResponseAsync();
|
||||
using var httpClient = _httpClientFactory.CreateClient();
|
||||
using var request = new HttpRequestMessage(HttpMethod.Head, fileUrl);
|
||||
request.Headers.IfNoneMatch.Add(new EntityTagHeaderValue(lastEtag));
|
||||
|
||||
using var response = await httpClient.SendAsync(request);
|
||||
if (response.StatusCode == HttpStatusCode.NotModified)
|
||||
{
|
||||
Logger.Write("Service Updater: Version is current.");
|
||||
@ -105,6 +110,7 @@ namespace Remotely.Agent.Services
|
||||
public void Dispose()
|
||||
{
|
||||
_webClientEx?.Dispose();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
public async Task InstallLatestVersion()
|
||||
@ -132,8 +138,8 @@ namespace Remotely.Agent.Services
|
||||
serverUrl + $"/api/AgentUpdate/DownloadPackage/win-{platform}/{downloadId}",
|
||||
zipPath);
|
||||
|
||||
(await WebRequest.CreateHttp(serverUrl + $"/api/AgentUpdate/ClearDownload/{downloadId}").GetResponseAsync()).Dispose();
|
||||
|
||||
using var httpClient = _httpClientFactory.CreateClient();
|
||||
using var response = httpClient.GetAsync($"{serverUrl}/api/AgentUpdate/ClearDownload/{downloadId}");
|
||||
|
||||
foreach (var proc in Process.GetProcessesByName("Remotely_Installer"))
|
||||
{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RootNamespace>Remotely.Desktop.Core</RootNamespace>
|
||||
<AssemblyName>Remotely_Desktop.Core</AssemblyName>
|
||||
<Platforms>AnyCPU;x64;x86</Platforms>
|
||||
@ -40,14 +40,14 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.MixedReality.WebRTC" Version="2.0.2" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
|
||||
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ namespace Remotely.Desktop.Core.Utilities
|
||||
{
|
||||
public class ImageUtils
|
||||
{
|
||||
private static ImageCodecInfo _jpegEncoder = ImageCodecInfo.GetImageEncoders().FirstOrDefault(x => x.FormatID == ImageFormat.Jpeg.Guid);
|
||||
private static readonly ImageCodecInfo _jpegEncoder = ImageCodecInfo.GetImageEncoders().FirstOrDefault(x => x.FormatID == ImageFormat.Jpeg.Guid);
|
||||
|
||||
//public static byte[] EncodeWithSkia(Bitmap bitmap, SKEncodedImageFormat format, int quality)
|
||||
//{
|
||||
|
||||
@ -2,13 +2,12 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net5.0-windows</TargetFramework>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<UseWPF>true</UseWPF>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<AssemblyName>Remotely_Desktop</AssemblyName>
|
||||
<RootNamespace>Remotely.Desktop.Win</RootNamespace>
|
||||
<ApplicationIcon>Assets\favicon.ico</ApplicationIcon>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<Description>Desktop client for allowing your IT admin to provide remote support.</Description>
|
||||
<Copyright>Copyright © 2021 Translucency Software</Copyright>
|
||||
<PackageId>Remotely Desktop</PackageId>
|
||||
@ -28,6 +27,10 @@
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Remove="app.manifest" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Assets\favicon.ico" />
|
||||
<None Remove="Assets\Remotely_Icon.png" />
|
||||
@ -39,7 +42,7 @@
|
||||
<PackageReference Include="SharpDX" Version="4.2.0" />
|
||||
<PackageReference Include="SharpDX.Direct3D11" Version="4.2.0" />
|
||||
<PackageReference Include="SharpDX.DXGI" Version="4.2.0" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!-- UAC Manifest Options
|
||||
If you want to change the Windows User Account Control level replace the
|
||||
requestedExecutionLevel node with one of the following.
|
||||
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||
|
||||
Specifying requestedExecutionLevel element will disable file and registry virtualization.
|
||||
Remove this element if your application requires this virtualization for backwards
|
||||
compatibility.
|
||||
-->
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- A list of the Windows versions that this application has been tested on
|
||||
and is designed to work with. Uncomment the appropriate elements
|
||||
and Windows will automatically select the most compatible environment. -->
|
||||
|
||||
<!-- Windows Vista -->
|
||||
<!-- <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" /> -->
|
||||
|
||||
<!-- Windows 7 -->
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
|
||||
|
||||
<!-- Windows 8 -->
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
|
||||
|
||||
<!-- Windows 8.1 -->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
|
||||
|
||||
<!-- Windows 10 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||
|
||||
</application>
|
||||
</compatibility>
|
||||
|
||||
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
|
||||
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
|
||||
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
|
||||
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->
|
||||
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
|
||||
|
||||
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
|
||||
<!--
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
</assembly>
|
||||
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ApplicationIcon>Assets\favicon.ico</ApplicationIcon>
|
||||
<AssemblyName>Remotely_Desktop</AssemblyName>
|
||||
<RootNamespace>Remotely.Desktop.XPlat</RootNamespace>
|
||||
@ -52,9 +52,9 @@
|
||||
<EmbeddedResource Include="Assets\Remotely_Icon.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="0.10.6" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="0.10.6" />
|
||||
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.6" />
|
||||
<PackageReference Include="Avalonia" Version="0.10.10" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="0.10.10" />
|
||||
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.10" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Desktop.Core\Desktop.Core.csproj" />
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<AssemblyName>Remotely_Server_Installer</AssemblyName>
|
||||
<ApplicationIcon>Remotely_Icon.ico</ApplicationIcon>
|
||||
<RootNamespace>Remotely.Server.Installer</RootNamespace>
|
||||
@ -32,7 +32,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -5,6 +5,8 @@ using Remotely.Shared.Models;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Json;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@ -15,31 +17,33 @@ namespace Remotely.Server.API
|
||||
[ServiceFilter(typeof(ApiAuthorizationFilter))]
|
||||
public class AlertsController : ControllerBase
|
||||
{
|
||||
public AlertsController(IDataService dataService, IEmailSenderEx emailSender)
|
||||
{
|
||||
DataService = dataService;
|
||||
EmailSender = emailSender;
|
||||
}
|
||||
private readonly IDataService _dataService;
|
||||
private readonly IEmailSenderEx _emailSender;
|
||||
private readonly IHttpClientFactory _httpClientFactory;
|
||||
|
||||
private IDataService DataService { get; }
|
||||
private IEmailSenderEx EmailSender { get; }
|
||||
public AlertsController(IDataService dataService, IEmailSenderEx emailSender, IHttpClientFactory httpClientFactory)
|
||||
{
|
||||
_dataService = dataService;
|
||||
_emailSender = emailSender;
|
||||
_httpClientFactory = httpClientFactory;
|
||||
}
|
||||
|
||||
[HttpPost("Create")]
|
||||
public async Task<IActionResult> Create(AlertOptions alertOptions)
|
||||
{
|
||||
Request.Headers.TryGetValue("OrganizationID", out var orgID);
|
||||
|
||||
DataService.WriteEvent("Alert created. Alert Options: " + JsonSerializer.Serialize(alertOptions), orgID);
|
||||
_dataService.WriteEvent("Alert created. Alert Options: " + JsonSerializer.Serialize(alertOptions), orgID);
|
||||
|
||||
if (alertOptions.ShouldAlert)
|
||||
{
|
||||
try
|
||||
{
|
||||
await DataService.AddAlert(alertOptions.AlertDeviceID, orgID, alertOptions.AlertMessage);
|
||||
await _dataService.AddAlert(alertOptions.AlertDeviceID, orgID, alertOptions.AlertMessage);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
DataService.WriteEvent(ex, orgID);
|
||||
_dataService.WriteEvent(ex, orgID);
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,14 +51,14 @@ namespace Remotely.Server.API
|
||||
{
|
||||
try
|
||||
{
|
||||
await EmailSender.SendEmailAsync(alertOptions.EmailTo,
|
||||
await _emailSender.SendEmailAsync(alertOptions.EmailTo,
|
||||
alertOptions.EmailSubject,
|
||||
alertOptions.EmailBody,
|
||||
orgID);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
DataService.WriteEvent(ex, orgID);
|
||||
_dataService.WriteEvent(ex, orgID);
|
||||
}
|
||||
|
||||
}
|
||||
@ -63,24 +67,25 @@ namespace Remotely.Server.API
|
||||
{
|
||||
try
|
||||
{
|
||||
var httpRequest = WebRequest.CreateHttp(alertOptions.ApiRequestUrl);
|
||||
httpRequest.Method = alertOptions.ApiRequestMethod;
|
||||
httpRequest.ContentType = "application/json";
|
||||
using var httpClient = _httpClientFactory.CreateClient();
|
||||
using var request = new HttpRequestMessage(
|
||||
new HttpMethod(alertOptions.ApiRequestMethod),
|
||||
alertOptions.ApiRequestUrl);
|
||||
|
||||
request.Content = new StringContent(alertOptions.ApiRequestBody);
|
||||
request.Content.Headers.ContentType.MediaType = "application/json";
|
||||
|
||||
foreach (var header in alertOptions.ApiRequestHeaders)
|
||||
{
|
||||
httpRequest.Headers.Add(header.Key, header.Value);
|
||||
request.Headers.TryAddWithoutValidation(header.Key, header.Value);
|
||||
}
|
||||
using (var rs = httpRequest.GetRequestStream())
|
||||
using (var sw = new StreamWriter(rs))
|
||||
{
|
||||
sw.Write(alertOptions.ApiRequestBody);
|
||||
}
|
||||
using var response = (HttpWebResponse)httpRequest.GetResponse();
|
||||
DataService.WriteEvent($"Alert API Response Status: {response.StatusCode}.", orgID);
|
||||
|
||||
using var response = await httpClient.SendAsync(request);
|
||||
_dataService.WriteEvent($"Alert API Response Status: {response.StatusCode}.", orgID);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
DataService.WriteEvent(ex, orgID);
|
||||
_dataService.WriteEvent(ex, orgID);
|
||||
}
|
||||
|
||||
}
|
||||
@ -93,11 +98,11 @@ namespace Remotely.Server.API
|
||||
{
|
||||
Request.Headers.TryGetValue("OrganizationID", out var orgID);
|
||||
|
||||
var alert = await DataService.GetAlert(alertID);
|
||||
var alert = await _dataService.GetAlert(alertID);
|
||||
|
||||
if (alert?.OrganizationID == orgID)
|
||||
{
|
||||
await DataService.DeleteAlert(alert);
|
||||
await _dataService.DeleteAlert(alert);
|
||||
|
||||
return Ok();
|
||||
}
|
||||
@ -112,11 +117,11 @@ namespace Remotely.Server.API
|
||||
|
||||
if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
await DataService.DeleteAllAlerts(orgID, User.Identity.Name);
|
||||
await _dataService.DeleteAllAlerts(orgID, User.Identity.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
await DataService.DeleteAllAlerts(orgID);
|
||||
await _dataService.DeleteAllAlerts(orgID);
|
||||
}
|
||||
|
||||
return Ok();
|
||||
|
||||
@ -16,7 +16,7 @@ namespace Remotely.Server.Data
|
||||
{
|
||||
public class AppDb : IdentityDbContext
|
||||
{
|
||||
private static ValueComparer<string[]> _stringArrayComparer = new(
|
||||
private static readonly ValueComparer<string[]> _stringArrayComparer = new(
|
||||
(a, b) => a.SequenceEqual(b),
|
||||
c => c.Aggregate(0, (a, b) => HashCode.Combine(a, b.GetHashCode())),
|
||||
c => c.ToArray());
|
||||
@ -106,8 +106,8 @@ namespace Remotely.Server.Data
|
||||
builder.Entity<RemotelyUser>()
|
||||
.Property(x => x.UserOptions)
|
||||
.HasConversion(
|
||||
x => JsonSerializer.Serialize(x, null),
|
||||
x => JsonSerializer.Deserialize<RemotelyUserOptions>(x, null));
|
||||
x => JsonSerializer.Serialize(x, (JsonSerializerOptions)null),
|
||||
x => JsonSerializer.Deserialize<RemotelyUserOptions>(x, (JsonSerializerOptions)null));
|
||||
builder.Entity<RemotelyUser>()
|
||||
.HasMany(x => x.SavedScripts)
|
||||
.WithOne(x => x.Creator);
|
||||
@ -121,8 +121,8 @@ namespace Remotely.Server.Data
|
||||
builder.Entity<Device>()
|
||||
.Property(x => x.Drives)
|
||||
.HasConversion(
|
||||
x => JsonSerializer.Serialize(x, null),
|
||||
x => JsonSerializer.Deserialize<List<Drive>>(x, null));
|
||||
x => JsonSerializer.Serialize(x, (JsonSerializerOptions)null),
|
||||
x => JsonSerializer.Deserialize<List<Drive>>(x, (JsonSerializerOptions)null));
|
||||
builder.Entity<Device>()
|
||||
.Property(x => x.Drives)
|
||||
.Metadata.SetValueComparer(new ValueComparer<List<Drive>>(true));
|
||||
@ -157,16 +157,16 @@ namespace Remotely.Server.Data
|
||||
builder.Entity<ScriptResult>()
|
||||
.Property(x => x.ErrorOutput)
|
||||
.HasConversion(
|
||||
x => JsonSerializer.Serialize(x, null),
|
||||
x => JsonSerializer.Deserialize<string[]>(x, null))
|
||||
x => JsonSerializer.Serialize(x, (JsonSerializerOptions)null),
|
||||
x => JsonSerializer.Deserialize<string[]>(x, (JsonSerializerOptions)null))
|
||||
.Metadata
|
||||
.SetValueComparer(_stringArrayComparer);
|
||||
|
||||
builder.Entity<ScriptResult>()
|
||||
.Property(x => x.StandardOutput)
|
||||
.HasConversion(
|
||||
x => JsonSerializer.Serialize(x, null),
|
||||
x => JsonSerializer.Deserialize<string[]>(x, null))
|
||||
x => JsonSerializer.Serialize(x, (JsonSerializerOptions)null),
|
||||
x => JsonSerializer.Deserialize<string[]>(x, (JsonSerializerOptions)null))
|
||||
.Metadata
|
||||
.SetValueComparer(_stringArrayComparer);
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<UserSecretsId>aspnet-Server-F297B939-4A64-4B42-8C70-E142EBDAA131</UserSecretsId>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
<DockerfileTag>remotely</DockerfileTag>
|
||||
@ -23,28 +23,28 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MailKit" Version="2.14.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.8">
|
||||
<PackageReference Include="MailKit" Version="2.15.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="4.3.5">
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="4.5.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.13" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.2" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.14.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="2.1.113" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.7" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.1.5" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -54,8 +54,8 @@ namespace Remotely.Server
|
||||
options.UseSqlite(Configuration.GetConnectionString("SQLite"));
|
||||
});
|
||||
|
||||
services.AddScoped<IDbContextFactory<AppDb>>(p =>
|
||||
p.GetRequiredService<IDbContextFactory<SqliteDbContext>>());
|
||||
services.AddScoped(p =>
|
||||
(IDbContextFactory<AppDb>)p.GetRequiredService<IDbContextFactory<SqliteDbContext>>());
|
||||
|
||||
services.AddScoped<AppDb, SqliteDbContext>(p =>
|
||||
p.GetRequiredService<IDbContextFactory<SqliteDbContext>>().CreateDbContext());
|
||||
@ -68,8 +68,8 @@ namespace Remotely.Server
|
||||
options.UseSqlServer(Configuration.GetConnectionString("SQLServer"));
|
||||
});
|
||||
|
||||
services.AddScoped<IDbContextFactory<AppDb>>(p =>
|
||||
p.GetRequiredService<IDbContextFactory<SqlServerDbContext>>());
|
||||
services.AddScoped(p =>
|
||||
(IDbContextFactory<AppDb>)p.GetRequiredService<IDbContextFactory<SqlServerDbContext>>());
|
||||
|
||||
services.AddScoped<AppDb, SqlServerDbContext>(p =>
|
||||
p.GetRequiredService<IDbContextFactory<SqlServerDbContext>>().CreateDbContext());
|
||||
@ -94,8 +94,8 @@ namespace Remotely.Server
|
||||
}
|
||||
});
|
||||
|
||||
services.AddScoped<IDbContextFactory<AppDb>>(p =>
|
||||
p.GetRequiredService<IDbContextFactory<PostgreSqlDbContext>>());
|
||||
services.AddScoped(p =>
|
||||
(IDbContextFactory<AppDb>)p.GetRequiredService<IDbContextFactory<PostgreSqlDbContext>>());
|
||||
|
||||
services.AddScoped<AppDb, PostgreSqlDbContext>(p =>
|
||||
p.GetRequiredService<IDbContextFactory<PostgreSqlDbContext>>().CreateDbContext());
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"defaultProvider": "cdnjs",
|
||||
"libraries": [
|
||||
{
|
||||
"library": "microsoft-signalr@5.0.7",
|
||||
"library": "microsoft-signalr@6.0.0",
|
||||
"destination": "wwwroot/lib/microsoft-signalr/"
|
||||
},
|
||||
{
|
||||
@ -12,7 +12,7 @@
|
||||
},
|
||||
{
|
||||
"provider": "unpkg",
|
||||
"library": "@microsoft/signalr-protocol-msgpack@5.0.7",
|
||||
"library": "@microsoft/signalr-protocol-msgpack@6.0.0",
|
||||
"destination": "wwwroot/lib/microsoft/signalr-protocol-msgpack/",
|
||||
"files": [
|
||||
"dist/browser/signalr-protocol-msgpack.js",
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -28,7 +28,7 @@ export class RtcSession {
|
||||
UI.VideoScreenViewer.setAttribute("hidden", "hidden");
|
||||
};
|
||||
this.DataChannel.onerror = (ev) => {
|
||||
console.log("Data channel error.", ev.error);
|
||||
console.log("Data channel error.", ev);
|
||||
UI.ConnectionP2PIcon.style.display = "none";
|
||||
UI.ConnectionRelayedIcon.style.display = "unset";
|
||||
UI.StreamVideoButton.setAttribute("hidden", "hidden");
|
||||
|
||||
@ -1 +1 @@
|
||||
{"version":3,"file":"RtcSession.js","sourceRoot":"","sources":["RtcSession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE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DataChannel.onerror = (ev) => {
|
||||
console.log("Data channel error.", ev.error);
|
||||
console.log("Data channel error.", ev);
|
||||
UI.ConnectionP2PIcon.style.display = "none";
|
||||
UI.ConnectionRelayedIcon.style.display = "unset";
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||
<AssemblyName>Remotely_Shared</AssemblyName>
|
||||
<Platforms>AnyCPU;x64;x86</Platforms>
|
||||
@ -10,10 +10,10 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ConcurrentList" Version="1.4.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="6.0.0" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
|
||||
<PackageReference Include="System.Text.Json" Version="5.0.2" />
|
||||
<PackageReference Include="System.Text.Json" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net5.0-windows</TargetFramework>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<AssemblyName>Remotely.Tests.LoadTester</AssemblyName>
|
||||
<RootNamespace>Remotely.Tests.LoadTester</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0-windows</TargetFramework>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
|
||||
@ -23,12 +23,12 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.8" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
|
||||
<PackageReference Include="Moq" Version="4.16.1" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.5" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.2.5" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user