Downloads:

1,270

Downloads of v 1.6.5781.1:

967

Last Update:

22 Oct 2016

Package Maintainer(s):

Software Author(s):

  • Stackie Jia

Tags:

dnsagent dns dnsmasq windows admin

DNSAgent

1.6.5781.1 | Updated: 22 Oct 2016

Downloads:

1,270

Downloads of v 1.6.5781.1:

967

Maintainer(s):

Software Author(s):

  • Stackie Jia

DNSAgent 1.6.5781.1

All Checks are Passing

2 Passing Test


Validation Testing Passed


Verification Testing Passed

Details

To install DNSAgent, run the following command from the command line or from PowerShell:

>

To upgrade DNSAgent, run the following command from the command line or from PowerShell:

>

To uninstall DNSAgent, run the following command from the command line or from PowerShell:

>

NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://chocolatey.org/api/v2. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to https://chocolatey.org/api/v2)

4. Choose your deployment method:


choco upgrade dnsagent -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade dnsagent -y --source="'STEP 3 URL'"
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Ensure dnsagent installed
  win_chocolatey:
    name: dnsagent
    state: present
    version: 1.6.5781.1
    source: STEP 3 URL

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.

Coming early 2020! Central Managment Reporting available now! More information...


chocolatey_package 'dnsagent' do
  action    :install
  version  '1.6.5781.1'
  source   'STEP 3 URL'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


Chocolatey::Ensure-Package
(
    Name: dnsagent,
    Version: 1.6.5781.1,
    Source: STEP 3 URL
);

Requires Otter Chocolatey Extension. See docs at https://inedo.com/den/otter/chocolatey.


