From 209c68452c2997b6fbeb189dd8b2c29ebaa2b467 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Mon, 20 Apr 2020 13:03:45 -0400 Subject: [PATCH] remove the win10 vpn plugin stuff --- ZitiBackgroundTask/IpHeader.cs | 477 -------------- ZitiBackgroundTask/Properties/AssemblyInfo.cs | 29 - ZitiBackgroundTask/VPNHelper.cs | 28 - ZitiBackgroundTask/ZitiBackgroundTask.csproj | 172 ----- ZitiBackgroundTask/src/VPNTask.cs | 67 -- ZitiBackgroundTask/src/VpnPluginContext.cs | 81 --- ZitiBackgroundTask/src/VpnPluginState.cs | 10 - ZitiBackgroundTask/src/ZitiVPNPlugin.cs | 296 --------- .../_backup_eligable_to_delete/IpHeader.cs | 273 -------- .../src/_backup_eligable_to_delete/Packet.cs | 38 -- .../_backup_eligable_to_delete/Protocol.cs | 162 ----- .../src/_backup_eligable_to_delete/TCP.cs | 15 - .../src/_backup_eligable_to_delete/UDP.cs | 16 - .../src/debugging/DebugTcpServer.cs | 58 -- ZitiBackgroundTask/src/ip/DnsHeader.cs | 115 ---- ZitiBackgroundTask/src/ip/ICMP.cs | 14 - ZitiBackgroundTask/src/ip/IpHeader.cs | 360 ----------- ZitiBackgroundTask/src/ip/Packet.cs | 24 - ZitiBackgroundTask/src/ip/Protocol.cs | 170 ----- ZitiBackgroundTask/src/ip/TCP.cs | 15 - ZitiBackgroundTask/src/ip/TcpHeader.cs | 293 --------- ZitiBackgroundTask/src/ip/UDP.cs | 16 - ZitiBackgroundTask/src/ip/UdpHeader.cs | 87 --- .../src/util/BinaryVisualiser.cs | 45 -- ZitiBackgroundTask/src/util/HexHelper.cs | 92 --- ZitiBackgroundTask/src/util/LogHelper.cs | 19 - ZitiBackgroundTask/src/ziti/Controller.cs | 139 ---- .../src/ziti/route/Intercept.cs | 21 - .../src/ziti/route/RouteInformation.cs | 20 - ZitiTunneler/App.config | 6 +- ZitiTunneler/Properties/Resources.Designer.cs | 101 +-- ZitiTunneler/Properties/Settings.Designer.cs | 28 +- ZitiTunneler/ZitiTunneler.csproj | 3 +- ZitiUWPClient/AddIdentity.xaml | 21 - ZitiUWPClient/App.xaml | 7 - ZitiUWPClient/App.xaml.cs | 100 --- .../Assets/LockScreenLogo.scale-200.png | Bin 1430 -> 0 bytes .../Assets/SplashScreen.scale-200.png | Bin 7700 -> 0 bytes .../Assets/Square150x150Logo.scale-200.png | Bin 2937 -> 0 bytes .../Assets/Square44x44Logo.scale-200.png | Bin 1647 -> 0 bytes ...x44Logo.targetsize-24_altform-unplated.png | Bin 1255 -> 0 bytes ZitiUWPClient/Assets/StoreLogo.png | Bin 1451 -> 0 bytes .../Assets/Wide310x150Logo.scale-200.png | Bin 3204 -> 0 bytes ZitiUWPClient/MainPage.xaml | 66 -- ZitiUWPClient/MainPage.xaml.cs | 606 ------------------ ZitiUWPClient/Package.appxmanifest | 39 -- ZitiUWPClient/Properties/AssemblyInfo.cs | 29 - ZitiUWPClient/Properties/Default.rd.xml | 31 - ZitiUWPClient/ZitiUWPClient.csproj | 196 ------ ZitiUWPSolution.sln | 52 -- 50 files changed, 70 insertions(+), 4367 deletions(-) delete mode 100644 ZitiBackgroundTask/IpHeader.cs delete mode 100644 ZitiBackgroundTask/Properties/AssemblyInfo.cs delete mode 100644 ZitiBackgroundTask/VPNHelper.cs delete mode 100644 ZitiBackgroundTask/ZitiBackgroundTask.csproj delete mode 100644 ZitiBackgroundTask/src/VPNTask.cs delete mode 100644 ZitiBackgroundTask/src/VpnPluginContext.cs delete mode 100644 ZitiBackgroundTask/src/VpnPluginState.cs delete mode 100644 ZitiBackgroundTask/src/ZitiVPNPlugin.cs delete mode 100644 ZitiBackgroundTask/src/_backup_eligable_to_delete/IpHeader.cs delete mode 100644 ZitiBackgroundTask/src/_backup_eligable_to_delete/Packet.cs delete mode 100644 ZitiBackgroundTask/src/_backup_eligable_to_delete/Protocol.cs delete mode 100644 ZitiBackgroundTask/src/_backup_eligable_to_delete/TCP.cs delete mode 100644 ZitiBackgroundTask/src/_backup_eligable_to_delete/UDP.cs delete mode 100644 ZitiBackgroundTask/src/debugging/DebugTcpServer.cs delete mode 100644 ZitiBackgroundTask/src/ip/DnsHeader.cs delete mode 100644 ZitiBackgroundTask/src/ip/ICMP.cs delete mode 100644 ZitiBackgroundTask/src/ip/IpHeader.cs delete mode 100644 ZitiBackgroundTask/src/ip/Packet.cs delete mode 100644 ZitiBackgroundTask/src/ip/Protocol.cs delete mode 100644 ZitiBackgroundTask/src/ip/TCP.cs delete mode 100644 ZitiBackgroundTask/src/ip/TcpHeader.cs delete mode 100644 ZitiBackgroundTask/src/ip/UDP.cs delete mode 100644 ZitiBackgroundTask/src/ip/UdpHeader.cs delete mode 100644 ZitiBackgroundTask/src/util/BinaryVisualiser.cs delete mode 100644 ZitiBackgroundTask/src/util/HexHelper.cs delete mode 100644 ZitiBackgroundTask/src/util/LogHelper.cs delete mode 100644 ZitiBackgroundTask/src/ziti/Controller.cs delete mode 100644 ZitiBackgroundTask/src/ziti/route/Intercept.cs delete mode 100644 ZitiBackgroundTask/src/ziti/route/RouteInformation.cs delete mode 100644 ZitiUWPClient/AddIdentity.xaml delete mode 100644 ZitiUWPClient/App.xaml delete mode 100644 ZitiUWPClient/App.xaml.cs delete mode 100644 ZitiUWPClient/Assets/LockScreenLogo.scale-200.png delete mode 100644 ZitiUWPClient/Assets/SplashScreen.scale-200.png delete mode 100644 ZitiUWPClient/Assets/Square150x150Logo.scale-200.png delete mode 100644 ZitiUWPClient/Assets/Square44x44Logo.scale-200.png delete mode 100644 ZitiUWPClient/Assets/Square44x44Logo.targetsize-24_altform-unplated.png delete mode 100644 ZitiUWPClient/Assets/StoreLogo.png delete mode 100644 ZitiUWPClient/Assets/Wide310x150Logo.scale-200.png delete mode 100644 ZitiUWPClient/MainPage.xaml delete mode 100644 ZitiUWPClient/MainPage.xaml.cs delete mode 100644 ZitiUWPClient/Package.appxmanifest delete mode 100644 ZitiUWPClient/Properties/AssemblyInfo.cs delete mode 100644 ZitiUWPClient/Properties/Default.rd.xml delete mode 100644 ZitiUWPClient/ZitiUWPClient.csproj diff --git a/ZitiBackgroundTask/IpHeader.cs b/ZitiBackgroundTask/IpHeader.cs deleted file mode 100644 index ee1c09e6..00000000 --- a/ZitiBackgroundTask/IpHeader.cs +++ /dev/null @@ -1,477 +0,0 @@ -using System.Net; -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; - - -namespace ZitiBackgroundTask -{ - public enum Protocol - { - TCP = 6, - UDP = 17, - Unknown = -1 - }; - - /// - /// This class encapsulates all the IP header fields and provides a mechanism - /// to set and get the details of them through a parameterized contructor - /// and public properties respectively. - /// - class IpHeader - { - // Eight bits for version and header length. - public byte _versionAndHeaderLength; - // Eight bits for differentiated services (TOS). - public byte _differentiatedServices; - // Sixteen bits for total length of the datagram (header + message). - public ushort _totalLength; - // Sixteen bits for identification. - public ushort _identification; - // Eight bits for flags and fragmentation offset. - public ushort _flagsAndOffset; - // Eight bits for TTL (Time To Live). - public byte _ttl; - // Eight bits for the underlying protocol. - public byte _protocol; - // Sixteen bits containing the checksum of the header - // (checksum can be negative so taken as short). - public short _checksum; - // Thirty two bit source IP Address. - internal uint _sourceIPAddress; - // Thirty two bit destination IP Address. - internal uint _destinationIPAddress; - // Header length. - public byte _headerLength; - // Data carried by the datagram. - public byte[] _ipData = default;//new byte[2 << 15]; - - public void WriteTo(TextWriter writer) - { - writer.WriteLine("_vionAndHeaderLength: " + _versionAndHeaderLength); - writer.WriteLine("ByDifferentiatedServices: " + _differentiatedServices); - writer.WriteLine("UsTotalLength: " + _totalLength); - writer.WriteLine("UsIdentification: " + _identification); - writer.WriteLine("usFlagsAndOffset: " + _flagsAndOffset); - writer.WriteLine("_ttl: " + _ttl); - writer.WriteLine("_protocol: " + _protocol); - writer.WriteLine("SChecksum: " + _checksum); - writer.WriteLine("UiSourceIPAddress: " + _sourceIPAddress); - writer.WriteLine("UiDestinationIPAddress: " + _destinationIPAddress); - writer.WriteLine("_headerLength: " + _headerLength); - writer.WriteLine("As Hex: "); - writer.WriteLine(BinaryVisualiser.FormatAsHex(Data, _totalLength)); - writer.Flush(); - } - - public void WriteTo(System.IO.Stream stream) - {/* - write(stream, _versionAndHeaderLength); - write(stream, _differentiatedServices); - write(stream, _totalLength); - write(stream, _identification); - write(stream, _fagsAndOffset); - write(stream, _ttl); - write(stream, _protocol); - write(stream, SChecksum); - write(stream, _sourceIPAddress); - write(stream, _destinationIPAddress); - write(stream, _headerLength); - writeIpData(stream);*/ - - System.IO.BinaryWriter writer = new BinaryWriter(stream); - writer.Write(_versionAndHeaderLength); - writer.Write(_differentiatedServices); - writer.Write(_totalLength); - writer.Write(_identification); - writer.Write(_flagsAndOffset); - writer.Write(_ttl); - writer.Write(_protocol); - writer.Write(_checksum); - writer.Write(_sourceIPAddress); - writer.Write(_destinationIPAddress); - writer.Write(_headerLength); - writer.Write(_ipData, 0, MessageLength); - writer.Flush(); - } - /* - private void write(BinaryWriter target, byte toWrite) - { - target.WriteByte(toWrite); - } - private void write(BinaryWriter target, ushort toWrite) - { - byte[] bytes = BitConverter.GetBytes(toWrite); - target.Write(bytes, 0, bytes.Length); - } - private void write(BinaryWriter target, short toWrite) - { - byte[] bytes = BitConverter.GetBytes(toWrite); - target.Write(bytes, 0, bytes.Length); - } - private void write(BinaryWriter target, uint toWrite) - { - byte[] bytes = BitConverter.GetBytes(toWrite); - target.Write(bytes, 0, bytes.Length); - } - private void writeIpData(BinaryWriter target) - { - target.Write(ByIPData, 0, MessageLength); - }*/ - - private byte[] _ipPacket = new byte[2 << 15]; //65535 is the biggest packet possible - - private IpHeader() - { - //private use only - } - - public IpHeader([System.Runtime.InteropServices.WindowsRuntime.ReadOnlyArray()] - byte[] byBuffer, int nReceived) : this(byBuffer, 0, nReceived) - { - } - - public IpHeader(System.IO.Stream stream) - { - BinaryReader binaryReader = new BinaryReader(stream); - } - - public IpHeader([System.Runtime.InteropServices.WindowsRuntime.ReadOnlyArray()] - byte[] byBuffer, int position, int nReceived) : - this(new BinaryReader(new MemoryStream(byBuffer, position, nReceived - position))) - {/* - // Create MemoryStream out of the received bytes. - MemoryStream memoryStream = new MemoryStream(byBuffer, position, nReceived - position); - // Next we create a BinaryReader out of the MemoryStream. - BinaryReader binaryReader = new BinaryReader(memoryStream); - - return new IpHeader(binaryReader);*/ - } - - public IpHeader(BinaryReader binaryReader) - { - this.initialize(binaryReader); - } - - private void initialize(BinaryReader binaryReader) - { - try - { - // The first eight bits of the IP header contain the version and - // header length so we read them. - _versionAndHeaderLength = binaryReader.ReadByte(); - // The next eight bits contain the Differentiated services. - _differentiatedServices = binaryReader.ReadByte(); - // Next eight bits hold the total length of the datagram. - _totalLength = (ushort)IPAddress.NetworkToHostOrder( - binaryReader.ReadInt16()); - // Next sixteen have the identification bytes. - _identification = (ushort)IPAddress.NetworkToHostOrder( - binaryReader.ReadInt16()); - // Next sixteen bits contain the flags and fragmentation offset. - _flagsAndOffset = (ushort)IPAddress.NetworkToHostOrder( - binaryReader.ReadInt16()); - // Next eight bits have the TTL value. - _ttl = binaryReader.ReadByte(); - // Next eight represnts the protocol encapsulated in the datagram. - _protocol = binaryReader.ReadByte(); - // Next sixteen bits contain the checksum of the header. - _checksum = IPAddress.NetworkToHostOrder(binaryReader.ReadInt16()); - // Next thirty two bits have the source IP address. - _sourceIPAddress = (uint)(binaryReader.ReadInt32()); - // Next thirty two hold the destination IP address. - _destinationIPAddress = (uint)(binaryReader.ReadInt32()); - // Now we calculate the header length. - _headerLength = _versionAndHeaderLength; - // The last four bits of the version and header length field contain the - // header length, we perform some simple binary airthmatic operations to - // extract them. - _headerLength <<= 4; - _headerLength >>= 4; - // Multiply by four to get the exact header length. - _headerLength *= 4; - // Copy the data carried by the data gram into another array so that - // according to the protocol being carried in the IP datagram - _ipData = binaryReader.ReadBytes(_totalLength - _headerLength); -/* Array.Copy(byBuffer, _headerLength, _ipData, 0, - _totalLength - _headerLength);*/ - } - catch (Exception ex) - { - - VPNHelper.LogLine(ex.Message); - } - } - - public byte[] IpPacket - { - get { return _ipPacket; } - } - - public string Version - { - get - { - // Calculate the IP version. The four bits of the IP header - // contain the IP version. - if ((_versionAndHeaderLength >> 4) == 4) - { - return "IP v4"; - } - else if ((_versionAndHeaderLength >> 4) == 6) - { - return "IP v6"; - } - else - { - return "Unknown"; - } - } - } - - public string HeaderLength - { - get - { - return _headerLength.ToString(); - } - } - - public ushort MessageLength - { - get - { - // MessageLength = Total length of the datagram - Header length. - return (ushort)(_totalLength - _headerLength); - } - } - - public string DifferentiatedServices - { - get - { - // Returns the differentiated services in hexadecimal format. - return string.Format("0x{0:x2} ({1})", _differentiatedServices, - _differentiatedServices); - } - } - - public string Flags - { - get - { - // The first three bits of the flags and fragmentation field - // represent the flags (which indicate whether the data is - // fragmented or not). - int nFlags = _flagsAndOffset >> 13; - if (nFlags == 2) - { - return "Don't fragment"; - } - else if (nFlags == 1) - { - return "More fragments to come"; - } - else - { - return nFlags.ToString(); - } - } - } - - public string FragmentationOffset - { - get - { - // The last thirteen bits of the flags and fragmentation field - // contain the fragmentation offset. - int nOffset = _flagsAndOffset << 3; - nOffset >>= 3; - return nOffset.ToString(); - } - } - - public string TTL - { - get - { - return _ttl.ToString(); - } - } - - public Protocol ProtocolType - { - get - { - // The protocol field represents the protocol in the data portion - // of the datagram. - if (_protocol == 6) // A value of six represents the TCP protocol. - { - return Protocol.TCP; - } - else if (_protocol == 17) // Seventeen for UDP. - { - return Protocol.UDP; - } - else - { - return Protocol.Unknown; - } - } - } - - public string Checksum - { - get - { - // Returns the checksum in hexadecimal format. - return string.Format("0x{0:x2}", _checksum); - } - } - - public IPAddress SourceAddress - { - get - { - return new IPAddress(_sourceIPAddress); - } - } - - public IPAddress DestinationAddress - { - get - { - return new IPAddress(_destinationIPAddress); - } - } - - public ushort TotalLength - { - get - { - return _totalLength; - } - } - - public string Identification - { - get - { - return _identification.ToString(); - } - } - - public byte[] Data - { - get - { - return _ipData; - } - } - - - public string ToLoooongString() - { - StringBuilder b = new StringBuilder(); - b.Append("Checksum: "); - b.Append(this.Checksum); - //b.Append("Data: "); - //b.Append(this.Data); - b.Append(" DestinationAddress: "); - b.Append(this.DestinationAddress); - b.Append(" DifferentiatedServices: "); - b.Append(this.DifferentiatedServices); - b.Append(" Flags: "); - b.Append(this.Flags); - b.Append(" FragmentationOffset: "); - b.Append(this.FragmentationOffset); - b.Append(" HeaderLength: "); - b.Append(this.HeaderLength); - b.Append(" Identification: "); - b.Append(this.Identification); - b.Append(" MessageLength: "); - b.Append(this.MessageLength); - b.Append(" ProtocolType: "); - b.Append(this.ProtocolType); - b.Append(" ChecksumIP: "); - b.Append(this.Checksum); - b.Append(" SourceAddress: "); - b.Append(this.SourceAddress); - b.Append(" TTL: "); - b.Append(this.TTL); - b.Append(" TotalLength: "); - b.Append(this.TotalLength); - b.Append(" Version: "); - b.Append(this.Version); - - return b.ToString(); - } - - - public static IEnumerable FromStream(Stream stream) - { - IpHeader header = new IpHeader(); - - byte[] _ipPacket = header._ipPacket; - int readResult = stream.Read(_ipPacket, 0, 4); - while (readResult > 0) - { - byte[] pktBytes = new byte[2] { _ipPacket[2], _ipPacket[3] }; - if (BitConverter.IsLittleEndian) - { - Array.Reverse(pktBytes); - } - - ushort utotalIpPacketLen = BitConverter.ToUInt16(pktBytes, 0); - - int totalIpPacketLen = utotalIpPacketLen - 4; - readResult = stream.Read(_ipPacket, 4, totalIpPacketLen); - if (readResult > 0) - { - using (MemoryStream ms = new MemoryStream(_ipPacket)) - using (BinaryReader br = new BinaryReader(ms)) - { - header.initialize(br); - } - } - - yield return header; - - header = new IpHeader(); - _ipPacket = header._ipPacket; - readResult = stream.Read(_ipPacket, 0, 4); - } - } - - } - - internal class Hex - { - public static byte[] StringToByteArrayFastest(string hex) - { - if (hex.Length % 2 == 1) - throw new Exception("The binary key cannot have an odd number of digits"); - - byte[] arr = new byte[hex.Length >> 1]; - - for (int i = 0; i < hex.Length >> 1; ++i) - { - arr[i] = (byte)((GetHexVal(hex[i << 1]) << 4) + (GetHexVal(hex[(i << 1) + 1]))); - } - - return arr; - } - - public static int GetHexVal(char hex) - { - int val = (int)hex; - //For uppercase A-F letters: - return val - (val < 58 ? 48 : 55); - //For lowercase a-f letters: - //return val - (val < 58 ? 48 : 87); - //Or the two combined, but a bit slower: - //return val - (val < 58 ? 48 : (val < 97 ? 55 : 87)); - } - } -} diff --git a/ZitiBackgroundTask/Properties/AssemblyInfo.cs b/ZitiBackgroundTask/Properties/AssemblyInfo.cs deleted file mode 100644 index c16cccae..00000000 --- a/ZitiBackgroundTask/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ZitiBackgroundTask")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ZitiBackgroundTask")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: ComVisible(false)] \ No newline at end of file diff --git a/ZitiBackgroundTask/VPNHelper.cs b/ZitiBackgroundTask/VPNHelper.cs deleted file mode 100644 index cb92c2f3..00000000 --- a/ZitiBackgroundTask/VPNHelper.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using Windows.Networking.Vpn; - -namespace NetFoundry.VPN -{ - public sealed class VPNHelper - { - - public static void ConnectReal() - { - - } - public void ConnectDebug() - { - - } - public static void LogLine(string text, VpnChannel channel) - { - System.Diagnostics.Debug.WriteLine("__X___: " + Environment.CurrentManagedThreadId + ":" + - channel?.GetHashCode() + ":" + text); - } - - public static void LogLine(string text) - { - LogLine(text, null); - } - } -} \ No newline at end of file diff --git a/ZitiBackgroundTask/ZitiBackgroundTask.csproj b/ZitiBackgroundTask/ZitiBackgroundTask.csproj deleted file mode 100644 index c5dee93f..00000000 --- a/ZitiBackgroundTask/ZitiBackgroundTask.csproj +++ /dev/null @@ -1,172 +0,0 @@ - - - - - Debug - AnyCPU - {7393400B-5F2D-493C-BC39-AB3198A9749F} - winmdobj - Properties - NetFoundry.VPN - ZitiBackgroundTask - en-US - UAP - 10.0.17763.0 - 10.0.17763.0 - 14 - 512 - {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - false - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - prompt - 4 - - - x86 - true - bin\x86\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - false - prompt - - - x86 - bin\x86\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - false - prompt - - - ARM - true - bin\ARM\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - false - prompt - - - ARM - bin\ARM\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - false - prompt - - - ARM64 - true - bin\ARM64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - false - prompt - - - ARM64 - bin\ARM64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - false - prompt - - - x64 - true - bin\x64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - false - prompt - - - x64 - bin\x64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - false - prompt - - - PackageReference - - - - - - - - - - - - - - - - - - - - - - - - - 6.2.8 - - - 12.0.3 - - - 1.8.6 - - - 4.5.3 - - - - 14.0 - - - - - - - \ No newline at end of file diff --git a/ZitiBackgroundTask/src/VPNTask.cs b/ZitiBackgroundTask/src/VPNTask.cs deleted file mode 100644 index dfe44884..00000000 --- a/ZitiBackgroundTask/src/VPNTask.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Windows.ApplicationModel.Background; -using Windows.Networking; -using Windows.Networking.Sockets; -using Windows.Networking.Vpn; -using Windows.Storage.Streams; -using System.Diagnostics; -using System.Threading; -using System.Runtime.InteropServices.WindowsRuntime; -using NetFoundry.VPN.Util; - - -namespace NetFoundry.VPN -{ - public sealed class VPNTask : IBackgroundTask - { - - internal static IVpnPlugIn ziti = null; - private static object lockobj = new object(); - - public void Run(IBackgroundTaskInstance taskInstance) - { - var backgroundTaskDeferral = taskInstance.GetDeferral(); - try - { - taskInstance.Canceled += TaskInstance_Canceled; - VpnChannel.ProcessEventAsync(GetPlugin(), taskInstance.TriggerDetails); - } - catch (Exception e) - { - LogHelper.LogLine("An exception occurred. " + e.Message); - LogHelper.LogLine(e.StackTrace); - } - finally - { - backgroundTaskDeferral.Complete(); - } - } - - private void TaskInstance_Canceled(IBackgroundTaskInstance sender, BackgroundTaskCancellationReason reason) - { - LogHelper.LogLine("TaskInstance_Canceled_a_" + sender.ToString()); - LogHelper.LogLine("TaskInstance_Canceled_b_" + reason.ToString()); - - VpnChannel.ProcessEventAsync(GetPlugin(), sender.TriggerDetails); - - LogHelper.LogLine("TaskInstance_Canceled - done. it has been triggered"); - } - - public static IVpnPlugIn GetPlugin() - { - lock (lockobj) { - if (ziti == null) - { - LogHelper.LogLine("singleton ziti plugin created"); - ziti = new ZitiVPNPlugin(); - } - } - - return ziti; - } - } -} diff --git a/ZitiBackgroundTask/src/VpnPluginContext.cs b/ZitiBackgroundTask/src/VpnPluginContext.cs deleted file mode 100644 index 4df738eb..00000000 --- a/ZitiBackgroundTask/src/VpnPluginContext.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -using Windows.Networking; -using Windows.Networking.Sockets; -using Windows.Networking.Vpn; - -namespace NetFoundry.VPN -{ - public sealed class VpnPluginContext - { - internal static VpnPluginContext CURRENT_CONTEXT = new VpnPluginContext(); - - public static VpnPluginContext GetActiveContext() - { - return CURRENT_CONTEXT; - } - public static void ResetActiveContext() - { - CURRENT_CONTEXT = new VpnPluginContext(); - } - - internal IReadOnlyList assignedClientIPv4list = null; - internal IReadOnlyList assignedClientIPv6list = null; - internal VpnDomainNameAssignment vpnDomainNameAssignmenta = new VpnDomainNameAssignment(); - internal VpnRouteAssignment vpnRouteAssignmenta = new VpnRouteAssignment { ExcludeLocalSubnets = false }; - - internal const uint VPN_MTU = 0x4000;//0xFF00; //16 * 1024; //(2 << 15) - 1; - - //internal const uint VPN_MAX_FRAME = 0xFF00; // 16* 1024; // * 32; //(2 << 15) - 1; - internal const uint VPN_MAX_FRAME = 0x00F0; // 16* 1024; // * 32; //(2 << 15) - 1; - - internal List suffixes = new List(); - internal List fqdns = new List(); - internal List routes = new List(); - internal List ipsToCapture = new List(); - - private HostName dns { get; set; } - public HostName DnsServer - { - get - { - return dns; - } - set - { - dns = value; - //dnsServers.Clear(); - //dnsServers.Add(dns); - } - } - - public void addSuffix(string suffix) - { - suffixes.Add(suffix); - } - public void addFQDN(string suffix) - { - fqdns.Add(suffix); - } - /* Maybe implement this some day - public void AddCIDR(string ip) - { - string[] parts = ip.Split('/'); - if (parts.Length != 2) - { - throw new Exception("Invalid CIDR format supplied."); - } - routes.Add(new VpnRoute(new HostName(parts[0]), Byte.Parse(parts[1]))); - }*/ - - public void AddIP(string ip) - { - ipsToCapture.Add(ip); - routes.Add(new VpnRoute(new HostName(ip), 32)); - } - } -} diff --git a/ZitiBackgroundTask/src/VpnPluginState.cs b/ZitiBackgroundTask/src/VpnPluginState.cs deleted file mode 100644 index 760e8059..00000000 --- a/ZitiBackgroundTask/src/VpnPluginState.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace NetFoundry.VPN -{ - enum VpnPluginState - { - Disconnected, - Connecting, - Connected, - Disconnecting - } -} diff --git a/ZitiBackgroundTask/src/ZitiVPNPlugin.cs b/ZitiBackgroundTask/src/ZitiVPNPlugin.cs deleted file mode 100644 index 9bc3d5e3..00000000 --- a/ZitiBackgroundTask/src/ZitiVPNPlugin.cs +++ /dev/null @@ -1,296 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Net; -using System.Text; -using System.Threading.Tasks; -using Windows.Networking.Vpn; -using Windows.Networking.Sockets; -using Windows.Storage.Streams; -using Windows.Networking; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.ApplicationModel.Background; -using System.Net.Sockets; -using System.Security.Cryptography; -using Buffer = System.Buffer; -using NetFoundry.VPN.IP; -using NetFoundry.VPN.Util; - -namespace NetFoundry.VPN -{ - public sealed class ZitiVPNPlugin : IVpnPlugIn - { - internal static int DESIRED_PORT = 8900; - internal static string DESIRED_HOST = "192.168.1.114"; - StreamSocket tcpTransport = null; - - VpnPluginContext vpnContext = VpnPluginContext.GetActiveContext(); - - public ZitiVPNPlugin() - { - Task.Run(() => - { - //start up a server that listens locally and just emits what it receives - NetFoundry.VPN.Debugging.DebugTcpServer.Start(); - }); - } - - public void Connect(VpnChannel channel) - { - try - { - HostName tcpHostname = new HostName(DESIRED_HOST); - string tcpPort = DESIRED_PORT.ToString(); - tcpTransport = new StreamSocket(); - tcpTransport.ConnectAsync(tcpHostname, tcpPort).AsTask().Wait(); //this will succeed... proving you CAN connect... - tcpTransport.CancelIOAsync().AsTask().Wait(); - tcpTransport.Dispose(); //close/dispose of the connection - - tcpTransport = new StreamSocket(); - channel.AssociateTransport(tcpTransport, null); - tcpTransport.ConnectAsync(tcpHostname, tcpPort).AsTask().Wait(); //fails with "no host is known". AssociateTransport is 'doing something' - - string desiredIP = "169.254.100.101"; - - VpnDomainNameAssignment vpnDomainNameAssignment = new VpnDomainNameAssignment(); - - List dnsServers = new List(); - dnsServers.Add(vpnContext.DnsServer); - - List proxyServers = new List(); - //proxyServers not used yet - - foreach (string suf in vpnContext.suffixes) - { - addSuffix(vpnDomainNameAssignment, suf, dnsServers, proxyServers); - } - - foreach (string fqdn in vpnContext.fqdns) - { - addFQDN(vpnDomainNameAssignment, fqdn, dnsServers, proxyServers); - } - - var vpnRouteAssignment = new VpnRouteAssignment { ExcludeLocalSubnets = false }; - var inclusionRoutes = vpnRouteAssignment.Ipv4InclusionRoutes; - foreach (VpnRoute route in vpnContext.routes) - { - LogHelper.LogLine("Adding an included route: " + route, channel); - inclusionRoutes.Add(route); - } - - VpnInterfaceId vpnInterfaceId = null; - - channel.StartWithMainTransport( - new[] { new HostName(desiredIP) }, //this will only succeed if the ip is not 'localhost', 'hostname', '127.0.0.1' etc. must be 'off machine' - vpnContext.assignedClientIPv6list, - vpnInterfaceId, - vpnRouteAssignment, - vpnDomainNameAssignment, - VpnPluginContext.VPN_MTU, - VpnPluginContext.VPN_MAX_FRAME, - false, - tcpTransport); - } - catch (Exception e) - { - LogHelper.LogLine(e.Message); - } - } - - public void addSuffix(VpnDomainNameAssignment domainNameAssignment, string suffix, IEnumerable dnsServers, IEnumerable proxyServers) - { - var vdni1 = new VpnDomainNameInfo(suffix, VpnDomainNameType.Suffix, dnsServers, proxyServers); - domainNameAssignment.DomainNameList.Add(vdni1); - } - public void addFQDN(VpnDomainNameAssignment domainNameAssignment, string suffix, IEnumerable dnsServers, IEnumerable proxyServers) - { - var vdni1 = new VpnDomainNameInfo(suffix, VpnDomainNameType.FullyQualified, dnsServers, proxyServers); - domainNameAssignment.DomainNameList.Add(vdni1); - } - - public async void Disconnect(VpnChannel channel) - { - VpnPluginContext.ResetActiveContext(); - try - { - await tcpTransport?.CancelIOAsync(); - tcpTransport?.Dispose(); - }catch(Exception e) - { - LogHelper.LogLine("bad stuff: " + e.Message); - } - } - - public void GetKeepAlivePayload(VpnChannel channel, out VpnPacketBuffer keepAlivePacket) - { - throw new NotImplementedException(); - } - - public void Encapsulate(VpnChannel channel, VpnPacketBufferList packets, VpnPacketBufferList encapulatedPackets) - { - while (packets?.Size > 0) - { - var packet = packets.RemoveAtBegin(); - VpnAppId packetAppId = packet.AppId; - Windows.Storage.Streams.Buffer packetBuffer = packet.Buffer; - DataReader fromBuffer = DataReader.FromBuffer(packetBuffer); - uint fromBufferUnconsumedBufferLength = fromBuffer.UnconsumedBufferLength; - byte[] bytes = new byte[fromBufferUnconsumedBufferLength]; - fromBuffer.ReadBytes(bytes); - - int bytesRead = bytes.Count(); - - - IpHeader ipHeader = new IpHeader(bytes, bytesRead); - string sourcePort = "0"; - string destPort = "0"; - - // Now according to the protocol being carried by the IP datagram we parse - // the data field of the datagram. - switch (ipHeader.Protocol) - { - case Protocol.TCP: - TcpHeader tcpHeader = new TcpHeader(ipHeader.Data, ipHeader.MessageLength, ipHeader); - - // If the port is equal to 53 then the underlying protocol is DNS. - // Note: DNS can use either TCP or UDP hence checking is done twice. - if (tcpHeader.DestinationPort == "53" || tcpHeader.SourcePort == "53") - { - //DnsHeader dnsHeader = new DnsHeader(ipHeader.Data, (int)ipHeader.MessageLength); - //dnsHeader.PrintDebug(); - //LogLine(dnsHeader.ToString()); - } - - sourcePort = tcpHeader.SourcePort; - destPort = tcpHeader.DestinationPort; - - - LogHelper.LogLine("ENCAP: " + tcpHeader.ToShortString()); - LogHelper.LogLine("ENCAP: " + tcpHeader.ToLoooongString()); - //LogLine("ENCAP: " + BinaryVisualiser.FormatAsHex(ipHeader.Data, ipHeader.MessageLength)); - LogHelper.LogLine("ENCAP: TOTAL BYTES:" + bytesRead + "\n" + - BinaryVisualiser.FormatAsHex(bytes, bytesRead)); - - break; - case Protocol.UDP: - UdpHeader udpHeader = new UdpHeader(ipHeader.Data, (int)ipHeader.MessageLength); - //TreeNode udpNode = MakeUDPTreeNode(udpHeader); - //rootNode.Nodes.Add(udpNode); - // If the port is equal to 53 then the underlying protocol is DNS. - // Note: DNS can use either TCP or UDP, thats the reason - // why the checking has been done twice. - if (udpHeader.DestinationPort == "53" || udpHeader.SourcePort == "53") - { - //DnsHeader dnsHeader = new DnsHeader(ipHeader.Data, (int)ipHeader.MessageLength); - //dnsHeader.PrintDebug(); - //LogLine(dnsHeader.ToString()); - } - - sourcePort = udpHeader.SourcePort; - destPort = udpHeader.DestinationPort; - break; - default: - LogHelper.LogLine("THE PACKET WAS NOT TCP NOR UDP: Protocol = " + ipHeader.Protocol.GetName()); - break; - } - - string msg = null; - - - if (vpnContext.ipsToCapture.Contains(ipHeader.DestinationAddress.ToString())) - { - msg = string.Format("SUCCESS!!!! type:{0}. from {1}:{3} to {2}:{4}", ipHeader.Protocol, - ipHeader.SourceAddress, ipHeader.DestinationAddress, sourcePort, destPort); - encapulatedPackets.Append(packet); - } - else - { - msg = string.Format("refusing to send {4} from {0}:{2} to {1}:{3}", ipHeader.SourceAddress, - ipHeader.DestinationAddress, sourcePort, destPort, ipHeader.Protocol); - - } - - LogHelper.LogLine(msg, channel); - } - } - - public void Decapsulate(VpnChannel channel, VpnPacketBuffer encapBuffer, VpnPacketBufferList decapsulatedPackets, VpnPacketBufferList controlPacketsToSend) - { - try - { - var buf = channel.GetVpnReceivePacketBuffer(); - - - if (encapBuffer.Buffer.Length > buf.Buffer.Capacity) - { - LogHelper.LogLine( - "DROPPING PACKET!!! " + encapBuffer.Buffer.Length + - " bytes. This is bigger than the buffer capacity of: " + encapBuffer.Buffer.Length, channel); - } - else - { - byte[] bytes = encapBuffer.Buffer.ToArray(); - - LogHelper.LogLine("DECAP: OVERALL PAYLOAD:" + bytes.Length + "\n" + - BinaryVisualiser.FormatAsHex(bytes, bytes.Length)); - - - int srcOffset = 0; - foreach (IpHeader h in IpHeader.FromStream(new MemoryStream(bytes))) - { - if (buf == null) - { - buf = channel.GetVpnReceivePacketBuffer(); - } - - TcpHeader tcpHeader = new TcpHeader(h.Data, h.MessageLength, h); - - LogHelper.LogLine("DECAP: " + tcpHeader.ToShortString()); - LogHelper.LogLine("DECAP: " + tcpHeader.ToLoooongString()); - LogHelper.LogLine("DECAP: TOTAL BYTES:" + h.TotalLength + "\n" + - BinaryVisualiser.FormatAsHex(h.IpPacket, h.TotalLength)); - - encapBuffer.Buffer.CopyTo((uint)srcOffset, buf.Buffer, 0, h.TotalLength); - - buf.Buffer.Length = h.TotalLength; - - decapsulatedPackets.Append(buf); - buf = null; - srcOffset += h.TotalLength; - } - - if (encapBuffer != null) return; - - int remainingBytes = (int)encapBuffer.Buffer.Length; - Span bytesAsSpan = new Span(bytes); - System.IO.Stream stream = encapBuffer.Buffer.AsStream(); - - while (remainingBytes > 0) - { - IpHeader ipHeader = new IpHeader(stream); - - LogHelper.LogLine(ipHeader.ToLoooongString()); - LogHelper.LogLine(BinaryVisualiser.FormatAsHex(bytes, ipHeader.TotalLength)); - - encapBuffer.Buffer.CopyTo((uint)srcOffset, buf.Buffer, 0, ipHeader.TotalLength); - buf.Buffer.Length = ipHeader.TotalLength; - decapsulatedPackets.Append(buf); - - srcOffset += ipHeader.TotalLength; - remainingBytes -= ipHeader.TotalLength; - - buf = channel.GetVpnReceivePacketBuffer(); //get a new buffer... - } - - return; - } - } - catch (Exception e) - { - LogHelper.LogLine("exception???? " + e.Message); - } - } - } -} \ No newline at end of file diff --git a/ZitiBackgroundTask/src/_backup_eligable_to_delete/IpHeader.cs b/ZitiBackgroundTask/src/_backup_eligable_to_delete/IpHeader.cs deleted file mode 100644 index df7b7187..00000000 --- a/ZitiBackgroundTask/src/_backup_eligable_to_delete/IpHeader.cs +++ /dev/null @@ -1,273 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net; -using System.Security.AccessControl; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; - -namespace NetFoundry.IP -{ - internal sealed class IpHeader - { - const ushort fragmentOffsetMask = 0b0001_1111_1111_1111; // 13 bits for fragment offset - - // The entire IP packet - private byte[] networkBytes; - - public IpHeader(byte[] networkBytes) - { - this.networkBytes = networkBytes; - - using (MemoryStream ms = new MemoryStream(networkBytes)) - using (BinaryReader br = new BinaryReader(ms)) - { - initialize(br); - } - } - - private void initialize(BinaryReader networkBytes) - { - try - { - // see https://tools.ietf.org/html/rfc791#page-11 - // 0 1 2 3 - // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - // |Version| IHL |Type of Service| Total Length | - // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - // | Identification |Flags| Fragment Offset | - // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - // | Time to Live | Protocol | Header Checksum | - // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - // | Source Address | - // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - // | Destination Address | - // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - // | Options | Padding | - // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - // - // Example Internet Datagram Header - - // byte 1 - The first eight bits of the IP header contain the version and - // header length. read the byte and then shift it to get the version - // and header len - byte versionAndHeaderLength = networkBytes.ReadByte(); - - VersionAsInt = versionAndHeaderLength >> 4; // shift the byte to get the bits we want - - // Calculate the IP version. The four bits of the IP header - // contain the IP version. - if (VersionAsInt == 4) - { - Version = "IP v4"; - } - else if (VersionAsInt == 6) - { - Version = "IP v6"; - } - else - { - Version = "Unknown"; - } - - // ip header length is contained in the last 4 bytes... - //mask off the first 4 bytes and then per the spec the result - //is a 4 bit field tells us the length of the IP header in 32 bit increments (4 bytes) - HeaderLength = (versionAndHeaderLength & 0xF) * 4; - - // byte 2 - TypeOfService = networkBytes.ReadByte(); - - // bytes 3, 4 - TotalLength = (ushort)IPAddress.NetworkToHostOrder(networkBytes.ReadInt16()); - - // bytes 5, 6 - identification bytes. - Identification = (ushort)IPAddress.NetworkToHostOrder(networkBytes.ReadInt16()); - - // bytes 7, 8 - flags and fragment offset - ushort flagsAndFragmentOffset = (ushort)IPAddress.NetworkToHostOrder(networkBytes.ReadInt16()); - Flags = (byte)(flagsAndFragmentOffset >> 13); // shift 13 bits to get the first 3 - FragmentOffset = (ushort)(flagsAndFragmentOffset & fragmentOffsetMask); //mask the lower 13 bits - - // byte 9 - TimeToLive = networkBytes.ReadByte(); - - // byte 10 - Protocol = (Protocol)networkBytes.ReadByte(); - - // byte 11, 12 - HeaderChecksum = (ushort)IPAddress.NetworkToHostOrder(networkBytes.ReadInt16()); - - // bytes 13 - 16 - SourceAddress = new IPAddress(networkBytes.ReadBytes(4)); - - // bytes 17 - 20 - DestinationAddress = new IPAddress(networkBytes.ReadBytes(4)); - } - catch (Exception ex) - { - ZitiBackgroundTask.ZitiVPNPlugin.LogLine(ex.Message); - } - } - - // first 4 bits of the first byte. using int for convinience with other apis - public int VersionAsInt { get; set; } - public string Version { get; set; } - - // last 4 bits of the first byte is the total HeaderLength length. using int for convinience with other apis - public int HeaderLength { get; set; } - - // 1 byte - public byte TypeOfService { get; set; } - - // 2 bytes - public ushort TotalLength { get; set; } - - // 2 bytes - public ushort Identification { get; set; } - - // 3 bits - byte closest thing - public byte Flags { get; set; } - - // 13 bits - ushort closest thing... - public ushort FragmentOffset { get; set; } - - // 1 byte - public int TimeToLive { get; set; } - - // 1 byte - public Protocol Protocol { get; set; } - - // 2 bytes - public ushort HeaderChecksum { get; set; } - - // 4 bytes - public IPAddress SourceAddress { get; set; } - - // 4 bytes - public IPAddress DestinationAddress { get; set; } - - // 4 bytes - public byte[] Options { get; set; } - - /* - public ushort MessageLength - { - get - { - // MessageLength = Total length of the datagram - Header length. - return (ushort)(_totalLength - _headerLength); - } - } - - public string DifferentiatedServices - { - get - { - // Returns the differentiated services in hexadecimal format. - return string.Format("0x{0:x2} ({1})", _differentiatedServices, _differentiatedServices); - } - } - - public string Flags - { - get - { - // The first three bits of the flags and fragmentation field - // represent the flags (which indicate whether the data is - // fragmented or not). - int nFlags = _flagsAndOffset >> 13; - if (nFlags == 2) - { - return "Don't fragment"; - } - else if (nFlags == 1) - { - return "More fragments to come"; - } - else - { - return nFlags.ToString(); - } - } - } - - public string FragmentationOffset - { - get - { - // The last thirteen bits of the flags and fragmentation field - // contain the fragmentation offset. - int nOffset = _flagsAndOffset << 3; - nOffset >>= 3; - return nOffset.ToString(); - } - } - - public string TTL - { - get - { - return _ttl.ToString(); - } - } - - public Protocol ProtocolType - { - get - { - // The protocol field represents the protocol in the data portion - // of the datagram. - if (_protocol == 6) // A value of six represents the TCP protocol. - { - return Protocol.TCP; - } - else if (_protocol == 17) // Seventeen for UDP. - { - return Protocol.UDP; - } - else - { - return Protocol.Unknown; - } - } - } - - public string Checksum - { - get - { - // Returns the checksum in hexadecimal format. - return string.Format("0x{0:x2}", _checksum); - } - } - - public IPAddress SourceAddress - { - get - { - return new IPAddress(_sourceIPAddress); - } - } - - public IPAddress DestinationAddress - { - get - { - return new IPAddress(_destinationIPAddress); - } - } - - public string Identification - { - get - { - return _identification.ToString(); - } - }*/ - } -} - \ No newline at end of file diff --git a/ZitiBackgroundTask/src/_backup_eligable_to_delete/Packet.cs b/ZitiBackgroundTask/src/_backup_eligable_to_delete/Packet.cs deleted file mode 100644 index 08bff627..00000000 --- a/ZitiBackgroundTask/src/_backup_eligable_to_delete/Packet.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using System.Text; -using System.Threading.Tasks; - -namespace NetFoundry.IP -{ - internal class Packet - { - internal IpHeader ipHeader; - internal byte[] bytes; - - internal Packet() - { - //for the subclasses... - } - - public Packet([ReadOnlyArray]byte[] networkBytes) - { - ipHeader = new IpHeader(networkBytes); - } - } -} - -namespace ZitiBackgroundTask.Ziti -{ - public sealed class IpPacket - { - private NetFoundry.IP.Packet ipPacket; - - public IpPacket([ReadOnlyArray]byte[] networkBytes) - { - ipPacket = new NetFoundry.IP.Packet(networkBytes); - } - } -} \ No newline at end of file diff --git a/ZitiBackgroundTask/src/_backup_eligable_to_delete/Protocol.cs b/ZitiBackgroundTask/src/_backup_eligable_to_delete/Protocol.cs deleted file mode 100644 index 67db19c2..00000000 --- a/ZitiBackgroundTask/src/_backup_eligable_to_delete/Protocol.cs +++ /dev/null @@ -1,162 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NetFoundry.IP -{ - internal enum Protocol - { - //see https://en.wikipedia.org/wiki/List_of_IP_protocol_numbers - Unknown = -1, - HOPOPT = 0, //IPv6 Hop-by-Hop Option - ICMP = 1, //Internet Control Message Protocol - IGMP = 2, //Internet Group Management Protocol - GGP = 3, //Gateway-to-Gateway Protocol - IP_in_IP = 4, //IP in IP (encapsulation) - ST = 5, //Internet Stream Protocol - TCP = 6, //Transmission Control Protocol - CBT = 7, //Core-based trees - EGP = 8, //Exterior Gateway Protocol - IGP = 9, //Interior Gateway Protocol (any private interior gateway (used by Cisco for their IGRP)) - BBN_RCC_MON = 10, //BBN RCC Monitoring - NVP_II = 11, //Network Voice Protocol - PUP = 12, //Xerox PUP - ARGUS = 13, //ARGUS - EMCON = 14, //EMCON - XNET = 15, //Cross Net Debugger - CHAOS = 16, //Chaos - UDP = 17, //User Datagram Protocol - MUX = 18, //Multiplexing - DCN_MEAS = 19, //DCN Measurement Subsystems - HMP = 20, //Host Monitoring Protocol - PRM = 21, //Packet Radio Measurement - XNS_IDP = 22, //XEROX NS IDP - TRUNK_1 = 23, //Trunk-1 - TRUNK_2 = 24, //Trunk-2 - LEAF_1 = 25, //Leaf-1 - LEAF_2 = 26, //Leaf-2 - RDP = 27, //Reliable Data Protocol - IRTP = 28, //Internet Reliable Transaction Protocol - ISO_TP4 = 29, //ISO Transport Protocol Class 4 - NETBLT = 30, //Bulk Data Transfer Protocol - MFE_NSP = 31, //MFE Network Services Protocol - MERIT_INP = 32, //MERIT Internodal Protocol - DCCP = 33, //Datagram Congestion Control Protocol - THIRD_PARTY_CONNECT = 34, //Third Party Connect Protocol - IDPR = 35, //Inter-Domain Policy Routing Protocol - XTP = 36, //Xpress Transport Protocol - DDP = 37, //Datagram Delivery Protocol - IDPR_CMTP = 38, //IDPR Control Message Transport Protocol - TPplusplus = 39, //TP++ Transport Protocol - IL = 40, //IL Transport Protocol - IPv6 = 41, //IPv6 Encapsulation - SDRP = 42, //Source Demand Routing Protocol - IPv6_Route = 43, //Routing Header for IPv6 - IPv6_Frag = 44, //Fragment Header for IPv6 - IDRP = 45, //Inter-Domain Routing Protocol - RSVP = 46, //Resource Reservation Protocol - GREs = 47, //Generic Routing Encapsulation - DSR = 48, //Dynamic Source Routing Protocol - BNA = 49, //Burroughs Network Architecture - ESP = 50, //Encapsulating Security Payload - AH = 51, //Authentication Header - I_NLSP = 52, //Integrated Net Layer Security Protocol - SwIPe = 53, //SwIPe - NARP = 54, //NBMA Address Resolution Protocol - MOBILE = 55, //IP Mobility (Min Encap) - TLSP = 56, //Transport Layer Security Protocol (using Kryptonet key management) - SKIP = 57, //Simple Key-Management for Internet Protocol - IPv6_ICMP = 58, //ICMP for IPv6 - IPv6_NoNxt = 59, //No Next Header for IPv6 - IPv6_Opts = 60, //Destination Options for IPv6 - HOST_INTERNAL_PROTOCOL = 61, //Any host internal protocol - CFTP = 62, //CFTP - LOCAL_NETWORK = 63, //Any local network - SAT_EXPAK = 64, //SATNET and Backroom EXPAK - KRYPTOLAN = 65, //Kryptolan - RVD = 66, //MIT Remote Virtual Disk Protocol - IPPC = 67, //Internet Pluribus Packet Core - DISTRIBUTED_FS = 68, //Any distributed file system - SAT_MON = 69, //SATNET Monitoring - VISA = 70, //VISA Protocol - IPCU = 71, //Internet Packet Core Utility - CPNX = 72, //Computer Protocol Network Executive - CPHB = 73, //Computer Protocol Heart Beat - WSN = 74, //Wang Span Network - PVP = 75, //Packet Video Protocol - BR_SAT_MON = 76, //Backroom SATNET Monitoring - SUN_ND = 77, //SUN ND PROTOCOL-Temporary - WB_MON = 78, //WIDEBAND Monitoring - WB_EXPAK = 79, //WIDEBAND EXPAK - ISO_IP = 80, //International Organization for Standardization Internet Protocol - VMTP = 81, //Versatile Message Transaction Protocol - SECURE_VMTP = 82, //Secure Versatile Message Transaction Protocol - VINES = 83, //VINES - TTP = 84, //TTP - IPTM = 84, //Internet Protocol Traffic Manager - NSFNET_IGP = 85, //NSFNET-IGP - DGP = 86, //Dissimilar Gateway Protocol - TCF = 87, //TCF - EIGRP = 88, //EIGRP - OSPF = 89, //Open Shortest Path First - Sprite_RPC = 90, //Sprite RPC Protocol - LARP = 91, //Locus Address Resolution Protocol - MTP = 92, //Multicast Transport Protocol - AX_25 = 93, //AX.25 - OS = 94, //KA9Q NOS compatible IP over IP tunneling - MICP = 95, //Mobile Internetworking Control Protocol - SCC_SP = 96, //Semaphore Communications Sec. Pro - ETHERIP = 97, //Ethernet-within-IP Encapsulation - ENCAP = 98, //Encapsulation Header - PRIVATE_ENCRYPTION = 99, //Any private encryption scheme - GMTP = 100, //GMTP - IFMP = 101, //Ipsilon Flow Management Protocol - PNNI = 102, //PNNI over IP - PIM = 103, //Protocol Independent Multicast - ARIS = 104, //IBM's ARIS (Aggregate Route IP Switching) Protocol - SCPS = 105, //SCPS (Space Communications Protocol Standards) - QNX = 106, //QNX - ACTIVE_NETWORKS = 107, //Active Networks - IPComp = 108, //IP Payload Compression Protocol - SNP = 109, //Sitara Networks Protocol - Compaq_Peer = 110, //Compaq Peer Protocol - IPX_in_IP = 111, //IPX in IP - VRRP = 112, //Virtual Router Redundancy Protocol, Common Address Redundancy Protocol (not IANA assigned) - PGM = 113, //PGM Reliable Transport Protocol - ANY_HOP = 114, //Any 0-hop protocol - L2TP = 115, //Layer Two Tunneling Protocol Version 3 - DDX = 116, //D-II Data Exchange (DDX) - IATP = 117, //Interactive Agent Transfer Protocol - STP = 118, //Schedule Transfer Protocol - SRP = 119, //SpectraLink Radio Protocol - UTI = 120, //Universal Transport Interface Protocol - SMP = 121, //Simple Message Protocol - SM = 122, //Simple Multicast Protocol - PTP = 123, //Performance Transparency Protocol - IS_IS_over_IPv4 = 124, //Intermediate System to Intermediate System (IS-IS) Protocol over IPv4 - FIRE = 125, //Flexible Intra-AS Routing Environment - CRTP = 126, //Combat Radio Transport Protocol - CRUDP = 127, //Combat Radio User Datagram - SSCOPMCE = 128, //Service-Specific Connection-Oriented Protocol in a Multilink and Connectionless Environment - IPLT = 129, // - SPS = 130, //Secure Packet Shield - PIPE = 131, //Private IP Encapsulation within IP - SCTP = 132, //Stream Control Transmission Protocol - FC = 133, //Fibre Channel - RSVP_E2E_IGNORE = 134, //Reservation Protocol (RSVP) End-to-End Ignore - Mobility_Header = 135, //Mobility Extension Header for IPv6 - UDPLite = 136, //Lightweight User Datagram Protocol - MPLS_in_IP = 137, //Multiprotocol Label Switching Encapsulated in IP - manet = 138, //MANET Protocols - HIP = 139, //Host Identity Protocol - Shim6 = 140, //Site Multihoming by IPv6 Intermediation - WESP = 141, //Wrapped Encapsulating Security Payload - ROHC = 142, //Robust Header Compression - - //Unassigned = 143 - 252, // - //Use for experimentation and testing = 253 - 254, // - Reserved = 255, // - }; -} \ No newline at end of file diff --git a/ZitiBackgroundTask/src/_backup_eligable_to_delete/TCP.cs b/ZitiBackgroundTask/src/_backup_eligable_to_delete/TCP.cs deleted file mode 100644 index 77b41798..00000000 --- a/ZitiBackgroundTask/src/_backup_eligable_to_delete/TCP.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NetFoundry.IP -{ - internal sealed class Tcp : Packet - { - private Tcp() - { - } - } -} \ No newline at end of file diff --git a/ZitiBackgroundTask/src/_backup_eligable_to_delete/UDP.cs b/ZitiBackgroundTask/src/_backup_eligable_to_delete/UDP.cs deleted file mode 100644 index 6bd2aa52..00000000 --- a/ZitiBackgroundTask/src/_backup_eligable_to_delete/UDP.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NetFoundry.IP -{ - internal sealed class Udp : Packet - { - - private Udp() - { - } - } -} \ No newline at end of file diff --git a/ZitiBackgroundTask/src/debugging/DebugTcpServer.cs b/ZitiBackgroundTask/src/debugging/DebugTcpServer.cs deleted file mode 100644 index ea9fba94..00000000 --- a/ZitiBackgroundTask/src/debugging/DebugTcpServer.cs +++ /dev/null @@ -1,58 +0,0 @@ -// This code is adapted from a sample found at the URL -// "http://blogs.msdn.com/b/jmanning/archive/2004/12/19/325699.aspx" - -using System; -using System.Net; -using System.Net.Sockets; -using System.IO; -using System.Text; - -namespace NetFoundry.VPN.Debugging -{ - public sealed class DebugTcpServer - { - static void Main(string[] args) - { - DebugTcpServer.Start(); - Console.WriteLine("listening. press any key to quit"); - Console.ReadKey(); - } - - private static bool started = false; - public static void Start() - { - started = false; - if (started) return; - started = true; - - Console.WriteLine("Starting echo server..."); - - TcpListener listener = new TcpListener(IPAddress.Loopback, ZitiVPNPlugin.DESIRED_PORT); - listener.Start(); - - while (true) - { - TcpClient client = listener.AcceptTcpClient(); - System.Threading.Tasks.Task.Run(() => - { - NetworkStream stream = client.GetStream(); - StreamWriter writer = new StreamWriter(stream, Encoding.ASCII) { AutoFlush = true }; - StreamReader reader = new StreamReader(stream, Encoding.ASCII); - - try - { - string inputLine = ""; - while (inputLine != null) - { - inputLine = reader.ReadLine(); - writer.WriteLine("Echoing string: " + inputLine); - Console.WriteLine("Echoing string: " + inputLine); - } - } - catch { /* don't really care at this point */} - Console.WriteLine("Server saw disconnect from client."); - }); - } - } - } -} \ No newline at end of file diff --git a/ZitiBackgroundTask/src/ip/DnsHeader.cs b/ZitiBackgroundTask/src/ip/DnsHeader.cs deleted file mode 100644 index 6fe8de73..00000000 --- a/ZitiBackgroundTask/src/ip/DnsHeader.cs +++ /dev/null @@ -1,115 +0,0 @@ -using System.Net; -using System; -using System.IO; - -namespace NetFoundry.VPN.IP -{ - /// - /// This class encapsulates all the DNS header fields and provides a mechanism - /// to set and get the details of them through a parameterized contructor - /// and public properties respectively. - /// - internal sealed class DnsHeader - { - public void PrintDebug() - { - System.Diagnostics.Debug.WriteLine("DNS"); - System.Diagnostics.Debug.WriteLine(" Identification: " + Identification); - System.Diagnostics.Debug.WriteLine(" Flags: " + Flags); - System.Diagnostics.Debug.WriteLine(" Questions: " + TotalQuestions); - System.Diagnostics.Debug.WriteLine(" Answer RRs: " + TotalAnswerRRs); - System.Diagnostics.Debug.WriteLine(" Authority RRs: " + TotalAuthorityRRs); - System.Diagnostics.Debug.WriteLine(" Additional RRs: " + TotalAdditionalRRs); - } - - // Sixteen bits for identification. - private ushort UsIdentification; - // Sixteen bits for DNS flags. - private ushort UsFlags; - // Sixteen bits indicating the number of entries in the questions list. - private ushort UsTotalQuestions; - // Sixteen bits indicating the number of entries in the answer - // resource record list. - private ushort UsTotalAnswerRRs; - // Sixteen bits indicating the number of entries in the authority - // resource record list. - private ushort UsTotalAuthorityRRs; - // Sixteen bits indicating the number of entries in the additional - // resource record list. - private ushort UsTotalAdditionalRRs; - - public DnsHeader([System.Runtime.InteropServices.WindowsRuntime.ReadOnlyArray()] byte[]byBuffer, int nReceived) - { - - // Create MemoryStream out of the received bytes. - MemoryStream memoryStream = new MemoryStream(byBuffer, 0, nReceived); - // Next we create a BinaryReader out of the MemoryStream. - BinaryReader binaryReader = new BinaryReader(memoryStream); - // First sixteen bits are for identification. - UsIdentification = (ushort)IPAddress.NetworkToHostOrder( - binaryReader.ReadInt16()); - // Next sixteen contain the flags. - UsFlags = (ushort)IPAddress.NetworkToHostOrder(binaryReader.ReadInt16()); - // Read the total numbers of questions in the quesion list. - UsTotalQuestions = (ushort)IPAddress.NetworkToHostOrder( - binaryReader.ReadInt16()); - // Read the total number of answers in the answer list. - UsTotalAnswerRRs = (ushort)IPAddress.NetworkToHostOrder( - binaryReader.ReadInt16()); - // Read the total number of entries in the authority list. - UsTotalAuthorityRRs = (ushort)IPAddress.NetworkToHostOrder( - binaryReader.ReadInt16()); - // Total number of entries in the additional resource record list. - UsTotalAdditionalRRs = (ushort)IPAddress.NetworkToHostOrder( - binaryReader.ReadInt16()); - } - - public string Identification - { - get - { - return string.Format("0x{0:x2}", UsIdentification); - } - } - - public string Flags - { - get - { - return string.Format("0x{0:x2}", UsFlags); - } - } - - public string TotalQuestions - { - get - { - return UsTotalQuestions.ToString(); - } - } - - public string TotalAnswerRRs - { - get - { - return UsTotalAnswerRRs.ToString(); - } - } - - public string TotalAuthorityRRs - { - get - { - return UsTotalAuthorityRRs.ToString(); - } - } - - public string TotalAdditionalRRs - { - get - { - return UsTotalAdditionalRRs.ToString(); - } - } - } -} diff --git a/ZitiBackgroundTask/src/ip/ICMP.cs b/ZitiBackgroundTask/src/ip/ICMP.cs deleted file mode 100644 index 51eec10e..00000000 --- a/ZitiBackgroundTask/src/ip/ICMP.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NetFoundry.VPN.IP -{ - internal sealed class Icmp : Packet - { - - private Icmp() { } - } -} \ No newline at end of file diff --git a/ZitiBackgroundTask/src/ip/IpHeader.cs b/ZitiBackgroundTask/src/ip/IpHeader.cs deleted file mode 100644 index e085b1b3..00000000 --- a/ZitiBackgroundTask/src/ip/IpHeader.cs +++ /dev/null @@ -1,360 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net; -using System.Security.AccessControl; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using System.Runtime.InteropServices.WindowsRuntime; - -using NetFoundry.VPN.Util; - -namespace NetFoundry.VPN.IP -{ - internal sealed class IpHeader - { - const ushort fragmentOffsetMask = 0b0001_1111_1111_1111; // 13 bits for fragment offset - - // The entire IP packet - private byte[] networkBytes; - - public IpHeader(byte[] networkBytes) : this(networkBytes, 0, networkBytes.Length) - { - } - - private IpHeader() - { - //private use only - } - - public IpHeader([ReadOnlyArray()] byte[] networkBytes, int nReceived) : this(networkBytes, 0, nReceived) - { - } - - public IpHeader(System.IO.Stream stream) - { - BinaryReader binaryReader = new BinaryReader(stream); - } - - public IpHeader([ReadOnlyArray()] byte[] networkBytes, int position, int nReceived) /*: this(new BinaryReader(new MemoryStream(networkBytes, position, nReceived - position))) - */ - { - this.networkBytes = networkBytes; - - using (MemoryStream ms = new MemoryStream(networkBytes)) - using (BinaryReader br = new BinaryReader(ms)) - { - initialize(br); - } - } - - private IpHeader(BinaryReader binaryReader) - { - this.initialize(binaryReader); - } - - private void initialize(BinaryReader bytesAsReader) - { - try - { - // see https://tools.ietf.org/html/rfc791#page-11 - // 0 1 2 3 - // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - // |Version| IHL |Type of Service| Total Length | - // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - // | Identification |Flags| Fragment Offset | - // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - // | Time to Live | Protocol | Header Checksum | - // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - // | Source Address | - // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - // | Destination Address | - // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - // | Options | Padding | - // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - // - // Example Internet Datagram Header - - // byte 1 - The first eight bits of the IP header contain the version and - // header length. read the byte and then shift it to get the version - // and header len - byte versionAndHeaderLength = bytesAsReader.ReadByte(); - - VersionAsInt = versionAndHeaderLength >> 4; // shift the byte to get the bits we want - - // Calculate the IP version. The four bits of the IP header - // contain the IP version. - if (VersionAsInt == 4) - { - Version = "IP v4"; - } - else if (VersionAsInt == 6) - { - Version = "IP v6"; - } - else - { - Version = "Unknown"; - } - - // ip header length is contained in the last 4 bytes... - //mask off the first 4 bytes and then per the spec the result - //is a 4 bit field tells us the length of the IP header in 32 bit increments (4 bytes) - HeaderLength = (versionAndHeaderLength & 0xF) * 4; - - // byte 2 - TypeOfService = bytesAsReader.ReadByte(); - - // bytes 3, 4 - TotalLength = (ushort)IPAddress.NetworkToHostOrder(bytesAsReader.ReadInt16()); - - // bytes 5, 6 - identification bytes. - Identification = (ushort)IPAddress.NetworkToHostOrder(bytesAsReader.ReadInt16()); - - // bytes 7, 8 - flags and fragment offset - ushort flagsAndFragmentOffset = (ushort)IPAddress.NetworkToHostOrder(bytesAsReader.ReadInt16()); - Flags = (byte)(flagsAndFragmentOffset >> 13); // shift 13 bits to get the first 3 - FragmentOffset = (ushort)(flagsAndFragmentOffset & fragmentOffsetMask); //mask the lower 13 bits - - // byte 9 - TimeToLive = bytesAsReader.ReadByte(); - - // byte 10 - Protocol = (Protocol)bytesAsReader.ReadByte(); - - // byte 11, 12 - HeaderChecksum = (ushort)IPAddress.NetworkToHostOrder(bytesAsReader.ReadInt16()); - - // bytes 13 - 16 - SourceAddress = new IPAddress(bytesAsReader.ReadBytes(4)); - - // bytes 17 - 20 - DestinationAddress = new IPAddress(bytesAsReader.ReadBytes(4)); - } - catch (Exception ex) - { - LogHelper.LogLine(ex.Message); - } - } - - // first 4 bits of the first byte. using int for convinience with other apis - public int VersionAsInt { get; set; } - /*int _version; - public int Version - { - get { return _version; } - set { _version = value; } - }*/ - public string Version { get; set; } - - /* - public byte _headerLength; - // last 4 bits of the first byte is the total HeaderLength length. using int for convinience with other apis - public byte HeaderLength - { - get { return _headerLength; } - set { _headerLength = value; } - }*/ - public int HeaderLength { get; set; } - - // 1 byte - public byte TypeOfService { get; set; } - - // 2 bytes - public ushort TotalLength { get; set; } - - // 2 bytes - public ushort Identification { get; set; } - - // 3 bits - byte closest thing - public byte Flags { get; set; } - - // 13 bits - ushort closest thing... - public ushort FragmentOffset { get; set; } - - // 1 byte - public int TimeToLive { get; set; } - - // 1 byte - public Protocol Protocol { get; set; } - - // 2 bytes - public ushort HeaderChecksum { get; set; } - - // 4 bytes - public IPAddress SourceAddress { get; set; } - - // 4 bytes - public IPAddress DestinationAddress { get; set; } - - // 4 bytes - public byte[] Options { get; set; } - - public ushort MessageLength - { - get - { - // MessageLength = Total length of the datagram - Header length. - return (ushort)(TotalLength - HeaderLength); - } - } - - public string DifferentiatedServices - { - get - { - // Returns the differentiated services in hexadecimal format. - return string.Format("0x{0:x2} ({1})", DifferentiatedServices, DifferentiatedServices); - } - } - - /*public string Flags - { - get - { - // The first three bits of the flags and fragmentation field - // represent the flags (which indicate whether the data is - // fragmented or not). - int nFlags = _flagsAndOffset >> 13; - if (nFlags == 2) - { - return "Don't fragment"; - } - else if (nFlags == 1) - { - return "More fragments to come"; - } - else - { - return nFlags.ToString(); - } - } - }*/ - - public string FragmentationOffset - { - get - { - // The last thirteen bits of the flags and fragmentation field - // contain the fragmentation offset. - int nOffset = Flags << 3; - nOffset >>= 3; - return nOffset.ToString(); - } - } - - public string TTL - { - get - { - return TTL.ToString(); - } - } - - public string Checksum - { - get - { - // Returns the checksum in hexadecimal format. - return string.Format("0x{0:x2}", Checksum); - } - } - - - - public byte[] Data - { - get - { - return networkBytes; - } - } - - - public string ToLoooongString() - { - StringBuilder b = new StringBuilder(); - b.Append("Checksum: "); - b.Append(this.Checksum); - //b.Append("Data: "); - //b.Append(this.Data); - b.Append(" DestinationAddress: "); - b.Append(this.DestinationAddress); - b.Append(" DifferentiatedServices: "); - b.Append(this.DifferentiatedServices); - b.Append(" Flags: "); - b.Append(this.Flags); - b.Append(" FragmentationOffset: "); - b.Append(this.FragmentationOffset); - b.Append(" HeaderLength: "); - b.Append(this.HeaderLength); - b.Append(" Identification: "); - b.Append(this.Identification); - b.Append(" MessageLength: "); - b.Append(this.MessageLength); - b.Append(" ProtocolType: "); - b.Append(this.Protocol.GetName()); - b.Append(" ChecksumIP: "); - b.Append(this.Checksum); - b.Append(" SourceAddress: "); - b.Append(this.SourceAddress); - b.Append(" TTL: "); - b.Append(this.TTL); - b.Append(" TotalLength: "); - b.Append(this.TotalLength); - b.Append(" Version: "); - b.Append(this.Version); - - return b.ToString(); - } - public byte[] IpPacket - { - get { return networkBytes; } - } - - - public static IEnumerable FromStream(Stream stream) - { - IpHeader header = new IpHeader(); - - byte[] _ipPacket = header.networkBytes; - int readResult = stream.Read(_ipPacket, 0, 4); - while (readResult > 0) - { - byte[] pktBytes = new byte[2] { _ipPacket[2], _ipPacket[3] }; - if (BitConverter.IsLittleEndian) - { - Array.Reverse(pktBytes); - } - - ushort utotalIpPacketLen = BitConverter.ToUInt16(pktBytes, 0); - - int totalIpPacketLen = utotalIpPacketLen - 4; - readResult = stream.Read(_ipPacket, 4, totalIpPacketLen); - if (readResult > 0) - { - using (MemoryStream ms = new MemoryStream(_ipPacket)) - using (BinaryReader br = new BinaryReader(ms)) - { - header.initialize(br); - } - } - - yield return header; - - header = new IpHeader(); - _ipPacket = header.networkBytes; - readResult = stream.Read(_ipPacket, 0, 4); - } - } - - public void WriteTo(System.IO.Stream stream) - { - stream.Write(networkBytes, 0, TotalLength); - } - } -} - \ No newline at end of file diff --git a/ZitiBackgroundTask/src/ip/Packet.cs b/ZitiBackgroundTask/src/ip/Packet.cs deleted file mode 100644 index c17e9ad0..00000000 --- a/ZitiBackgroundTask/src/ip/Packet.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using System.Text; -using System.Threading.Tasks; - -namespace NetFoundry.VPN.IP -{ - internal class Packet - { - internal IpHeader ipHeader; - - internal Packet() - { - //for the subclasses... - } - - public Packet([ReadOnlyArray]byte[] networkBytes) - { - ipHeader = new IpHeader(networkBytes); - } - } -} \ No newline at end of file diff --git a/ZitiBackgroundTask/src/ip/Protocol.cs b/ZitiBackgroundTask/src/ip/Protocol.cs deleted file mode 100644 index 50db9bf4..00000000 --- a/ZitiBackgroundTask/src/ip/Protocol.cs +++ /dev/null @@ -1,170 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NetFoundry.VPN.IP -{ - internal static class ProtocolExtensionMethod - { - internal static string GetName(this Protocol theEnum) - { - return Enum.GetName(typeof(Protocol), theEnum); - } - } - - internal enum Protocol - { - //see https://en.wikipedia.org/wiki/List_of_IP_protocol_numbers - Unknown = -1, - HOPOPT = 0, //IPv6 Hop-by-Hop Option - ICMP = 1, //Internet Control Message Protocol - IGMP = 2, //Internet Group Management Protocol - GGP = 3, //Gateway-to-Gateway Protocol - IP_in_IP = 4, //IP in IP (encapsulation) - ST = 5, //Internet Stream Protocol - TCP = 6, //Transmission Control Protocol - CBT = 7, //Core-based trees - EGP = 8, //Exterior Gateway Protocol - IGP = 9, //Interior Gateway Protocol (any private interior gateway (used by Cisco for their IGRP)) - BBN_RCC_MON = 10, //BBN RCC Monitoring - NVP_II = 11, //Network Voice Protocol - PUP = 12, //Xerox PUP - ARGUS = 13, //ARGUS - EMCON = 14, //EMCON - XNET = 15, //Cross Net Debugger - CHAOS = 16, //Chaos - UDP = 17, //User Datagram Protocol - MUX = 18, //Multiplexing - DCN_MEAS = 19, //DCN Measurement Subsystems - HMP = 20, //Host Monitoring Protocol - PRM = 21, //Packet Radio Measurement - XNS_IDP = 22, //XEROX NS IDP - TRUNK_1 = 23, //Trunk-1 - TRUNK_2 = 24, //Trunk-2 - LEAF_1 = 25, //Leaf-1 - LEAF_2 = 26, //Leaf-2 - RDP = 27, //Reliable Data Protocol - IRTP = 28, //Internet Reliable Transaction Protocol - ISO_TP4 = 29, //ISO Transport Protocol Class 4 - NETBLT = 30, //Bulk Data Transfer Protocol - MFE_NSP = 31, //MFE Network Services Protocol - MERIT_INP = 32, //MERIT Internodal Protocol - DCCP = 33, //Datagram Congestion Control Protocol - THIRD_PARTY_CONNECT = 34, //Third Party Connect Protocol - IDPR = 35, //Inter-Domain Policy Routing Protocol - XTP = 36, //Xpress Transport Protocol - DDP = 37, //Datagram Delivery Protocol - IDPR_CMTP = 38, //IDPR Control Message Transport Protocol - TPplusplus = 39, //TP++ Transport Protocol - IL = 40, //IL Transport Protocol - IPv6 = 41, //IPv6 Encapsulation - SDRP = 42, //Source Demand Routing Protocol - IPv6_Route = 43, //Routing Header for IPv6 - IPv6_Frag = 44, //Fragment Header for IPv6 - IDRP = 45, //Inter-Domain Routing Protocol - RSVP = 46, //Resource Reservation Protocol - GREs = 47, //Generic Routing Encapsulation - DSR = 48, //Dynamic Source Routing Protocol - BNA = 49, //Burroughs Network Architecture - ESP = 50, //Encapsulating Security Payload - AH = 51, //Authentication Header - I_NLSP = 52, //Integrated Net Layer Security Protocol - SwIPe = 53, //SwIPe - NARP = 54, //NBMA Address Resolution Protocol - MOBILE = 55, //IP Mobility (Min Encap) - TLSP = 56, //Transport Layer Security Protocol (using Kryptonet key management) - SKIP = 57, //Simple Key-Management for Internet Protocol - IPv6_ICMP = 58, //ICMP for IPv6 - IPv6_NoNxt = 59, //No Next Header for IPv6 - IPv6_Opts = 60, //Destination Options for IPv6 - HOST_INTERNAL_PROTOCOL = 61, //Any host internal protocol - CFTP = 62, //CFTP - LOCAL_NETWORK = 63, //Any local network - SAT_EXPAK = 64, //SATNET and Backroom EXPAK - KRYPTOLAN = 65, //Kryptolan - RVD = 66, //MIT Remote Virtual Disk Protocol - IPPC = 67, //Internet Pluribus Packet Core - DISTRIBUTED_FS = 68, //Any distributed file system - SAT_MON = 69, //SATNET Monitoring - VISA = 70, //VISA Protocol - IPCU = 71, //Internet Packet Core Utility - CPNX = 72, //Computer Protocol Network Executive - CPHB = 73, //Computer Protocol Heart Beat - WSN = 74, //Wang Span Network - PVP = 75, //Packet Video Protocol - BR_SAT_MON = 76, //Backroom SATNET Monitoring - SUN_ND = 77, //SUN ND PROTOCOL-Temporary - WB_MON = 78, //WIDEBAND Monitoring - WB_EXPAK = 79, //WIDEBAND EXPAK - ISO_IP = 80, //International Organization for Standardization Internet Protocol - VMTP = 81, //Versatile Message Transaction Protocol - SECURE_VMTP = 82, //Secure Versatile Message Transaction Protocol - VINES = 83, //VINES - TTP = 84, //TTP - IPTM = 84, //Internet Protocol Traffic Manager - NSFNET_IGP = 85, //NSFNET-IGP - DGP = 86, //Dissimilar Gateway Protocol - TCF = 87, //TCF - EIGRP = 88, //EIGRP - OSPF = 89, //Open Shortest Path First - Sprite_RPC = 90, //Sprite RPC Protocol - LARP = 91, //Locus Address Resolution Protocol - MTP = 92, //Multicast Transport Protocol - AX_25 = 93, //AX.25 - OS = 94, //KA9Q NOS compatible IP over IP tunneling - MICP = 95, //Mobile Internetworking Control Protocol - SCC_SP = 96, //Semaphore Communications Sec. Pro - ETHERIP = 97, //Ethernet-within-IP Encapsulation - ENCAP = 98, //Encapsulation Header - PRIVATE_ENCRYPTION = 99, //Any private encryption scheme - GMTP = 100, //GMTP - IFMP = 101, //Ipsilon Flow Management Protocol - PNNI = 102, //PNNI over IP - PIM = 103, //Protocol Independent Multicast - ARIS = 104, //IBM's ARIS (Aggregate Route IP Switching) Protocol - SCPS = 105, //SCPS (Space Communications Protocol Standards) - QNX = 106, //QNX - ACTIVE_NETWORKS = 107, //Active Networks - IPComp = 108, //IP Payload Compression Protocol - SNP = 109, //Sitara Networks Protocol - Compaq_Peer = 110, //Compaq Peer Protocol - IPX_in_IP = 111, //IPX in IP - VRRP = 112, //Virtual Router Redundancy Protocol, Common Address Redundancy Protocol (not IANA assigned) - PGM = 113, //PGM Reliable Transport Protocol - ANY_HOP = 114, //Any 0-hop protocol - L2TP = 115, //Layer Two Tunneling Protocol Version 3 - DDX = 116, //D-II Data Exchange (DDX) - IATP = 117, //Interactive Agent Transfer Protocol - STP = 118, //Schedule Transfer Protocol - SRP = 119, //SpectraLink Radio Protocol - UTI = 120, //Universal Transport Interface Protocol - SMP = 121, //Simple Message Protocol - SM = 122, //Simple Multicast Protocol - PTP = 123, //Performance Transparency Protocol - IS_IS_over_IPv4 = 124, //Intermediate System to Intermediate System (IS-IS) Protocol over IPv4 - FIRE = 125, //Flexible Intra-AS Routing Environment - CRTP = 126, //Combat Radio Transport Protocol - CRUDP = 127, //Combat Radio User Datagram - SSCOPMCE = 128, //Service-Specific Connection-Oriented Protocol in a Multilink and Connectionless Environment - IPLT = 129, // - SPS = 130, //Secure Packet Shield - PIPE = 131, //Private IP Encapsulation within IP - SCTP = 132, //Stream Control Transmission Protocol - FC = 133, //Fibre Channel - RSVP_E2E_IGNORE = 134, //Reservation Protocol (RSVP) End-to-End Ignore - Mobility_Header = 135, //Mobility Extension Header for IPv6 - UDPLite = 136, //Lightweight User Datagram Protocol - MPLS_in_IP = 137, //Multiprotocol Label Switching Encapsulated in IP - manet = 138, //MANET Protocols - HIP = 139, //Host Identity Protocol - Shim6 = 140, //Site Multihoming by IPv6 Intermediation - WESP = 141, //Wrapped Encapsulating Security Payload - ROHC = 142, //Robust Header Compression - - //Unassigned = 143 - 252, // - //Use for experimentation and testing = 253 - 254, // - Reserved = 255, // - }; -} \ No newline at end of file diff --git a/ZitiBackgroundTask/src/ip/TCP.cs b/ZitiBackgroundTask/src/ip/TCP.cs deleted file mode 100644 index f42bf2b4..00000000 --- a/ZitiBackgroundTask/src/ip/TCP.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NetFoundry.VPN.IP -{ - internal sealed class Tcp : Packet - { - private Tcp() - { - } - } -} \ No newline at end of file diff --git a/ZitiBackgroundTask/src/ip/TcpHeader.cs b/ZitiBackgroundTask/src/ip/TcpHeader.cs deleted file mode 100644 index 67438ce9..00000000 --- a/ZitiBackgroundTask/src/ip/TcpHeader.cs +++ /dev/null @@ -1,293 +0,0 @@ -using System.Net; -using System; -using System.IO; -using System.Text; -using NetFoundry.VPN.Util; - -namespace NetFoundry.VPN.IP -{ - /// - /// This class encapsulates all the TCP header fields and provides a mechanism - /// to set and get the details of them through a parameterized contructor - /// and public properties respectively. - /// - sealed class TcpHeader - { - private IpHeader ipHeader = null; - - // Sixteen bits for the source port number. - private ushort _sourcePort; - // Sixteen bits for the destination port number. - private ushort _destinationPort; - // Thirty two bits for the sequence number. - private uint _sequenceNumber = 555; - // Thirty two bits for the acknowledgement number. - private uint _acknowledgementNumber = 555; - // Sixteen bits for flags and data offset. - private ushort _dataOffsetAndFlags = 555; - // Sixteen bits for the window size. - private ushort _window = 555; - // Sixteen bits for the checksum, (checksum can be negative so taken as short). - private short _checksum = 555; - // Sixteen bits for the urgent pointer. - private ushort _urgentPointer; - // Header length. - private byte _headerLength; - // Length of the data being carried. - private ushort _messageLength; - // Data carried by the TCP packet. - private byte[] _tcpData = new byte[2 << 15]; - - - internal void WriteTo(System.IO.Stream stream) - { - - } - - public TcpHeader([System.Runtime.InteropServices.WindowsRuntime.ReadOnlyArray()] byte[] byBuffer, int nReceived, IpHeader ipHeader) - { - this.ipHeader = ipHeader; - try - { - // Create MemoryStream out of the received bytes. - MemoryStream memoryStream = new MemoryStream(byBuffer, 0, nReceived); - // Next we create a BinaryReader out of the MemoryStream. - BinaryReader binaryReader = new BinaryReader(memoryStream); - // The first sixteen bits contain the source port. - _sourcePort = (ushort)IPAddress.NetworkToHostOrder(binaryReader.ReadInt16()); - // The next sixteen contain the destiination port. - _destinationPort = (ushort)IPAddress.NetworkToHostOrder(binaryReader.ReadInt16()); - // Next thirty two have the sequence number. - _sequenceNumber = (uint)IPAddress.NetworkToHostOrder(binaryReader.ReadInt32()); - // Next thirty two have the acknowledgement number. - _acknowledgementNumber = (uint)IPAddress.NetworkToHostOrder(binaryReader.ReadInt32()); - // The next sixteen bits hold the flags and the data offset. - _dataOffsetAndFlags = (ushort)IPAddress.NetworkToHostOrder(binaryReader.ReadInt16()); - // The next sixteen contain the window size. - _window = (ushort)IPAddress.NetworkToHostOrder(binaryReader.ReadInt16()); - // In the next sixteen we have the checksum. - _checksum = (short)IPAddress.NetworkToHostOrder(binaryReader.ReadInt16()); - // The following sixteen contain the urgent pointer. - _urgentPointer = (ushort)IPAddress.NetworkToHostOrder(binaryReader.ReadInt16()); - // The data offset indicates where the data begins, so using it we - // calculate the header length. - _headerLength = (byte)(_dataOffsetAndFlags >> 12); - _headerLength *= 4; - // Message length = Total length of the TCP packet - Header length. - _messageLength = (ushort)(nReceived - _headerLength); - // Copy the TCP data into the data buffer. - Array.Copy(byBuffer, _headerLength, _tcpData, 0, - nReceived - _headerLength); - } - catch (Exception ex) - { - LogHelper.LogLine(ex.Message); - } - } - - public string ToShortString() - { - string src = ipHeader.SourceAddress.MapToIPv4().ToString(); - string dst = ipHeader.DestinationAddress.MapToIPv4().ToString(); - - return string.Format("tcp from {0}:{1} to {2}:{3}. payload: {4}. ", src, SourcePort, dst, DestinationPort, MessageLength); - } - - public string ToLoooongString() - { - StringBuilder b = new StringBuilder(); - //b.Append(ipHeader.ToLoooongString()); - b.Append(" SequenceNumber: "); - b.Append(this.SequenceNumber); - b.Append(" AckNo: "); - b.Append(this.AcknowledgementNumber); - b.Append(" ChecksumTCP: "); - b.Append(this.Checksum); - //b.Append("Data: "); - //b.Append(this.Data); - b.Append(" DestinationPort: "); - b.Append(this.DestinationPort); - b.Append(" Flags: "); - b.Append(this.Flags); - b.Append(" HeaderLength: "); - b.Append(this.HeaderLength); - b.Append(" MessageLength: "); - b.Append(this.MessageLength); - b.Append(" SourcePort: "); - b.Append(this.SourcePort); - b.Append(" UrgentPointer: "); - b.Append(this.UrgentPointer); - b.Append(" WindowSize: "); - b.Append(this.WindowSize); - - return b.ToString(); - } - - public void WriteTo(TextWriter writer) - {/* - writer.WriteLine("ByVersionAndHeaderLength: " + ByVersionAndHeaderLength); - writer.WriteLine("ByDifferentiatedServices: " + ByDifferentiatedServices); - writer.WriteLine("UsTotalLength: " + UsTotalLength); - writer.WriteLine("UsIdentification: " + UsIdentification); - writer.WriteLine("usFlagsAndOffset: " + usFlagsAndOffset); - writer.WriteLine("ByTTL: " + ByTTL); - writer.WriteLine("ByProtocol: " + ByProtocol); - writer.WriteLine("SChecksum: " + SChecksum); - writer.WriteLine("UiSourceIPAddress: " + _sourceIPAddress); - writer.WriteLine("UiDestinationIPAddress: " + UiDestinationIPAddress); - writer.WriteLine("ByHeaderLength: " + ByHeaderLength); - writer.WriteLine("As Hex: "); - writer.WriteLine(BinaryVisualiser.FormatAsHex(Data, UsTotalLength));*/ - writer.WriteLine("NOT IMPLEMENTED YET"); - writer.Flush(); - } - - - - public string SourcePort - { - get - { - return _sourcePort.ToString(); - } - } - - public string DestinationPort - { - get - { - return _destinationPort.ToString(); - } - } - - public string SequenceNumber - { - get - { - return _sequenceNumber.ToString(); - } - } - - public string AcknowledgementNumber - { - get - { - // If the ACK flag is set then only we have a valid value in the - // acknowlegement field, so check for it beore returning anything. - if ((_dataOffsetAndFlags & 0x10) != 0) - { - return _acknowledgementNumber.ToString(); - } - else - { - return ""; - } - } - } - - public string HeaderLength - { - get - { - return _headerLength.ToString(); - } - } - - public string WindowSize - { - get - { - return _window.ToString(); - } - } - - public string UrgentPointer - { - get - { - // If the URG flag is set then only we have a valid value in the urgent - // pointer field, so check for it beore returning anything. - if ((_dataOffsetAndFlags & 0x20) != 0) - { - return _urgentPointer.ToString(); - } - else - { - return ""; - } - } - } - - public string Flags - { - get - { - // The last six bits of data offset and flags contain the control bits. - // First we extract the flags. - int nFlags = _dataOffsetAndFlags & 0x3F; - string strFlags = string.Format("0x{0:x2} (", nFlags); - // Now we start looking whether individual bits are set or not. - if ((nFlags & 0x01) != 0) - { - strFlags += "FIN, "; - } - if ((nFlags & 0x02) != 0) - { - strFlags += "SYN, "; - } - if ((nFlags & 0x04) != 0) - { - strFlags += "RST, "; - } - if ((nFlags & 0x08) != 0) - { - strFlags += "PSH, "; - } - if ((nFlags & 0x10) != 0) - { - strFlags += "ACK, "; - } - if ((nFlags & 0x20) != 0) - { - strFlags += "URG"; - } - strFlags += ")"; - - if (strFlags.Contains("()")) - { - strFlags = strFlags.Remove(strFlags.Length - 3); - } - else if (strFlags.Contains(", )")) - { - strFlags = strFlags.Remove(strFlags.Length - 3, 2); - } - return strFlags; - } - } - - public string Checksum - { - get - { - // Return the checksum in hexadecimal format. - return string.Format("0x{0:x2}", _checksum); - } - } - - public byte[] Data - { - get - { - return _tcpData; - } - } - - public ushort MessageLength - { - get - { - return _messageLength; - } - } - } -} \ No newline at end of file diff --git a/ZitiBackgroundTask/src/ip/UDP.cs b/ZitiBackgroundTask/src/ip/UDP.cs deleted file mode 100644 index e159bf7a..00000000 --- a/ZitiBackgroundTask/src/ip/UDP.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NetFoundry.VPN.IP -{ - internal sealed class Udp : Packet - { - - private Udp() - { - } - } -} \ No newline at end of file diff --git a/ZitiBackgroundTask/src/ip/UdpHeader.cs b/ZitiBackgroundTask/src/ip/UdpHeader.cs deleted file mode 100644 index 8a74f18f..00000000 --- a/ZitiBackgroundTask/src/ip/UdpHeader.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System.Net; -using System; -using System.IO; - -namespace NetFoundry.VPN.IP -{ - /// - /// This class encapsulates all the UDP header fields and provides a mechanism - /// to set and get the details of them through a parameterized contructor - /// and public properties respectively. - /// - public sealed class UdpHeader - { - // Sixteen bits for the source port number. - private ushort UsSourcePort; - // Sixteen bits for the destination port number. - private ushort UsDestinationPort; - // Length of the UDP header. - private ushort UsLength; - // Sixteen bits for the checksum (checksum can be negative so taken as short). - private short SChecksum; - // Data carried by the UDP packet. - private byte[] ByUDPData = new byte[4096]; - - public UdpHeader([System.Runtime.InteropServices.WindowsRuntime.ReadOnlyArray()] byte[] byBuffer, int nReceived) - { - // Create MemoryStream out of the received bytes. - MemoryStream memoryStream = new MemoryStream(byBuffer, 0, nReceived); - // Next we create a BinaryReader out of the MemoryStream. - BinaryReader binaryReader = new BinaryReader(memoryStream); - // The first sixteen bits contain the source port. - UsSourcePort = (ushort)IPAddress.NetworkToHostOrder( - binaryReader.ReadInt16()); - // The next sixteen bits contain the destination port. - UsDestinationPort = (ushort)IPAddress.NetworkToHostOrder( - binaryReader.ReadInt16()); - // The next sixteen bits contain the length of the UDP packet. - UsLength = (ushort)IPAddress.NetworkToHostOrder( - binaryReader.ReadInt16()); - // The next sixteen bits contain the checksum. - SChecksum = IPAddress.NetworkToHostOrder(binaryReader.ReadInt16()); - // Copy the data carried by the UDP packet into the data buffer. - Array.Copy(byBuffer, 8, ByUDPData, 0, nReceived - 8); - } - - public string SourcePort - { - get - { - return UsSourcePort.ToString(); - } - } - - public string DestinationPort - { - get - { - return UsDestinationPort.ToString(); - } - } - - public string Length - { - get - { - return UsLength.ToString (); - } - } - - public string Checksum - { - get - { - // Return the checksum in hexadecimal format. - return string.Format("0x{0:x2}", SChecksum); - } - } - - public byte[] Data - { - get - { - return ByUDPData; - } - } - } -} \ No newline at end of file diff --git a/ZitiBackgroundTask/src/util/BinaryVisualiser.cs b/ZitiBackgroundTask/src/util/BinaryVisualiser.cs deleted file mode 100644 index 4f291552..00000000 --- a/ZitiBackgroundTask/src/util/BinaryVisualiser.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NetFoundry.VPN.Util -{ - public static class BinaryVisualiser - { - public static string FormatAsHex([System.Runtime.InteropServices.WindowsRuntime.ReadOnlyArrayAttribute] - byte[] dataAsBytes, int len) - { - ReadOnlySpan data = new ReadOnlySpan(dataAsBytes); - - byte ReplaceControlCharacterWithDot(byte character) - => character < 31 || character >= 127 ? (byte)46 /* dot */ : character; - - byte[] ReplaceControlCharactersWithDots(byte[] characters) - => characters.Select(ReplaceControlCharacterWithDot).ToArray(); - - var result = new StringBuilder(); - const int lineWidth = 16; - for (var pos = 0; pos < len;) - { - var line = data.Slice(pos, Math.Min(lineWidth, data.Length - pos)).ToArray(); - var asHex = string.Join(" ", - line.Select(v => v.ToString("X2", System.Globalization.CultureInfo.InvariantCulture))); - asHex += new string(' ', lineWidth * 3 - 1 - asHex.Length); - var asCharacters = Encoding.ASCII.GetString(ReplaceControlCharactersWithDots(line)); - result.Append(FormattableString.Invariant($"{pos:X4} {asHex} {asCharacters}\n")); - if (line.Length > 0) - { - pos += line.Length; - } - else - { - break; - } - } - - return result.ToString(); - } - } -} diff --git a/ZitiBackgroundTask/src/util/HexHelper.cs b/ZitiBackgroundTask/src/util/HexHelper.cs deleted file mode 100644 index abc13e66..00000000 --- a/ZitiBackgroundTask/src/util/HexHelper.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using System.Text; -using System.Threading.Tasks; - -namespace NetFoundry.VPN.Util -{ - public sealed class HexHelper - { - - public static string FormatAsHex([ReadOnlyArrayAttribute] byte[] dataAsBytes, int len) - { - return FormatAsHex(dataAsBytes, len, 16); - } - - public static string FormatAsHex([ReadOnlyArrayAttribute] byte[] dataAsBytes, int len, byte lineWidth) - { - ReadOnlySpan data = new ReadOnlySpan(dataAsBytes); - - byte ReplaceControlCharacterWithDot(byte character) - => character < 31 || character >= 127 ? (byte)46 /* dot */ : character; - - byte[] ReplaceControlCharactersWithDots(byte[] characters) - => characters.Select(ReplaceControlCharacterWithDot).ToArray(); - - var result = new StringBuilder(); - //const int lineWidth = 16; - for (var pos = 0; pos < len;) - { - var howManyBytes = Math.Min(lineWidth, len - pos); - var line = data.Slice(pos, howManyBytes).ToArray(); - var asHex = string.Join(" ", - line.Select(v => v.ToString("X2", System.Globalization.CultureInfo.InvariantCulture))); - asHex += new string(' ', lineWidth * 3 - 1 - asHex.Length); - var asCharacters = Encoding.ASCII.GetString(ReplaceControlCharactersWithDots(line)); - result.Append(FormattableString.Invariant($"{pos:X4} {asHex} {asCharacters}\n")); - if (line.Length > 0) - { - pos += line.Length; - } - else - { - break; - } - } - - return result.ToString().Remove(result.Length - 1); - } - - public static byte[] FromDelimitedString(string hex, char delimiter) - { - string[] strBytes = hex.Split(delimiter); - byte[] bytes = new byte[strBytes.Length]; - int i = 0; - foreach(string b in strBytes) - { - bytes[i++] = Byte.Parse(b); - } - return bytes; - } - - public static byte[] FromString(string hex) - { - if (hex.Length % 2 == 1) - throw new Exception("The binary key cannot have an odd number of digits"); - int hexLen = hex.Length / 2; - byte[] bytes = new byte[hexLen]; - for(int i = 0; i < hexLen; i++) - { - string strByte = hex.Substring(i * 2, 2); - Debug.WriteLine("READ: " + strByte); - bytes[i] = Byte.Parse(strByte, System.Globalization.NumberStyles.AllowHexSpecifier); - } - return bytes; - } - - public static int GetHexVal(char hex) - { - int val = (int)hex; - //For uppercase A-F letters: - return val - (val < 58 ? 48 : 55); - //For lowercase a-f letters: - //return val - (val < 58 ? 48 : 87); - //Or the two combined, but a bit slower: - //return val - (val < 58 ? 48 : (val < 97 ? 55 : 87)); - } - } -} diff --git a/ZitiBackgroundTask/src/util/LogHelper.cs b/ZitiBackgroundTask/src/util/LogHelper.cs deleted file mode 100644 index 799bd328..00000000 --- a/ZitiBackgroundTask/src/util/LogHelper.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Diagnostics; -using Windows.Networking.Vpn; - -namespace NetFoundry.VPN.Util -{ - public sealed class LogHelper - { - private const string locator = "__X__"; - public static void LogLine(string msg) - { - Debug.WriteLine(string.Format("${0} ${1}: ${2}", locator, Environment.CurrentManagedThreadId, msg)); - } - public static void LogLine(string text, VpnChannel channel) - { - LogLine(channel?.GetHashCode() + ":" + text); - } - } -} diff --git a/ZitiBackgroundTask/src/ziti/Controller.cs b/ZitiBackgroundTask/src/ziti/Controller.cs deleted file mode 100644 index 2632bf07..00000000 --- a/ZitiBackgroundTask/src/ziti/Controller.cs +++ /dev/null @@ -1,139 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net.Http; -using System.Security.Cryptography.X509Certificates; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - - -using Newtonsoft.Json; - - -using bc = Org.BouncyCastle; -using Org.BouncyCastle.OpenSsl; -using Org.BouncyCastle.Crypto; -using Org.BouncyCastle.Security; -using Org.BouncyCastle.Pkcs; - -namespace NetFoundry.VPN.Ziti -{ - internal class Controller - { - private static HttpClient httpClient = null; - static string URL = "https://demo.ziti.netfoundry.io:1080/"; - - internal static void GetServices() - { - string json = @""; - bc.X509.X509Certificate x509Cert = null; - bc.X509.X509Certificate x509CaCert = null; - AsymmetricCipherKeyPair ackp = null; - - dynamic thing = JsonConvert.DeserializeObject(json); - string key = CleanPkiNode(thing.id.key?.ToString()); - string cert = CleanPkiNode(thing.id.cert?.ToString()); - string ca = CleanPkiNode(thing.id.ca?.ToString()); - - if (!string.IsNullOrEmpty(key)) - { - using (var keyReader = new StringReader(key)) - { - ackp = (AsymmetricCipherKeyPair)new PemReader(keyReader).ReadObject(); - } - } - - if (!string.IsNullOrEmpty(cert)) - { - using (var certReader = new StringReader(cert)) - { - x509Cert = (bc.X509.X509Certificate)new PemReader(certReader).ReadObject(); - } - } - - if (!string.IsNullOrEmpty(ca)) - { - using (var caReader = new StringReader(ca)) - { - x509CaCert = (bc.X509.X509Certificate)new PemReader(caReader).ReadObject(); - } - } - - var csharpCert = CreateDotNetCertificate(x509Cert, ackp); - - var cch = new HttpClientHandler(); - - cch.ClientCertificates.Add(csharpCert); - cch.ClientCertificateOptions = ClientCertificateOption.Manual; - httpClient = new HttpClient(new LoggingHandler(cch)) - { - BaseAddress = new Uri($"{URL}") - }; - } - internal static X509Certificate createCertificate() - { - return null; - } - - - static string CleanPkiNode(string source) - { - if (source == null) return null; - if (source.StartsWith("pem:")) - { - return source.Substring("pem:".Length); - } - else if (source.StartsWith("file://")) - { - throw new Exception("File pki not supported currently"); - } - else - { - throw new Exception("Unexpected pki?"); - } - } - private static X509Certificate CreateDotNetCertificate(Org.BouncyCastle.X509.X509Certificate certificate, - AsymmetricCipherKeyPair keyPair) - { - Pkcs12Store store = new Pkcs12Store(); - string friendlyName = new Guid().ToString(); - X509CertificateEntry certificateEntry = new X509CertificateEntry(certificate); - store.SetCertificateEntry(friendlyName, certificateEntry); - store.SetKeyEntry(friendlyName, new AsymmetricKeyEntry(keyPair.Private), new[] { certificateEntry }); - - MemoryStream stream = new MemoryStream(); - store.Save(stream, null, new SecureRandom()); - - return new X509Certificate2(stream.ToArray()); - } - } - - internal class LoggingHandler : DelegatingHandler - { - public LoggingHandler(HttpMessageHandler innerHandler) : base(innerHandler) - { - } - - protected override async Task SendAsync( - HttpRequestMessage request, - CancellationToken cancellationToken) - { - System.Diagnostics.Debug.WriteLine($"Request: {request}"); - try - { - // base.SendAsync calls the inner handler - var response = await base.SendAsync(request, cancellationToken); - System.Diagnostics.Debug.WriteLine($"Response: {response}"); - return response; - } - catch (Exception ex) - { - System.Diagnostics.Debug.WriteLine($"Failed to get response: {ex}"); - throw; - } - } - } - -} diff --git a/ZitiBackgroundTask/src/ziti/route/Intercept.cs b/ZitiBackgroundTask/src/ziti/route/Intercept.cs deleted file mode 100644 index 48254edd..00000000 --- a/ZitiBackgroundTask/src/ziti/route/Intercept.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Windows.Networking.Vpn; - -namespace ZitiBackgroundTask.Ziti.Route -{ - internal class Intercept - { - public string ServiceName { get; set; } - - public string DomainName { get; set; } - - public VpnDomainNameType DomainType { get; set; } - - public int Port { get; set; } - - } -} diff --git a/ZitiBackgroundTask/src/ziti/route/RouteInformation.cs b/ZitiBackgroundTask/src/ziti/route/RouteInformation.cs deleted file mode 100644 index 027c8105..00000000 --- a/ZitiBackgroundTask/src/ziti/route/RouteInformation.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ZitiBackgroundTask.Ziti.Route; - -namespace ZitiBackgroundTask -{ - internal class RouteInformation - { - private static ObservableCollection _interceptsObservable = new ObservableCollection(); - - public static ObservableCollection Intercepts - { - get { return _interceptsObservable; } - } - } -} diff --git a/ZitiTunneler/App.config b/ZitiTunneler/App.config index 787dcbec..bae5d6d8 100644 --- a/ZitiTunneler/App.config +++ b/ZitiTunneler/App.config @@ -1,6 +1,6 @@ - + - + - \ No newline at end of file + diff --git a/ZitiTunneler/Properties/Resources.Designer.cs b/ZitiTunneler/Properties/Resources.Designer.cs index 07f1f130..ae6c82ec 100644 --- a/ZitiTunneler/Properties/Resources.Designer.cs +++ b/ZitiTunneler/Properties/Resources.Designer.cs @@ -9,54 +9,55 @@ //------------------------------------------------------------------------------ namespace ZitiTunneler.Properties { - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if ((resourceMan == null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ZitiTunneler.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ZitiTunneler.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } } diff --git a/ZitiTunneler/Properties/Settings.Designer.cs b/ZitiTunneler/Properties/Settings.Designer.cs index 8b0c3a18..25514222 100644 --- a/ZitiTunneler/Properties/Settings.Designer.cs +++ b/ZitiTunneler/Properties/Settings.Designer.cs @@ -9,18 +9,18 @@ //------------------------------------------------------------------------------ namespace ZitiTunneler.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings:global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } } diff --git a/ZitiTunneler/ZitiTunneler.csproj b/ZitiTunneler/ZitiTunneler.csproj index 20fbdd37..6ed7cd5c 100644 --- a/ZitiTunneler/ZitiTunneler.csproj +++ b/ZitiTunneler/ZitiTunneler.csproj @@ -8,12 +8,13 @@ WinExe ZitiTunneler ZitiTunneler - v4.7.1 + v4.6.1 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 true true + AnyCPU diff --git a/ZitiUWPClient/AddIdentity.xaml b/ZitiUWPClient/AddIdentity.xaml deleted file mode 100644 index 0325c259..00000000 --- a/ZitiUWPClient/AddIdentity.xaml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - diff --git a/ZitiUWPClient/App.xaml b/ZitiUWPClient/App.xaml deleted file mode 100644 index d58a88ce..00000000 --- a/ZitiUWPClient/App.xaml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/ZitiUWPClient/App.xaml.cs b/ZitiUWPClient/App.xaml.cs deleted file mode 100644 index 92aa022a..00000000 --- a/ZitiUWPClient/App.xaml.cs +++ /dev/null @@ -1,100 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.ApplicationModel; -using Windows.ApplicationModel.Activation; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; - -namespace TestUWPApp -{ - /// - /// Provides application-specific behavior to supplement the default Application class. - /// - sealed partial class App : Application - { - /// - /// Initializes the singleton application object. This is the first line of authored code - /// executed, and as such is the logical equivalent of main() or WinMain(). - /// - public App() - { - this.InitializeComponent(); - this.Suspending += OnSuspending; - } - - /// - /// Invoked when the application is launched normally by the end user. Other entry points - /// will be used such as when the application is launched to open a specific file. - /// - /// Details about the launch request and process. - protected override void OnLaunched(LaunchActivatedEventArgs e) - { - Frame rootFrame = Window.Current.Content as Frame; - - // Do not repeat app initialization when the Window already has content, - // just ensure that the window is active - if (rootFrame == null) - { - // Create a Frame to act as the navigation context and navigate to the first page - rootFrame = new Frame(); - - rootFrame.NavigationFailed += OnNavigationFailed; - - if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) - { - //TODO: Load state from previously suspended application - } - - // Place the frame in the current Window - Window.Current.Content = rootFrame; - } - - if (e.PrelaunchActivated == false) - { - if (rootFrame.Content == null) - { - // When the navigation stack isn't restored navigate to the first page, - // configuring the new page by passing required information as a navigation - // parameter - rootFrame.Navigate(typeof(MainPage), e.Arguments); - } - // Ensure the current window is active - Window.Current.Activate(); - } - } - - /// - /// Invoked when Navigation to a certain page fails - /// - /// The Frame which failed navigation - /// Details about the navigation failure - void OnNavigationFailed(object sender, NavigationFailedEventArgs e) - { - throw new Exception("Failed to load Page " + e.SourcePageType.FullName); - } - - /// - /// Invoked when application execution is being suspended. Application state is saved - /// without knowing whether the application will be terminated or resumed with the contents - /// of memory still intact. - /// - /// The source of the suspend request. - /// Details about the suspend request. - private void OnSuspending(object sender, SuspendingEventArgs e) - { - var deferral = e.SuspendingOperation.GetDeferral(); - //TODO: Save application state and stop any background activity - deferral.Complete(); - } - } -} diff --git a/ZitiUWPClient/Assets/LockScreenLogo.scale-200.png b/ZitiUWPClient/Assets/LockScreenLogo.scale-200.png deleted file mode 100644 index 735f57adb5dfc01886d137b4e493d7e97cf13af3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1430 zcmaJ>TTC2P7~aKltDttVHYH6u8Io4i*}3fO&d$gd*bA_<3j~&e7%8(eXJLfhS!M@! zKrliY>>6yT4+Kr95$!DoD(Qn-5TP|{V_KS`k~E6(LGS@#`v$hQo&^^BKsw3HIsZBT z_y6C2n`lK@apunKojRQ^(_P}Mgewt$(^BBKCTZ;*xa?J3wQ7~@S0lUvbcLeq1Bg4o zH-bvQi|wt~L7q$~a-gDFP!{&TQfc3fX*6=uHv* zT&1&U(-)L%Xp^djI2?~eBF2cxC@YOP$+9d?P&h?lPy-9M2UT9fg5jKm1t$m#iWE{M zIf%q9@;fyT?0UP>tcw-bLkz;s2LlKl2qeP0w zECS7Ate+Awk|KQ+DOk;fl}Xsy4o^CY=pwq%QAAKKl628_yNPsK>?A>%D8fQG6IgdJ ztnxttBz#NI_a@fk7SU`WtrpsfZsNs9^0(2a z@C3#YO3>k~w7?2hipBf{#b6`}Xw1hlG$yi?;1dDs7k~xDAw@jiI*+tc;t2Lflg&bM)0!Y;0_@=w%`LW^8DsYpS#-bLOklX9r?Ei}TScw|4DbpW%+7 zFgAI)f51s}{y-eWb|vrU-Ya!GuYKP)J7z#*V_k^Xo>4!1Yqj*m)x&0L^tg3GJbVAJ zJ-Pl$R=NAabouV=^z_t;^K*0AvFs!vYU>_<|I^#c?>>CR<(T?=%{;U=aI*SbZADLH z&(f2wz_Y0??Tf|g;?|1Znw6}6U43Q#qNRwv1vp9uFn1)V#*4p&%$mP9x&15^OaBiDS(XppT|z^>;B{PLVEbS3IFYV yGvCsSX*m diff --git a/ZitiUWPClient/Assets/SplashScreen.scale-200.png b/ZitiUWPClient/Assets/SplashScreen.scale-200.png deleted file mode 100644 index 023e7f1feda78d5100569825acedfd213a0d84e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7700 zcmeHLYj~4Yw%(;oxoEH#Kxq-eR|+VkP17b#Vk;?4QwkI+A{L04G+#<<(x#Un1#+h5>eArRq zTw$)ZvTWW_Y?bDho0nPVTh08+s`sp!j74rJTTtXIDww0SILedFv?sZ?yb@@}GN;#8 znk_b~Q(A0YR#uV4ef!osoV1M3;vQ8N$O|fStfgf$S5;ddUNv`tWtGjM;koG#N;7M< zP*84lnx(bn_KF&9Z5Ai$)#Cs3a|$OFw>WKCT$of*L7_CqQEinflT|W{JT+aKp-E0v zsxmYg)1(T>DROm+LN1eQw8}KCTp=C!$H7`PU!t9_Hw@TsTI2`udRZv*!a5`#A9hK6Y95L(CDUX&_@QxKV z_feX{UhA#ZWlvgpL$#w^D#lq`_A4AzDqd|Zv6y9PX&DNcN|l}_D^{q@GG&H^Pg583 z8FI6N8^H7b5WjGp;urW)d7F+_lcp%KsLX0viCmE(OHH+=%ZfD_=`voUuoUxFO^L;- z;!;2{g-YiiO6m4bs89OuF9!p{FGtH-f%8<2gY!h9s)4ciN%{Kh1+`}{^}M~+TDH9N z^Z5PlgVXMC&2&k*Hw^Lb9gny#ro$MOIxIt{+r)EA10$VR3 zanN8D{TUkl+v0CQ_>ZoHP<M-x#8@8ZiT#$Kh`(uRaX1g$Bg|qy$<#7 zSSAi{Nb8Y=lvNVeio+UGLCAtoLBfL`iOv`)yoJMDJBN>4IH@(l7YRF;61@>qq1iM9 zr@b#OC~SAxSle?5Pp8Z78{VO0YFr1x7kZU64Z23eLf2T2#6J_t;-E}DkB?NufZ0Ug zi?J&byXeaB-uTNVhuiM!UVQw}bZrJ3GtAETYp->!{q#zfN7D3AS9@Q7*V^85jGx#R z(QxYV(wW#F0XF9^^s>>H8pPlVJ>)3Oz z&_X8Sf@~?cH_O*cgi$U#`v`RRfv#y3m(ZpKk^5uLup+lVs$~}FZU$r_+}#hl%?g5m z-u-}-666ssp-xWQak~>PPy$mRc|~?pVSs1_@mBEXpPVfLF6(Ktf1S* zPPh@QZ=tFMs?LM2(5P3L2;l_6XX6s&cYsP1ip#eg0`ZEP0HGYh{UmS@o`MihLLvkU zgyAG0G`b1|qjxxh1(ODKFE%AP}Dq=3vK$P7TXP4GrM1kQ72!GUVMDl`rDC&2;TA}*nF z8$nQD&6ys_nc1*E7$*1S@R8$ymy(sQV}imGSedB@{!QR5P&N_H=-^o!?LsWs+2|mH z-e=)T^SvI)=_JIm7}j4;@*Z17=(#}m=~YF~z~CLI+vdAGlJDcdF$TM?CVI1%LhUrN zaa6DJ=Yh$)$k&Oz{-~8yw^GM^8prYxSxo zvI4k#ibryMa%%*8oI-5m61Koa_A_xg=(fwp0aBX{;X4Q;NXUhtaoJDo1>TqhWtn=_ zd5~chq#&6~c%8JZK#t_&J(9EVUU&upYeIovLt1>vaHe}UUq>#RGQj!EN#5+0@T`(@ z^g~>*c`VGRiSt;!$_4+0hk^I!@O3``5=sZ8IwlxWW7km1B&_t&E*u0_9UBa#VqwY* zz>nxv?FAsVnRaD(Bui=6i==BFUw0k4n$>`umU`F2l?7CYTD^)c2X+d9X&ddS9|gj? zM?knGkGCX&W8offw8aLC2$D{PjC3nVZwd4k?eZH8*mZ)U@3Qk8RDFOz_#WUA#vnzy zyP>KrCfKwSXea7}jgJjBc}PGY+4#6%lbZyjhy`5sZd_Vy6Wz;ixa?czkN}J9It1K6 zY!eu>|AwF^fwZlLAYyQI*lM@^>O>Iu6Vf6i>Q$?v!SeUS<{>UYMwz$*%Aq?w^`j{h z!$GZbhu=^D{&ET8;))LL%ZBDZkQqRd2;u~!d9bHGmLRhLDctNgYyjsuvoSZ#iVdoB z2!f--UUA#U;<{je#?cYt^{PIyKa%hW>}uepWMyAI{{Zo7?2>?$c9;whJae%oN|I-kpTQSx_C$Z&;f zi2i)qmEn=y4U0uvk)$m;zKfjPK@oc?I`}1Jzl$Q~aoKBd3kt7L#7gyt|A_qgz6ai< z=X%D1i!d2h?rHR^R8SUj&G||dkC?DT>{o#Yau<@uqVT{Xef&XG}5*E4aPk{}~ zplx&XhaV)&1EfI3Em;Bw#O5SV^c;{twb-1Rw)+=0!e_BLbd7tYmXCH0wrlOSS+~`7He8Iqx0{CN+DVit9;*6L~JAN zD&cyT)2?h}xnYmL?^)<7YyzZ3$FHU^Eg;DLqAV{#wv#Wj7S`Jdl1pX&{3(uZ?!uh} zDc$ZTNV*7le_W6}Hju~GMTxZQ1aWCeUc%!jv3MHAzt>Y-nQK%zfT*3ebDQA5b?iGn; zBjv3B+GhLTexd_(CzZDP4|#n5^~scvB6#Pk%Ho!kQ>yYw((Dv{6=$g3jT1!u6gORW zx5#`7Wy-ZHRa~IxGHdrp(bm%lf>2%J660nj$fCqN(epv@y!l9s7@k6EvxS{AMP>WY zX4$@F8^kayphIx-RGO$+LYl9YdoI5d|4#q9##`_F5Xnx`&GPzp2fB{-{P@ATw=X@~ z_|&^UMWAKD;jjBKTK(~o?cUFRK8EX=6>cXpfzg4ZpMB>*w_^8GSiT-Jp|xBOnzM+j z*09-@-~qJ(eqWq5@R4i^u4^{McCP(!3}C|v_WsTR*bIUxN(Nx`u##3B4{sE`Z`v8w zAwIG`?1~PkID~W{uDzmqH98Pew_1(;x2%8r^vY{)_&J2K)cN{W+h5+g)ZcjP&Ci#O zgy|8K@4kyMfwilHd&6TDlhb%++Pk!>9HRld6HT7gwyZGrxS$}CsD6`>6!!2K1@Mjf z(P0WYB7V_OFZyeWrbOFb>O54BNXf~K&?}3=^v;v_wT{DKr?jN^DtN&DXwX%u?s*c6`%8>WFz z7}YW^tp0bp^NriE)AB6M2l<7rn7fzePtR*omOevpfm9n?}2V*+0iW;S)C zhg`NAjL?D=W#k*$aR{>pGf~lD-rVtD;5jW1_*Jn1j1=es@Kcx4ySM_bwcQCT=d+DV z>Sz~L=Hj@(X%31nK$mWI@7d>}ORB`K(p=+`UD)+99YUGQc7y^bHZ1F(8|tL0 zdK*DT0kSXG_{BKTpP2*2PecdKV9;dq$^ZZDP;Nyq1kp-&GI5eAyZsK!e3V zK@rPy*{(`KIfo+lc878mDKk^V#`VT05}64kBtk%DgwLrOvLMj5-;*GNKv6c6pzMuL z6EP%ob|_0IW}lLRXCP2!9wWhEw3LA7iF#1O1mIZ@Z=6&bz41F;@S_GvYAG-#CW3z{ zP3+6vHhvP&A3$##Vo9$dT^#MoGg^|MDm=Bt1d2RRwSZ<;ZHICpLBv5Xs!D?BH^(9_ z7`H=N&^v|Z-%mP}wNzG{aiFCsRgwzwq!N6obW9+7(R; z(SZ=23`|`>qil!LMGG{_Heq!BD>(Y-zV9wD)}hz25JA37YR%39;kI4y9pgtcUass6 zP24}ZY$vvYeI`zy&)A_X#nY3017ap*0&jx|mVwyGhg3;!keU53a}Uhm3BZI$N$6Se zLWlAmy1S0xKJm4G_U@sN_Tm=`$xWJSEwKU98rZ&)1R^*$$1vA3oG#&*%SMxY_~oGP zP&PFJatFLM-Ps%84IV-+Ow)T{C7cqUAvauy4C z(FRz&?6$Rypj{xO!`y=*J5o4@U8Q-(y5(*=YoKeZ+-1YdljXxkA#B)zo=FeQH#?Le zycNUmEEHWO9a=X^pb#&cOq7-`7UA87#|S22)<7RUtZo|(zibX=w;K3qur9vy#`MNV z6UUcf9ZwEnKCCp+OoBnF@OdbvH)ANXO0o~Pi9l8=x3))}L<#vO0-~O4!~--Ket?d} zJaqsj<@CD1%S2cTW%rOP{Vto%0sGW~1RMa_j^)5nil0Yw- z0EE#bP+l4#P^%PQ+N*oxu1Zq05xZ!bXfYTg>9c{(Iw*lnjR^>kz%lAN^zFce7rppy zY8zA~3GD=A6d*hze&l4D_wA~+O!56)BZTe_rEu}Ezi<4!kG|W#amBZ5{&XS2@6R~H z{9o^y*BkH4$~yX9U&@CgbOzX1bn9xqF|zh$Dh0Y5y*E0e90*$!ObrHY3Ok0`2=O~r zCuke6KrP9KOf?V(YDsM<6pX2nVoN%M$LT^q#FmtaF?1^27F*IcNX~XRB(|hCFvdcc zc)$=S-)acdk$g4?_>jRqxpI6M3vHZk?0c^3=byamYDNf;uB{3NlKW5IhnOS3DNkMV z?tK8?kJ}pmvp%&&eTVOVjHP`q34hN1@!aK}H(K!vI`~gf|Gv+FNEQD5Yd<~yX7k_l h&G-K)@HZb3BABY{)U1?^%I#E6`MGoTtustd{~yM6srvu` diff --git a/ZitiUWPClient/Assets/Square150x150Logo.scale-200.png b/ZitiUWPClient/Assets/Square150x150Logo.scale-200.png deleted file mode 100644 index af49fec1a5484db1d52a7f9b5ec90a27c7030186..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2937 zcma)84OCO-8BSud5)jwMLRVKgX(S?$n?Ld|vrsm<$CF7)&zTbyy1FE5bU`Q17MRv`9ue$;R(@8kR;#vJ*IM0>cJIAOte!d7oRgdH zd%ySjdB6L9=gX^A6)VzH7p2l@v~3zJAMw|DFy#^)F@@F*`mqUn=Il>l)8_+ab;nOW{%+iPx z+s{Eu|&pIs)Z7{La9~?xKfyl z#43?gjEL15d4WbOZo#SiP%>DB^+BcnJ=7dHEe;r#G=tuw|ka z%q@}##Uh7;tc%L_64m(kHtw74ty%BJMb)_1)#S0j`)F8_1jF7vScpsnH=0V19bO8y zR`0SjIdCUo&=>JwMQF8KHA<{ODHTiQh}0^@5QRmCA?gOH6_H3K^-_sNB^RrdNuK-R zOO*vOrKCVvDwgUck`kF(E7j{I#iiN;b*ZdCt4m@HPA`EuEqGGf4%!K<;(=I=&Vyrw z%TwcWtxa}8mCZ%Cyf&ActJ6_$ox5z6-D!0-dvnRx6t7y3d+h6QYpKWO;8OdnvERo7 zuEf>ih5`wqY)~o@OeVt-wM?Q!>QzdGRj!bz6fzYrfw$hZfAKzr2-M+D+R>}~oT574c;_3zquHcElqKIsryILt3g8n3jcMb+j?i?-L3FpZJ z2WRVBRdDPc+G5aaYg#5hpE+6nQ|(VSoxT3|biF;BUq#==-27Xi=gihDPYP$7?=9cP zYKE$jeQ|3~_L0VG-(F~2ZPyD0=k{J4Q~h(t__{-mz_w8{JDY9{`1ouzz!Vr5!ECdE z6U~O1k8c}24V7~zzXWTV-Pe4)y}wQJS&q%H5`Fo_f_JvIU489aCX$;P`u#!I-=^4ijC2{&9!O&h>mi?9oYD=GC#%)6{GzN6nQYw+Fal50!#x^asjBBR50i`+mho*ttoqV)ubM2KD9S~k7+FR4>{29?6 z{!l6kDdyTN0YJ9LgkPWeXm|gyi@zM3?0@{&pXT12w|78&W-q!RRF)&iLCEZVH<|fR zN0fr2^t8H(>L?>K#>^+jWROLral(Qy-xoBq1U7A&DV||wClb)Otd9?(gZ|8znMF}D zf<1haWz^s0qgecz;RFGt0C-B4g`jNGHsFU+;{<%t65v^sjk^h$lmWn#B0#_)9ij&d z-~lc`A)YYExi^7sBuPM^Y|wA2g*5?`K?#7tzELQYNxGo$UB$4J8RJp1k(8Jj+~hMT zlN~>M@KTTh^--8y3PK_NZ@AC!{PT=CziBzGd+wTJ^@icH!Bd}%)g8V)%K?|c&WTUk zy}qv1C%(fjRoZ4ozC3{O%@5?)XzH35zHns$pgU*Q?fj4v?fp1Qbm+j;3l;9jam9Da zXVcKjPlQ73x78QPu|Ffm6x?`~e3oD=gl=4kYK?={kD5j~QCXU)`HSdduNNENzA*2$ zOm3PzF!lN5e*06-f1Uot67wY#{o-S1!KZ7E=!~7ynnk9_iJR#kFoNbAOT#^2Gd17F zMmvU6>lndZQGd|ax9kUoXXO+$N?|j@6qpsF&_j7YXvwo_C{JpmLw5&#e6k>atv%es z5)7r*Wvv_JkUpT}M!_o!nVlEk1Zbl=a*2hQ*<|%*K1Glj^FcF`6kTzGQ3lz~2tCc@ z&x|tj;aH&1&9HwcJBcT`;{?a+pnej;M1HO(6Z{#J!cZA04hnFl;NXA+&`=7bjW_^o zfC40u3LMG?NdPtwGl>Tq6u}*QG)}-y;)lu-_>ee3kibW(69n0$0Zy!}9rQz%*v1iO zT9_H>99yIrSPYVy6^);rR}7Yo=J_T@hi+qhTZXnVWyf;JDYm5#eYLTxr*?kiNn!+Y zQ+LUkBafNJ#rH#C(?d5^;gw9o#%daEI{mA*LHPIHPU`#|H$hD zwm>0&+kahQ)E#%~k>&5@&#Vg82H?s%71=)(soi@174pi9--2{w{1$}Sz4zGn3Du&x bht0Iza^2ykEt4(epJ78uh5nDlX8(TxzDYwP diff --git a/ZitiUWPClient/Assets/Square44x44Logo.scale-200.png b/ZitiUWPClient/Assets/Square44x44Logo.scale-200.png deleted file mode 100644 index ce342a2ec8a61291ba76c54604aea7e9d20af11b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1647 zcmaJ?eM}Q)7(e+G1Q(|`V9JhTI2>MkceK4;p;PR&$Pi?ejk3YQ_3o`S&|W_dsOZ8# zWPTt69g`t$ab`0cj-Y0yiBSOqmd)tG7G(}M5aP0_%&9TijB#&)I{zSE^4@#z^FF`l z`8{8`o%wlL(UI|y2!cdsuVamHH~H86F!*-15em4)NqUpCQM5?aoC_eCf@lV4wvF2a zjDQn1JBL69f&@2M3rvzJcfE!eZ8FZUBlFlC5RD)it33{mF9#B82AiyQE%w)`vlwa> zv{<1sm&kSKK$&%2jSFn7$t&P%%6Ue>R=EAnG8N7fqynWG8L3p!4801a;8{+nliO(qd(jNJ_?+9W3#hLIDLoT6~3fx9=`CC-D}-AMrpEO7HK zt3$GicGPc?GmDjy7K2P@La;eu4!$zWCZ`ym{Z$b zu-O6RM&K4JT|BIZB`E-gxqG%FzanI#+2FFmqHqXG7yxWB=w55RGOM)$xMb(>kSNR z2w=1AZi%z=AmG~yea~XaXJR!v7vLn(RUnELfiB1|6D84ICOS}^Zo2AdN}<&*h}G_u z{xZ!(%>tLT3J3<5XhWy-tg+6)0nmUUENLW8TWA{R6bgVd3X;anYFZ^IRis*_P-C-r z;i>%1^eL3UI2-{w8nuFFcs0e~7J{O2k^~Ce%+Ly4U?|=!0LH=t6()xi<^I-rs+9sF z*q{E-CxZbGPeu#a;XJwE;9S1?#R&uns>^0G3p`hEUF*v`M?@h%T%J%RChmD|EVydq zmHWh*_=S%emRC*mhxaVLzT@>Z2SX0u9v*DIJ@WC^kLVdlGV6LpK$KIrlJqc zpJ921)+3JJdTx|<`G&kXpKkjGJv=76R`yYIQ{#c-`%+`#V(7}Q;&@6U8!Td1`d;?N z_9mnI#?AA}4J!r)LN4!E-@H5eXauuB7TOawS>Y|{-P?NNx-lq+z1W-+y(;39P&&LP zL{N80?&=C*qKmdA^moMZRuPcD!B<*mq$ch=0Cnlitw#txRWhb3%TQvPqjkC`F69G4b! ze7z9MZ#+;_#l?H37UqUhDFb^l&s2{oM$3I0o^Q!yx;;V)QmCMo)Tb_ui|mit8MS?U zm##6$sZZ1$@|s%?l@>4Z<*Q}sRBSKMhb4I{e5LdEhsHIHTe8Bod5c>6QtT>$XgUBz z6MK`kO$=jmt@FqggOhJ5j~e@ygRbG;<{Vu)*+nn9aQeo0;$#j;|MS=S$&L?BeV25z xs3B`@=#`5TF{^6(A1rvdY@|-RtQ|iS5{tyX+wH?;n8E)G$kykv-D^wh{{!TZT%7;_ diff --git a/ZitiUWPClient/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/ZitiUWPClient/Assets/Square44x44Logo.targetsize-24_altform-unplated.png deleted file mode 100644 index f6c02ce97e0a802b85f6021e822c89f8bf57d5cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1255 zcmaJ>TWs4@7*5+{G#S+&C!qC#> zf>5N3P6jO*Cz>ug*(_DmW=)kea&m$gZ^+nyiF`;j%w@}y8)>p*SH}C`m?DXeieF2U zyQHecc_L%Gh!7GMt+hG06y;+|p4>m~}PjA}rKViGiEnn7G0ZO<>G|7q;2?NwGCM3s?eued6%hd$B+ z*kQJ{#~$S=DFE(%=E+UkmlEI*%3llUf~8Ja9YU1Vui0IbGBkW_gHB%Rd&!!ioX zs40O?i9I{};kle7GMvE7(rk`la=gTI)47=>%?q@^iL-nUo3}h4S}N-KHn8t5mVP8w z&bSErwp+37 zNJJ8?a|{r5Q3R0Z5s-LB1WHOwYC@7pCHWND#cL1cZ?{kJ368_*(UDWUDyb<}0y@o# zfMF016iMWPCb6obAxT$JlB6(2DrlXDTB&!0`!m??4F(qWMhjVZo?JXQmz`1*58Z=& zcDmB|S-E@j?BoFGix0flckqdS4jsPNzhfWyWIM98GxcLs89C(~dw%$_t;JjX-SD}E zfiGV;{8Q%8r}w9x>EEigW81>`kvnU@pK)4+xk9@+bNj9L!AAZ@SZ@q|)&BmY3+HZx zul~BeG4|}-;L%cHViQGQX?^zFfO0&#cHwel=d`lH9sJ-@Sl@n*(8J2>%Ac`IxyY?Q z{=GhWvC#gu-~Ia7*n{=+;qM?Ul_wy1+u7ho;=`>EwP^g~R@{unBds`!#@}tluZQpS zm)M~nYEifJWJGx?_6DcTy>#uh%>!H9=hb^(v`=m3F1{L>db=<5_tm+_&knAQ2EU$s Mu9UqpbNZeC0BbUo^Z)<= diff --git a/ZitiUWPClient/Assets/StoreLogo.png b/ZitiUWPClient/Assets/StoreLogo.png deleted file mode 100644 index 7385b56c0e4d3c6b0efe3324aa1194157d837826..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1451 zcmaJ>eN5D57_Z|bH;{0+1#mbl)eTU3{h)Wf7EZV?;HD@XL@{B`Ui%(2aMxQ~xdXSv z5nzWi(LW)U2=Vc-cY@s7nPt{i0hc6!7xN4NNHI#EQl>YNBy8l4%x9gr_W-j zEZMQmmTIy(>;lblRfh`dIyTgc9W5d!VP$L4(kKrN1c5G~(O_#xG zAJCNTstD^5SeXFB+&$h=ToJP2H>xr$iqPs-#O*;4(!Fjw25-!gEb*)mU}=)J;Iu>w zxK(5XoD0wrPSKQ~rbL^Cw6O_03*l*}i=ydbu7adJ6y;%@tjFeXIXT+ms30pmbOP%Q zX}S;+LBh8Tea~TSkHzvX6$rYb)+n&{kSbIqh|c7hmlxmwSiq5iVhU#iEQ<>a18|O^Sln-8t&+t`*{qBWo5M?wFM(JuimAOb5!K#D}XbslM@#1ZVz_;!9U zpfEpLAOz=0g@bd6Xj_ILi-x^!M}73h^o@}hM$1jflTs|Yuj9AL@A3<-?MV4!^4q`e z)fO@A;{9K^?W?DbnesnPr6kK>$zaKo&;FhFd(GYFCIU^T+OIMb%Tqo+P%oq(IdX7S zf6+HLO?7o0m+p>~Tp5UrXWh!UH!wZ5kv!E`_w)PTpI(#Iw{AS`gH4^b(bm^ZCq^FZ zY9DD7bH}rq9mg88+KgA$Zp!iWncuU2n1AuIa@=sWvUR-s`Qb{R*kk(SPU^`$6BXz8 zn#7yaFOIK%qGxyi`dYtm#&qqox0$h=pNi#u=M8zUG@bpiZ=3sT=1}Trr}39cC)H|v zbL?W)=&s4zrh)7>L(|cc%$1#!zfL?HjpeP%T+x_a+jZ16b^iKOHxFEX$7d|8${H-* zIrOJ5w&i$>*D>AKaIoYg`;{L@jM((Kt?$N$5OnuPqVvq**Nm}(f0wwOF%iX_Pba;V z;m@wxX&NcV3?<1+u?A{y_DIj7#m3Af1rCE)o`D&Y3}0%7E;iX1yMDiS)sh0wKi!36 zL!Wmq?P^Ku&rK~HJd97KkLTRl>ScGFYZNlYytWnhmuu|)L&ND8_PmkayQb{HOY640 bno1(wj@u8DCVuFR|31B*4ek@pZJqxCDDe1x diff --git a/ZitiUWPClient/Assets/Wide310x150Logo.scale-200.png b/ZitiUWPClient/Assets/Wide310x150Logo.scale-200.png deleted file mode 100644 index 288995b397fdbef1fb7e85afd71445d5de1952c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3204 zcmbVPeQXow8NYmBd90>}0NP?GhXW~VaeThm=a0tV#EwJMI!)6M3}|c4_Bl3=Kd>G0 z(GHx1wl<7(tP?FsOQkTilSo*iIvF%uArExJ73~P zSv1xEy!U(Wd4A9D`FQV@W3@F^qJ@PEF$@z`Z!*BbFsS(^?B zyiAzJ+q})bkgiQHWqEb*jJD-coHYr1^iocg)l!Qa{Xqs-l~6J}p-|##ZHYofskQ3$ zI0;xzXyhazBeXhIsg5A=%ufo@f)1yy&ScKS0;HF^!r_2UE^lpZEom(+@duma3awTv zCrCL-%D_SvYWIcdHkmI}#50(fkUi)Qgx!80ju>g1za^}ff>JI8Z@^-iCiaCgg@TgF z+vtE?Q9{VQUX&MW9SYYmGcxA14%N2@7FwBTD4N<(2{nWgV8$e3?-F=L^&FrtWn~(U_Q~~^uYiyeY6-KoTnfh9AWz@ zIKje0)u!_Lw)E}G!#kEfwKVdNt(UAf9*f>tEL_(=xco-T%jTi@7YlC3hs2ik%Le0H ztj}RTeCF(5mwvi3_56>-yB?l;J>-1%!9~=fs|QcNG3J~a@JCu`4SB460s0ZO+##4fFUSGLcj_ja^fL4&BKALfb#$6$O?>P@qx2Agl^x0i&ugt zsy5Pyu=()`7HRMG3IB7F1@`_ z+-!J%#i6e^U$e#+C%Q>_qVRzWRsG^W_n+@OcX@vzI&z;mzHNb!GQ?LWA(wtpqHqTM z1OFw_{Zn?fD)p)`c`kOgv{de=v@suGRqY{N^U7gI1VF3*F=obwaXI6ob5__Yn zVTguS!%(NI09J8x#AO_aW!9W7k*UvB;IWDFC3srwftr{kHj%g)fvnAm;&h_dnl~

MY- zf+K}sCe8qU6Ujs`3ua{U0Of$R_gVQBuUA za0v=mu#vIOqiiAZOr&h*$WyOw&k-xr$;G4Ixa!#TJNr>95(h>l%)PUy4p+^SgR(uR zta%k*?ny-+nAr8spEk1fo{J4i!b^Fia`N{_F6@zidA2ZTTrjl#^5Z-2KfB@Cu}l9s z(*|Z2jc?p~vn2f)3y9i*7zJV1L{$?|&q)4oaT;uXi6>1GkRXVTOzAz(RHEmr=eFIi z`}<>-Q?K0GN8!IYxeP1XKXO+jsJbp~o^);Bc;%b7Flpe7;1`Ny@3r7ZR;?R)aJt8C ziNlEC<@3f_lIV4TwV}&e;D!Ee5_|e#g0LUh=5vmYWYm7&2h*M>QPKvGh9-)wfMMW3 z8J9b%1k7dzPzO0_NGQy92BZ^FR6R~6;^6?lqO;-QUP4BY%cG%3vEhbm#>4vIhPBh3 z-+pZGjh$x%Hp{?=FHsMp0&wNPlj00us{&`1ZOZTqs8%4X&xH=UDr*xyBW(Zp&Em94 zf)ZSfn#yg0N)>!1kWdkqJ^S*z0FF5|fj&qcE#Na|%OY0$uO>!&hP+1ywfD_WXk@4J(?MBftK7>$Nvqh@tDuarN%PrTLQ2Uzysx>UV=V zk^RrDSvdQ?0;=hY67EgII-f4`t=+i*yS=Y~!XlqIy_4x&%+OdfbKOFPXS2X5%4R{N z$SQMX^AK6(fA - - - - - - - - - - - - -