diff --git a/.gitignore b/.gitignore
index cbc77e0..5b09bcb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
*.DS_Store
.idea
+Installation
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
diff --git a/README.md b/README.md
index f606beb..4d903bd 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,5 @@
-https://www.flaticon.com/free-icon/vpn_188120
\ No newline at end of file
+## SoftEther VPN Client
+
+
+
+https://www.flaticon.com/free-icon/vpn_188120
diff --git a/src/Logixware.SoftEther.Client.Core/Logixware.SoftEther.Client.Core.csproj b/src/Logixware.SoftEther.Client.Core/Logixware.SoftEther.Client.Core.csproj
index 3152a56..c17931c 100644
--- a/src/Logixware.SoftEther.Client.Core/Logixware.SoftEther.Client.Core.csproj
+++ b/src/Logixware.SoftEther.Client.Core/Logixware.SoftEther.Client.Core.csproj
@@ -29,8 +29,8 @@
Copyright © 2017 - CURRENT_YEAR Tobias Punke.
-
-
+
+
diff --git a/src/Logixware.SoftEther.Client.Core/Logixware/SoftEther/Client/LoggerExtensions.cs b/src/Logixware.SoftEther.Client.Core/Logixware/SoftEther/Client/LoggerExtensions.cs
index b17fe25..ae88ef7 100644
--- a/src/Logixware.SoftEther.Client.Core/Logixware/SoftEther/Client/LoggerExtensions.cs
+++ b/src/Logixware.SoftEther.Client.Core/Logixware/SoftEther/Client/LoggerExtensions.cs
@@ -6,6 +6,11 @@ namespace Logixware.SoftEther.Client
{
public static class LoggerExtensions
{
+ public static void Debug(this ILogger target, String message)
+ {
+ target.Log(LogLevel.Debug, 1, message, null, (s, e) => DateTime.Now + " " + s.ToString());
+ }
+
public static void Inform(this ILogger target, String message)
{
target.Log(LogLevel.Information, 1, message, null, (s, e) => DateTime.Now + " " + s.ToString());
diff --git a/src/Logixware.SoftEther.Client.Core/Logixware/SoftEther/Client/Shell/Platform/BashShell.cs b/src/Logixware.SoftEther.Client.Core/Logixware/SoftEther/Client/Shell/Platform/BashShell.cs
index b4f44d7..0456daf 100644
--- a/src/Logixware.SoftEther.Client.Core/Logixware/SoftEther/Client/Shell/Platform/BashShell.cs
+++ b/src/Logixware.SoftEther.Client.Core/Logixware/SoftEther/Client/Shell/Platform/BashShell.cs
@@ -4,7 +4,6 @@
namespace Logixware.SoftEther.Client.Shell.Platform
{
-
public class BashShell : IShell
{
public ExecutionResult ExecuteCommand(String command)
diff --git a/src/Logixware.SoftEther.Client.Core/Logixware/SoftEther/Client/VpnService/CommandLineInterface.cs b/src/Logixware.SoftEther.Client.Core/Logixware/SoftEther/Client/VpnService/CommandLineInterface.cs
index 3243a6e..a0de275 100644
--- a/src/Logixware.SoftEther.Client.Core/Logixware/SoftEther/Client/VpnService/CommandLineInterface.cs
+++ b/src/Logixware.SoftEther.Client.Core/Logixware/SoftEther/Client/VpnService/CommandLineInterface.cs
@@ -1,6 +1,7 @@
using System;
using System.Linq;
using System.Threading;
+using System.Threading.Tasks;
using System.Collections.Generic;
using Microsoft.Extensions.Logging;
@@ -102,12 +103,12 @@ public void StartClient()
if (__StartExecution.Succeeded)
{
var __Message = $"Successfully started the VPN client: {__StartExecution.Result}";
- this._Logger.Inform(__Message);
+ this._Logger?.Inform(__Message);
}
else
{
var __Message = $"Error starting the VPN client: {__StartExecution.Result}";
- this._Logger.Error(__Message);
+ this._Logger?.Error(__Message);
}
}
@@ -119,12 +120,12 @@ public void StopClient()
if (__StopExecution.Succeeded)
{
var __Message = $"Successfully stopped the VPN client: {__StopExecution.Result}";
- this._Logger.Inform(__Message);
+ this._Logger?.Inform(__Message);
}
else
{
var __Message = $"Error stopping the VPN client: {__StopExecution.Result}";
- this._Logger.Error(__Message);
+ this._Logger?.Error(__Message);
}
}
diff --git a/src/Logixware.SoftEther.Client.Core/Logixware/SoftEther/Client/VpnService/ICommandLineInterface.cs b/src/Logixware.SoftEther.Client.Core/Logixware/SoftEther/Client/VpnService/ICommandLineInterface.cs
index 44ec202..ffd34a4 100644
--- a/src/Logixware.SoftEther.Client.Core/Logixware/SoftEther/Client/VpnService/ICommandLineInterface.cs
+++ b/src/Logixware.SoftEther.Client.Core/Logixware/SoftEther/Client/VpnService/ICommandLineInterface.cs
@@ -1,4 +1,5 @@
using System;
+using System.Threading.Tasks;
using System.Collections.Generic;
namespace Logixware.SoftEther.Client.VpnService
diff --git a/src/Logixware.SoftEther.Client.Core/Properties/AssemblyInfo/AssemblyInfo.cs b/src/Logixware.SoftEther.Client.Core/Properties/AssemblyInfo/AssemblyInfo.cs
index d11105b..998250d 100755
--- a/src/Logixware.SoftEther.Client.Core/Properties/AssemblyInfo/AssemblyInfo.cs
+++ b/src/Logixware.SoftEther.Client.Core/Properties/AssemblyInfo/AssemblyInfo.cs
@@ -10,7 +10,7 @@
[assembly: System.Reflection.AssemblyCopyright("Copyright © 2017 - 2018 Tobias Punke.")]
[assembly: System.Reflection.AssemblyVersion("1.0.0.0")]
-[assembly: System.Reflection.AssemblyFileVersion("1.0.0.5")]
-[assembly: System.Reflection.AssemblyInformationalVersion("1.0.0.5")]
+[assembly: System.Reflection.AssemblyFileVersion("1.0.0.11")]
+[assembly: System.Reflection.AssemblyInformationalVersion("1.0.0.11")]
diff --git a/src/Logixware.SoftEther.Client.Core/Properties/AssemblyInfo/AssemblyVersion.txt b/src/Logixware.SoftEther.Client.Core/Properties/AssemblyInfo/AssemblyVersion.txt
index 090eef7..6cb4627 100755
--- a/src/Logixware.SoftEther.Client.Core/Properties/AssemblyInfo/AssemblyVersion.txt
+++ b/src/Logixware.SoftEther.Client.Core/Properties/AssemblyInfo/AssemblyVersion.txt
@@ -1 +1 @@
-1.0.0.5
\ No newline at end of file
+1.0.0.11
\ No newline at end of file
diff --git a/src/Logixware.SoftEther.Client.Daemon/Logixware.SoftEther.Client.Daemon.csproj b/src/Logixware.SoftEther.Client.Daemon/Logixware.SoftEther.Client.Daemon.csproj
index f9fa799..b303540 100644
--- a/src/Logixware.SoftEther.Client.Daemon/Logixware.SoftEther.Client.Daemon.csproj
+++ b/src/Logixware.SoftEther.Client.Daemon/Logixware.SoftEther.Client.Daemon.csproj
@@ -38,15 +38,15 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/ClientConfigurationSection.cs b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Configuration/ClientConfigurationSection.cs
similarity index 74%
rename from src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/ClientConfigurationSection.cs
rename to src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Configuration/ClientConfigurationSection.cs
index 1a57441..5833473 100644
--- a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/ClientConfigurationSection.cs
+++ b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Configuration/ClientConfigurationSection.cs
@@ -1,7 +1,9 @@
using System;
using System.Collections.Generic;
-namespace Logixware.SoftEther.Client.Daemon
+using Logixware.SoftEther.Client.Daemon.Entities;
+
+namespace Logixware.SoftEther.Client.Daemon.Configuration
{
public class ClientConfigurationSection
{
diff --git a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Platform/MacPlatformConfigurationSection.cs b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Configuration/MacPlatformConfigurationSection.cs
similarity index 73%
rename from src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Platform/MacPlatformConfigurationSection.cs
rename to src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Configuration/MacPlatformConfigurationSection.cs
index f0551d2..ad69366 100644
--- a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Platform/MacPlatformConfigurationSection.cs
+++ b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Configuration/MacPlatformConfigurationSection.cs
@@ -1,6 +1,6 @@
using System;
-namespace Logixware.SoftEther.Client.Daemon.Platform
+namespace Logixware.SoftEther.Client.Daemon.Configuration
{
public class MacPlatformConfigurationSection
{
diff --git a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/IPv4Information.cs b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Entities/IPv4Information.cs
similarity index 82%
rename from src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/IPv4Information.cs
rename to src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Entities/IPv4Information.cs
index 901b5ae..4cc4172 100644
--- a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/IPv4Information.cs
+++ b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Entities/IPv4Information.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
-namespace Logixware.SoftEther.Client.Daemon
+namespace Logixware.SoftEther.Client.Daemon.Entities
{
// ReSharper disable once InconsistentNaming
public class IPv4Information
diff --git a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/IPv4Route.cs b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Entities/IPv4Route.cs
similarity index 84%
rename from src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/IPv4Route.cs
rename to src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Entities/IPv4Route.cs
index 16f7b24..e1145fd 100644
--- a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/IPv4Route.cs
+++ b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Entities/IPv4Route.cs
@@ -1,6 +1,6 @@
using System;
-namespace Logixware.SoftEther.Client.Daemon
+namespace Logixware.SoftEther.Client.Daemon.Entities
{
// ReSharper disable once InconsistentNaming
public class IPv4Route
diff --git a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/IPv6Information.cs b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Entities/IPv6Information.cs
similarity index 82%
rename from src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/IPv6Information.cs
rename to src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Entities/IPv6Information.cs
index e5704e9..d203bbf 100644
--- a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/IPv6Information.cs
+++ b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Entities/IPv6Information.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
-namespace Logixware.SoftEther.Client.Daemon
+namespace Logixware.SoftEther.Client.Daemon.Entities
{
// ReSharper disable once InconsistentNaming
public class IPv6Information
diff --git a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/IPv6Route.cs b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Entities/IPv6Route.cs
similarity index 84%
rename from src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/IPv6Route.cs
rename to src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Entities/IPv6Route.cs
index 1c151a0..dbccc70 100644
--- a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/IPv6Route.cs
+++ b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Entities/IPv6Route.cs
@@ -1,6 +1,6 @@
using System;
-namespace Logixware.SoftEther.Client.Daemon
+namespace Logixware.SoftEther.Client.Daemon.Entities
{
// ReSharper disable once InconsistentNaming
public class IPv6Route
diff --git a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/VirtualNetwork.cs b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Entities/VirtualNetwork.cs
similarity index 87%
rename from src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/VirtualNetwork.cs
rename to src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Entities/VirtualNetwork.cs
index e388453..9823b6a 100644
--- a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/VirtualNetwork.cs
+++ b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Entities/VirtualNetwork.cs
@@ -1,6 +1,6 @@
using System;
-namespace Logixware.SoftEther.Client.Daemon
+namespace Logixware.SoftEther.Client.Daemon.Entities
{
public class VirtualNetwork
{
diff --git a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Program.cs b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Hosting/Program.cs
similarity index 54%
rename from src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Program.cs
rename to src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Hosting/Program.cs
index 27e2542..a162a8c 100644
--- a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Program.cs
+++ b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Hosting/Program.cs
@@ -1,20 +1,12 @@
using System;
using System.IO;
using System.Threading.Tasks;
-using System.Runtime.InteropServices;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-using Logixware.SoftEther.Client.VpnService;
-using Logixware.SoftEther.Client.Daemon.Platform;
-
-using Logixware.SoftEther.Client.Shell;
-using Logixware.SoftEther.Client.Shell.Platform;
-
-namespace Logixware.SoftEther.Client.Daemon
+namespace Logixware.SoftEther.Client.Daemon.Hosting
{
public class Program
{
@@ -30,6 +22,7 @@ public static async Task Main(String[] args)
configHost.SetBasePath(Directory.GetCurrentDirectory());
configHost.AddJsonFile("hostsettings.json", optional: true);
configHost.AddEnvironmentVariables(prefix: "PREFIX_");
+ configHost.ConfigureHostConfiguration();
configHost.AddCommandLine(args);
})
@@ -38,6 +31,7 @@ public static async Task Main(String[] args)
configApp.AddJsonFile("appsettings.json", optional: true);
configApp.AddJsonFile($"appsettings.{hostContext.HostingEnvironment.EnvironmentName}.json", optional: true);
configApp.AddEnvironmentVariables(prefix: "PREFIX_");
+ configApp.ConfigureAppConfiguration(hostContext);
configApp.AddCommandLine(args);
__ConfigurationRoot = configApp.Build();
@@ -45,29 +39,7 @@ public static async Task Main(String[] args)
.ConfigureServices((hostContext, services) =>
{
- services.AddLogging();
- services.AddHostedService();
- services.AddSingleton(services);
- services.AddSingleton();
- services.AddSingleton();
- services.AddSingleton();
-
- services.AddSingleton(__ConfigurationRoot);
-
- if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- {
- services.AddSingleton();
- services.AddSingleton();
- }
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
- {
- services.AddSingleton();
- services.AddSingleton();
- }
- else
- {
- throw new NotSupportedException("Platform not supported.");
- }
+ services.ConfigureServices(__ConfigurationRoot);
})
.ConfigureLogging((hostContext, configLogging) =>
diff --git a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Hosting/ProgramCollectionExtensions.cs b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Hosting/ProgramCollectionExtensions.cs
new file mode 100644
index 0000000..365c710
--- /dev/null
+++ b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Hosting/ProgramCollectionExtensions.cs
@@ -0,0 +1,81 @@
+using System;
+using System.Runtime.InteropServices;
+
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+
+using Logixware.SoftEther.Client.Shell;
+using Logixware.SoftEther.Client.Shell.Platform;
+using Logixware.SoftEther.Client.VpnService;
+
+using Logixware.SoftEther.Client.Daemon.Services;
+
+namespace Logixware.SoftEther.Client.Daemon.Hosting
+{
+ internal static class ProgramCollectionExtensions
+ {
+ internal static void ConfigureHostConfiguration(this IConfigurationBuilder configHost)
+ {
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ {
+ configHost.AddJsonFile("/Library/Preferences/Logixware/Logixware.SoftEther.Client.Daemon/hostsettings.json", optional: true);
+ }
+ else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+ {
+ configHost.AddJsonFile("/etc/logixware/Logixware.SoftEther.Client.Daemon/hostsettings.json", optional: true);
+ }
+ else
+ {
+ throw new NotSupportedException("Platform not supported.");
+ }
+ }
+
+ internal static void ConfigureAppConfiguration(this IConfigurationBuilder configApp, HostBuilderContext hostContext)
+ {
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ {
+ configApp.AddJsonFile("/Library/Preferences/Logixware/Logixware.SoftEther.Client.Daemon/appsettings.json", optional: true);
+ configApp.AddJsonFile($"/Library/Preferences/Logixware/Logixware.SoftEther.Client.Daemon/appsettings.{hostContext.HostingEnvironment.EnvironmentName}.json", optional: false);
+ }
+ else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+ {
+ configApp.AddJsonFile("/etc/logixware/Logixware.SoftEther.Client.Daemon/appsettings.json", optional: true);
+ configApp.AddJsonFile($"/etc/logixware/Logixware.SoftEther.Client.Daemon/appsettings.{hostContext.HostingEnvironment.EnvironmentName}.json", optional: true);
+ }
+ else
+ {
+ throw new NotSupportedException("Platform not supported.");
+ }
+ }
+
+ internal static void ConfigureServices(this IServiceCollection services, IConfigurationRoot configurationRoot)
+ {
+ services.AddSingleton(services);
+ services.AddSingleton(configurationRoot);
+
+ services.AddHostedService();
+
+ services.AddSingleton();
+ services.AddSingleton();
+ services.AddSingleton();
+ services.AddSingleton();
+ services.AddSingleton();
+
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ {
+ services.AddSingleton();
+ services.AddSingleton();
+ }
+ else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+ {
+ services.AddSingleton();
+ services.AddSingleton();
+ }
+ else
+ {
+ throw new NotSupportedException("Platform not supported.");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Hosting/ProgramService.cs b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Hosting/ProgramService.cs
new file mode 100644
index 0000000..3ccf3ea
--- /dev/null
+++ b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Hosting/ProgramService.cs
@@ -0,0 +1,61 @@
+using System;
+
+using System.Threading;
+using System.Threading.Tasks;
+
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+
+using Logixware.SoftEther.Client.Daemon.Services;
+
+namespace Logixware.SoftEther.Client.Daemon.Hosting
+{
+ public class ProgramService : IHostedService
+ {
+ private readonly ILogger _Logger;
+ private readonly IApplicationLifetime _AppLifetime;
+ private readonly IClientService _ClientService;
+
+ public ProgramService
+ (
+ ILogger logger,
+ IApplicationLifetime appLifetime,
+ IClientService nasService
+ )
+ {
+ this._Logger = logger ?? throw new ArgumentNullException(nameof(logger));
+ this._AppLifetime = appLifetime ?? throw new ArgumentNullException(nameof(appLifetime));
+ this._ClientService = nasService ?? throw new ArgumentNullException(nameof(nasService));
+ }
+
+ public async Task StartAsync(CancellationToken cancellationToken)
+ {
+ this._AppLifetime.ApplicationStarted.Register(this.OnStarted);
+ this._AppLifetime.ApplicationStopping.Register(this.OnStopping);
+ this._AppLifetime.ApplicationStopped.Register(this.OnStopped);
+
+ await this._ClientService.StartAsync(cancellationToken);
+ }
+
+ public async Task StopAsync(CancellationToken cancellationToken)
+ {
+ this._Logger.Inform("Shutting down application...");
+ await this._ClientService.StopAsync(cancellationToken);
+ }
+
+ private void OnStarted()
+ {
+ this._Logger.Inform("Starting application...");
+ }
+
+ private void OnStopping()
+ {
+ this._Logger.Inform("Shutting down application...");
+ }
+
+ private void OnStopped()
+ {
+ this._Logger.Inform("Application shut down. C ya.");
+ }
+ }
+}
diff --git a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/IConnectionVerifier.cs b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/IConnectionVerifier.cs
deleted file mode 100644
index aafe753..0000000
--- a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/IConnectionVerifier.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using System;
-
-namespace Logixware.SoftEther.Client.Daemon
-{
- public interface IConnectionVerifier
- {
- ConnectionVerificationResult Verify(String host);
- }
-}
\ No newline at end of file
diff --git a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/ReachableResult.cs b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/ReachableResult.cs
index 0fc7f6f..a5f87ec 100644
--- a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/ReachableResult.cs
+++ b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/ReachableResult.cs
@@ -1,5 +1,7 @@
using System;
+using Logixware.SoftEther.Client.Daemon.Services;
+
namespace Logixware.SoftEther.Client.Daemon
{
public struct ReachableResult
diff --git a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/ClientConfiguration.cs b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Services/ClientConfiguration.cs
similarity index 97%
rename from src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/ClientConfiguration.cs
rename to src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Services/ClientConfiguration.cs
index 2f14f1b..8a360e0 100644
--- a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/ClientConfiguration.cs
+++ b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Services/ClientConfiguration.cs
@@ -8,7 +8,10 @@
using Logixware.SoftEther.Client.VpnService;
-namespace Logixware.SoftEther.Client.Daemon
+using Logixware.SoftEther.Client.Daemon.Entities;
+using Logixware.SoftEther.Client.Daemon.Configuration;
+
+namespace Logixware.SoftEther.Client.Daemon.Services
{
public class ClientConfiguration : IClientConfiguration
{
diff --git a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/ProgramService.cs b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Services/ClientService.cs
similarity index 63%
rename from src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/ProgramService.cs
rename to src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Services/ClientService.cs
index f10259b..ccb1055 100644
--- a/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/ProgramService.cs
+++ b/src/Logixware.SoftEther.Client.Daemon/Logixware/SoftEther/Client/Daemon/Services/ClientService.cs
@@ -13,16 +13,17 @@
using Logixware.SoftEther.Client.VpnService;
-namespace Logixware.SoftEther.Client.Daemon
+namespace Logixware.SoftEther.Client.Daemon.Services
{
- public class ProgramService : IHostedService
+ public class ClientService : IClientService, IDisposable
{
- private readonly ILogger _Logger;
+ private readonly ILogger _Logger;
private readonly ILogger _NetworkLogger;
private readonly IApplicationLifetime _AppLifetime;
private readonly IClientConfiguration _Configuration;
private readonly ICommandLineInterface _Cli;
- private readonly IConnectionVerifier _ConnectionVerifier;
+ private readonly IVpnConnectionVerifier _VpnConnectionVerifier;
+ private readonly IInternetConnectionVerifier _InternetConnectionVerifierVerifier;
private readonly IPlatform _Platform;
private readonly Subject
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Logixware.SoftEther.Client.Manager/Properties/AssemblyInfo/AssemblyVersion.txt b/src/Logixware.SoftEther.Client.Manager/Properties/AssemblyInfo/AssemblyVersion.txt
index 349c513..904927c 100755
--- a/src/Logixware.SoftEther.Client.Manager/Properties/AssemblyInfo/AssemblyVersion.txt
+++ b/src/Logixware.SoftEther.Client.Manager/Properties/AssemblyInfo/AssemblyVersion.txt
@@ -1 +1 @@
-1.0.0.16
\ No newline at end of file
+1.0.1.18
\ No newline at end of file
diff --git a/src/Logixware.SoftEther.Client.Manager/Resources/daemon/.gitkeep b/src/Logixware.SoftEther.Client.Manager/Resources/daemon/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/src/Logixware.SoftEther.Client.Manager/Resources/vpnclient/.gitkeep b/src/Logixware.SoftEther.Client.Manager/Resources/vpnclient/.gitkeep
deleted file mode 100644
index e69de29..0000000