forked from ghuntley/Heijden.Dns
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
93 changed files
with
1,290 additions
and
1,328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,39 @@ | ||
image: Visual Studio 2017 | ||
skip_tags: true | ||
|
||
branches: | ||
except: | ||
- gh-pages | ||
|
||
install: | ||
- choco install gitversion.portable -pre -y | ||
|
||
before_build: | ||
- cmd: dotnet restore | ||
- ps: gitversion /l console /output buildserver /updateAssemblyInfo | ||
|
||
build_script: | ||
- cmd: PowerShell -Version 2.0 .\build.ps1 | ||
|
||
artifacts: | ||
- path: 'src\**\*.nupkg' | ||
|
||
deploy: | ||
release: Ubiety.Dns.Core-v$(appveyor_build_version) | ||
description: Ubiety DNS for .NET Standard | ||
provider: GitHub | ||
auth_token: | ||
secure: +fxguAe7QHo5zfhN7YRoOqMf4x8ZG4mR29Q8HMY0Y9d4gvwv+NP5daWbQyc0R/BJ | ||
artifact: /.*\.nupkg/ | ||
draft: true | ||
prerelease: false | ||
on: | ||
branch: master | ||
appveyor_repo_tag: false | ||
- provider: GitHub | ||
release: Ubiety.Dns.Core-v$(appveyor_build_version) | ||
description: Ubiety DNS for .NET Standard | ||
auth_token: | ||
secure: +fxguAe7QHo5zfhN7YRoOqMf4x8ZG4mR29Q8HMY0Y9d4gvwv+NP5daWbQyc0R/BJ | ||
artifact: /.*\.nupkg/ | ||
draft: true | ||
prerelease: false | ||
on: | ||
branch: master | ||
|
||
- provider: GitHub | ||
release: Ubiety.Dns.Core.beta-v$(appveyor_build_version) | ||
description: Ubiety DNS Beta | ||
auth_token: | ||
secure: +fxguAe7QHo5zfhN7YRoOqMf4x8ZG4mR29Q8HMY0Y9d4gvwv+NP5daWbQyc0R/BJ | ||
artifact: /.*\.nupkg/ | ||
draft: true | ||
prerelease: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
<IsPackable>False</IsPackable> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Ubiety.Dns.Core\Ubiety.Dns.Core.csproj" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Ubiety.Dns.Core; | ||
using Ubiety.Dns.Core.Common; | ||
|
||
namespace Dns.Sample | ||
{ | ||
public class DnsTest | ||
{ | ||
private readonly Resolver _resolver; | ||
|
||
public DnsTest() | ||
{ | ||
_resolver = new Resolver() | ||
{ | ||
Recursion = true, | ||
UseCache = true, | ||
Timeout = 1000, | ||
Retries = 3, | ||
TransportType = TransportType.Tcp, | ||
DnsServer = "8.8.8.8" | ||
}; | ||
} | ||
|
||
public IList<string> CertRecords(string name) | ||
{ | ||
IList<string> records = new List<string>(); | ||
|
||
const QuestionType questionType = QuestionType.CERT; | ||
const QuestionClass questionClass = QuestionClass.IN; | ||
|
||
var response = _resolver.Query(name, questionType, questionClass); | ||
|
||
foreach (var record in response.RecordCert) | ||
{ | ||
records.Add(record.ToString()); | ||
} | ||
|
||
return records; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
|
||
namespace Dns.Sample | ||
{ | ||
internal static class Program | ||
{ | ||
private static void Main(string[] args) | ||
{ | ||
var test = new DnsTest(); | ||
|
||
Console.WriteLine("CERT records for: direct.sitenv.org"); | ||
foreach (var record in test.CertRecords("direct.sitenv.org")) | ||
{ | ||
Console.WriteLine(record); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,4 @@ public AdditionalRR(RecordReader br) | |
{ | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,4 @@ public AnswerRR(RecordReader br) | |
{ | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,4 @@ public AuthorityRR(RecordReader br) | |
{ | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,6 @@ public enum OperationCode | |
/// <summary> | ||
/// Reserved | ||
/// </summary> | ||
RESERVED15 = 15, | ||
RESERVED15 = 15 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
using System; | ||
|
||
namespace Ubiety.Dns.Core.Common | ||
{ | ||
/// <summary> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
using System; | ||
|
||
namespace Ubiety.Dns.Core.Common | ||
{ | ||
/// <summary> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.