diff --git a/DnsServerApp.NETCore/DnsServerApp.NETCore.csproj b/DnsServerApp.NETCore/DnsServerApp.NETCore.csproj new file mode 100644 index 00000000..c6743b23 --- /dev/null +++ b/DnsServerApp.NETCore/DnsServerApp.NETCore.csproj @@ -0,0 +1,46 @@ + + + + false + Exe + netcoreapp2.0 + logo2.ico + 1.2.0.1 + Technitium + Technitium DNS Server + Shreyas Zare + DnsServerApp + DnsServerApp + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + + + + + + + + ..\..\..\Reference\Newtonsoft.Json\netstandard1.0\Newtonsoft.Json.dll + + + ..\..\TechnitiumLibrary\bin\TechnitiumLibrary.IO.dll + + + ..\..\TechnitiumLibrary\bin\TechnitiumLibrary.Net.dll + + + + diff --git a/DnsServerApp.NETCore/Program.cs b/DnsServerApp.NETCore/Program.cs new file mode 100644 index 00000000..988290a8 --- /dev/null +++ b/DnsServerApp.NETCore/Program.cs @@ -0,0 +1,56 @@ +/* +Technitium DNS Server +Copyright (C) 2017 Shreyas Zare (shreyas@technitium.com) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +*/ + +using DnsServerCore; +using System; + +namespace DnsServerApp +{ + class Program + { + static void Main(string[] args) + { + string configFolder = null; + + if (args.Length == 1) + configFolder = args[0]; + + DnsWebService service = new DnsWebService(configFolder); + + service.Start(); + Console.WriteLine("Technitium DNS Server was started successfully."); + Console.WriteLine("Using config folder: " + service.ConfigFolder); + Console.WriteLine(""); + Console.WriteLine("Note: Open http://localhost:" + service.WebServicePort + "/ in web browser to access web console."); + Console.WriteLine(""); + Console.WriteLine("Press [CTRL + X] to stop..."); + + while (true) + { + ConsoleKeyInfo key = Console.ReadKey(true); + + if (key.Modifiers == ConsoleModifiers.Control && key.Key == ConsoleKey.X) + break; + } + + service.Stop(); + Console.WriteLine("Technitium DNS Server was stopped successfully."); + } + } +} diff --git a/DnsServerApp.NETCore/logo2.ico b/DnsServerApp.NETCore/logo2.ico new file mode 100644 index 00000000..67432fd8 Binary files /dev/null and b/DnsServerApp.NETCore/logo2.ico differ diff --git a/DnsServerApp.NETCore/start.bat b/DnsServerApp.NETCore/start.bat new file mode 100644 index 00000000..fc3ca1c6 --- /dev/null +++ b/DnsServerApp.NETCore/start.bat @@ -0,0 +1 @@ +dotnet DnsServerApp.dll \ No newline at end of file diff --git a/DnsServerApp.NETCore/start.sh b/DnsServerApp.NETCore/start.sh new file mode 100644 index 00000000..7dbd0365 --- /dev/null +++ b/DnsServerApp.NETCore/start.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +dotnet DnsServerApp.exe