-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change paths for services and configuration
- Loading branch information
1 parent
6da5145
commit 525a315
Showing
47 changed files
with
394 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
https://www.flaticon.com/free-icon/vpn_188120 | ||
## SoftEther VPN Client | ||
|
||
|
||
|
||
https://www.flaticon.com/free-icon/vpn_188120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...ware.SoftEther.Client.Core/Logixware/SoftEther/Client/VpnService/ICommandLineInterface.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Logixware.SoftEther.Client.Core/Properties/AssemblyInfo/AssemblyVersion.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.0.0.5 | ||
1.0.0.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...ient/Daemon/ClientConfigurationSection.cs → ...nfiguration/ClientConfigurationSection.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...atform/MacPlatformConfigurationSection.cs → ...ration/MacPlatformConfigurationSection.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...oftEther/Client/Daemon/IPv4Information.cs → ...Client/Daemon/Entities/IPv4Information.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ware/SoftEther/Client/Daemon/IPv4Route.cs → ...Ether/Client/Daemon/Entities/IPv4Route.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...oftEther/Client/Daemon/IPv6Information.cs → ...Client/Daemon/Entities/IPv6Information.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ware/SoftEther/Client/Daemon/IPv6Route.cs → ...Ether/Client/Daemon/Entities/IPv6Route.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...SoftEther/Client/Daemon/VirtualNetwork.cs → .../Client/Daemon/Entities/VirtualNetwork.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
...er.Client.Daemon/Logixware/SoftEther/Client/Daemon/Hosting/ProgramCollectionExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<ProgramService>(); | ||
|
||
services.AddSingleton<IClientService, ClientService>(); | ||
services.AddSingleton<IInternetConnectionVerifier, InternetConnectionVerifier>(); | ||
services.AddSingleton<IClientConfiguration, ClientConfiguration>(); | ||
services.AddSingleton<ICommandLineInterface, CommandLineInterface>(); | ||
services.AddSingleton<IVpnConnectionVerifier, PingVpnConnectionVerifier>(); | ||
|
||
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) | ||
{ | ||
services.AddSingleton<IShell, BashShell>(); | ||
services.AddSingleton<IPlatform, MacPlatform>(); | ||
} | ||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) | ||
{ | ||
services.AddSingleton<IShell, BashShell>(); | ||
services.AddSingleton<IPlatform, LinuxPlatform>(); | ||
} | ||
else | ||
{ | ||
throw new NotSupportedException("Platform not supported."); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.