cChocoPackageInstaller dnsagent
{
   Name     = 'dnsagent'
   Ensure   = 'Present'
   Version  = '1.6.5781.1'
   Source   = 'STEP 3 URL'
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'dnsagent':
  provider => 'chocolatey',
  ensure   => '1.6.5781.1',
  source   => 'STEP 3 URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


salt '*' chocolatey.install dnsagent version="1.6.5781.1" source="STEP 3 URL"

See docs at https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.chocolatey.html.

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package was approved by moderator gep13 on 27 Oct 2016.

Description

A powerful "hosts" replacement.

Features

  • Use regular expression to match the domain name.
  • Both IPv4 and IPv6 are supported.
  • Support non-standard listening port (ports other than 53).
  • It's possible to use DNSPod HttpDNS protocal to query for A record.
  • Return a immediate address (A/AAAA record) or redirect query to a custom name server on pattern matched.
  • Redirect one domain name to another, support regular expression matching and replacing.
  • Local cache with custom TTL settings.
  • Support source IP whitelist to filter unauthorized clients.
  • Support compression pointer mutation when querying another name server. This may avoid MITM attack in some network environments.

This package installs to $env:ChocolateyInstall\dnsagent and will add and start the service 'dnsagent'.

Tested on Windows Server 2012 R2


tools\ARSoft.Tools.Net.dll
md5: 7E15633D6FE74447915E37B3818ED1F8 | sha1: 30A31B401299697D78D4EF17363A642167205376 | sha256: 1A4EE0871E2BF3B37D7E18A3D7AC0636ED5CF3D70FE4E69D379342F7B3E2D36C | sha512: A3E96B047B2CDF2CDCA4D5F1325293DE05600187C81C817023FB96E5E0904F6C6B786DAD5E20C5E6DB3BE5E77A4A90CFA2C248D95650811C2CA02F8197640C06
tools\chocolateyBeforeModify.ps1
$ErrorActionPreference = 'Stop';

$packageName = 'dnsagent'
$serviceName = 'DNSAgent'

$dnsAgentSvc = Get-Service "$serviceName" -ErrorAction SilentlyContinue
if ($dnsAgentSvc) {
   
    if ($dnsAgentSvc.Status -ne 'Stopped') {
        Write-Verbose "Stopping service to allow backups."
        $dnsAgentSvc.Stop()
        Write-Verbose "Waiting for service to stop."
        $dnsAgentSvc.WaitForStatus('Stopped', '00:01:00')   
        Write-Verbose "Service successfully stopped." 
    }
    else {
        Write-Verbose "The $serviceName service is already stopped."
    }
}
tools\chocolateyinstall.ps1
$ErrorActionPreference = 'Stop';

$packageName = 'dnsagent'
$serviceName = 'DNSAgent'

$packageDir = "$Env:ChocolateyInstall\lib\$packageName"
$installDir = "$packageDir\tools"
$tempDir = "$Env:TEMP\$packageName"

$executablePath = Join-Path $installDir 'DNSAgent.exe'

function Install {
    Write-Verbose 'Installing DNSAgent package - using native installer'
    Install-ChocolateyInstallPackage -PackageName $packageName -FileType 'EXE' -SilentArgs '--install' -File $executablePath

    Write-Verbose 'Checking if the service has been correctly created by the native installer'
    $svc = Get-Service $serviceName -ErrorAction SilentlyContinue
    if (!$svc) {
        Write-Verbose 'DNSAgent service was not correctly - this happens over WinRM, creating service manually (with the same details as the native installer)'
        New-Service -Name $serviceName -BinaryPathName "$executablePath" -StartupType Automatic -Description 'A powerful "hosts" replacement.'
    }
}

$dnsAgentSvc = Get-Service $serviceName -ErrorAction SilentlyContinue
if ($dnsAgentSvc) {
    Write-Verbose 'DNSAgent service exists - must be an upgrade.'
    Write-Verbose 'Backing up existing config files.'
    md -Path $tempDir -Force | Out-Null
    cp -Path "$installDir\*.cfg" -Destination $tempDir

    Write-Verbose 'Uninstalling package.'
    Install-ChocolateyInstallPackage -PackageName $packageName -FileType 'EXE' -SilentArgs '--uninstall' -File $executablePath

    Install

    Write-Verbose 'Waiting for service to start.'
    $dnsAgentSvc.WaitForStatus('Running', '00:01:00')
    Write-Verbose 'Stopping service.'
    $dnsAgentSvc.Stop()
    Write-Verbose 'Waiting for service to stop.'
    $dnsAgentSvc.WaitForStatus('Stopped', '00:01:00')

    Write-Verbose 'Replacing configuration files with the the previous versions.'
    cp -Path "$tempDir\*.cfg" -Destination $installDir -Force

    if (Test-Path $tempDir) { 
        Write-Verbose 'Removing temporary directory.'
        rm $tempDir -Force -Recurse 
    }

    Write-Verbose 'Starting service.'
    $dnsAgentSvc.Start()

    Write-Verbose 'Waiting for service to start.'
    $dnsAgentSvc.WaitForStatus('Running', '00:01:00')
}
else
{   
    Install
}
tools\chocolateyuninstall.ps1
$ErrorActionPreference = 'Stop';

$packageName = 'dnsagent'
$serviceName = 'DNSAgent'

$packageDir = "$Env:ChocolateyInstall\lib\$packageName"
$installDir = "$packageDir\tools"

$executablePath = Join-Path $installDir 'DNSAgent.exe'

Write-Verbose "Uninstalling DNSAgent ($executablePath)"
Install-ChocolateyInstallPackage -PackageName $packageName -FileType 'EXE' -SilentArgs '--uninstall' -File $executablePath

if (Test-Path $installDir) { 
    Write-Verbose "Removing install directory."
    rm $installDir -Force -Recurse 
}
tools\DNSAgent.exe
md5: DECA2FCA15310FF476466DBBB5EA6C0C | sha1: C2050A46508E86B8450392A9DD385B5855897739 | sha256: 995F514BFD15F7CFE87AC845C02A5416DC223D1834768281CF61C5FA50878597 | sha512: ADDEBEE936B6A862614A5731CF7A33D782F3CBEE7F34697D579B4F628423BF649438AC573CB9CC1031677135F62EF02763CBB47748997C11282DBA0CA8AF577E
tools\DNSAgent.exe.ignore
 
tools\LICENSE.txt
The MIT License (MIT)

Copyright (c) 2015 Stackie Jia

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
tools\Newtonsoft.Json.dll
md5: 95E24268172C8908F5B2C906B90A92A7 | sha1: F065844930EED36F993E9F0C7533E404ACF6BB9F | sha256: 9ECA2C5ED187B5E1319C359AABF8382992131EFE1854B899C23A93FE227496E3 | sha512: E45F320D6EF4B093DEB99C39736013E9F25C29CE25FBEF0BCEA7D7353F7B0BA46E54E00F970103A036C0FF3EDEFD288532F2B08323D5EC1963F25534B1C975B7
tools\options.cfg
 
tools\rules.cfg
 
tools\VERIFICATION.txt
Verification is intended to assist the Chocolatey moderators and community
in verifying that this package's contents are trustworthy.

1) Download binary from https://github.com/stackia/DNSAgent/releases/download/v1.6.5781/DNSAgent-1.6.5781.zip
2) Extract zip and compare checksums for the following group of files:

ARSoft.Tools.Net.dll
DNSAgent.exe
Newtonsoft.Json.dll
options.cfg
rules.cfg

The batch scripts were omitted from this package as they just prompt for elevation if required.

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Version Downloads Last Updated Status
DNSAgent 1.6.5781 303 Monday, June 27, 2016 Approved

This package has no dependencies.

Discussion for the DNSAgent Package

Ground Rules:

  • This discussion is only about DNSAgent and the DNSAgent package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or DNSAgent, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus