diff --git a/Texnomic.ENS.BaseRegistrar/Texnomic.ENS.BaseRegistrar.csproj b/Texnomic.ENS.BaseRegistrar/Texnomic.ENS.BaseRegistrar.csproj
index 9f160ec0..345e74e7 100644
--- a/Texnomic.ENS.BaseRegistrar/Texnomic.ENS.BaseRegistrar.csproj
+++ b/Texnomic.ENS.BaseRegistrar/Texnomic.ENS.BaseRegistrar.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ netstandard2.1
diff --git a/Texnomic.SecureDNS.Terminal/CLI.cs b/Texnomic.SecureDNS.Terminal/CLI.cs
index cc081385..e631031c 100644
--- a/Texnomic.SecureDNS.Terminal/CLI.cs
+++ b/Texnomic.SecureDNS.Terminal/CLI.cs
@@ -6,8 +6,6 @@
using Texnomic.DNS.Servers;
using Texnomic.SecureDNS.Terminal.Options;
-using Console = Colorful.Console;
-
namespace Texnomic.SecureDNS.Terminal
{
public class CLI : IHostedService, IDisposable
@@ -26,9 +24,6 @@ public CLI(IOptionsMonitor TerminalOptions, ProxyServer ProxySe
public async Task StartAsync(CancellationToken CancellationToken)
{
- Server.Started += (Sender, Args) => Console.WriteLine(" Server Started.\n\r");
- Server.Stopped += (Sender, Args) => Console.WriteLine("\n\r Server Stopped.");
-
await Server.StartAsync(CancellationToken);
}
diff --git a/Texnomic.SecureDNS.Terminal/Program.cs b/Texnomic.SecureDNS.Terminal/Program.cs
index 22b30a73..a6035117 100644
--- a/Texnomic.SecureDNS.Terminal/Program.cs
+++ b/Texnomic.SecureDNS.Terminal/Program.cs
@@ -1,6 +1,7 @@
using System;
using System.IO;
using System.Linq;
+using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Colorful;
@@ -24,7 +25,6 @@
using Texnomic.SecureDNS.Protocols;
using Texnomic.SecureDNS.Terminal.Enums;
using Texnomic.SecureDNS.Terminal.Options;
-using Texnomic.SecureDNS.Terminal.Properties;
using Console = Colorful.Console;
using Protocol = Texnomic.SecureDNS.Terminal.Enums.Protocol;
@@ -54,10 +54,26 @@ public static async Task Main(string[] Arguments)
await HostBuilder.RunConsoleAsync();
}
+ private static byte[] ReadResource(string Name)
+ {
+ var MainAssembly = Assembly.GetExecutingAssembly();
+
+ var ResourceName = MainAssembly.GetManifestResourceNames()
+ .Single(Resource => Resource.EndsWith(Name));
+
+ using var Stream = MainAssembly.GetManifestResourceStream(ResourceName);
+
+ var Buffer = new byte[Stream.Length];
+
+ Stream.Read(Buffer);
+
+ return Buffer;
+ }
+
private static void BuildHost()
{
if(!File.Exists("AppSettings.json"))
- File.WriteAllBytes("AppSettings.json", Resources.AppSettings);
+ File.WriteAllBytes("AppSettings.json", ReadResource("AppSettings.json"));
HostBuilder = new HostBuilder()
.ConfigureAppConfiguration(ConfigureApp)
@@ -84,7 +100,7 @@ private static void Splash()
{
Console.Title = "Texnomic SecureDNS";
- var Speed = new Figlet(FigletFont.Load(Resources.Speed));
+ var Speed = new Figlet(FigletFont.Load(ReadResource("Speed.flf")));
Console.WriteWithGradient(Speed.ToAscii(" Texnomic").ConcreteValue.ToArray(), System.Drawing.Color.Yellow, System.Drawing.Color.Fuchsia, 14);
@@ -99,7 +115,7 @@ private static void ConfigureApp(HostBuilderContext HostBuilderContext, IConfigu
}
private static void ConfigureLogging(HostBuilderContext HostBuilderContext, ILoggingBuilder Logging)
{
- Logging.AddConsole();
+ //Logging.AddConsole();
}
private static void ConfigureLogger(HostBuilderContext HostBuilderContext, LoggerConfiguration LoggerConfiguration)
{
diff --git a/Texnomic.SecureDNS.Terminal/Properties/Resources.Designer.cs b/Texnomic.SecureDNS.Terminal/Properties/Resources.Designer.cs
index 969da6e5..220e6c1d 100644
--- a/Texnomic.SecureDNS.Terminal/Properties/Resources.Designer.cs
+++ b/Texnomic.SecureDNS.Terminal/Properties/Resources.Designer.cs
@@ -59,25 +59,5 @@ internal Resources() {
resourceCulture = value;
}
}
-
- ///
- /// Looks up a localized resource of type System.Byte[].
- ///
- internal static byte[] AppSettings {
- get {
- object obj = ResourceManager.GetObject("AppSettings", resourceCulture);
- return ((byte[])(obj));
- }
- }
-
- ///
- /// Looks up a localized resource of type System.Byte[].
- ///
- internal static byte[] Speed {
- get {
- object obj = ResourceManager.GetObject("Speed", resourceCulture);
- return ((byte[])(obj));
- }
- }
}
}
diff --git a/Texnomic.SecureDNS.Terminal/Properties/Resources.resx b/Texnomic.SecureDNS.Terminal/Properties/Resources.resx
index f3993cb5..1af7de15 100644
--- a/Texnomic.SecureDNS.Terminal/Properties/Resources.resx
+++ b/Texnomic.SecureDNS.Terminal/Properties/Resources.resx
@@ -117,11 +117,4 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- ..\AppSettings.json;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- ..\Fonts\Speed.flf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
\ No newline at end of file
diff --git a/Texnomic.SecureDNS.Terminal/Texnomic.SecureDNS.Terminal.csproj b/Texnomic.SecureDNS.Terminal/Texnomic.SecureDNS.Terminal.csproj
index a06dd402..3868dcb7 100644
--- a/Texnomic.SecureDNS.Terminal/Texnomic.SecureDNS.Terminal.csproj
+++ b/Texnomic.SecureDNS.Terminal/Texnomic.SecureDNS.Terminal.csproj
@@ -21,6 +21,16 @@
Texnomic SecureDNS Terminal
+
+
+
+
+
+
+
+
+
+
@@ -73,9 +83,9 @@
-
+
Always
-
+
diff --git a/Texnomic.Sodium/Texnomic.Sodium.csproj b/Texnomic.Sodium/Texnomic.Sodium.csproj
index 65170609..1991ae11 100644
--- a/Texnomic.Sodium/Texnomic.Sodium.csproj
+++ b/Texnomic.Sodium/Texnomic.Sodium.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ netstandard2.1