Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Acrylic Proxy DNS Setup

Posted on October 16, 2015October 16, 2015 By David Kittell

While still configuring my changes to Raspberry Pi Setup Proxy Server this works on an individual computer.

NOTE: I have this setup mainly for the Wi-Fi, if you want it for wired connections you will need to change Wi-Fi to “Ethernet” or “Ethernet 2”

Step 1: Download and Setup Acrylic

clear

# URL Parameter
$WebURL = "http://www.kittell.net/downloads/Acrylic.exe"

# Directory Parameter
$FileDirectory = "$($env:USERPROFILE)$("\downloads\")"

# If directory doesn't exist create the directory
if((Test-Path $FileDirectory) -eq 0)
    {
        mkdir $FileDirectory;
        cd $FileDirectory;
    }

# We assume the file you download is named what you want it to be on your computer
$FileName = [System.IO.Path]::GetFileName($WebURL)

# Concatenate the two values to prepare the download
$FullFilePath = "$($FileDirectory)$($FileName)"

# Give a basic message to the user to let them know what we are doing
Write-Host "Downloading '$WebURL' to '$FullFilePath'"

    $uri = New-Object "System.Uri" "$WebURL" 
    $request = [System.Net.HttpWebRequest]::Create($uri) 
    $request.set_Timeout(15000) #15 second timeout 
    $response = $request.GetResponse() 
    $totalLength = [System.Math]::Floor($response.get_ContentLength()/1024) 
    $responseStream = $response.GetResponseStream() 
    $targetStream = New-Object -TypeName System.IO.FileStream -ArgumentList $FullFilePath, Create 
    $buffer = new-object byte[] 10KB 
    $count = $responseStream.Read($buffer,0,$buffer.length) 
    $downloadedBytes = $count 
    while ($count -gt 0) 
    {         
        [System.Console]::Write("`r`nDownloaded {0}K of {1}K", [System.Math]::Floor($downloadedBytes/1024), $totalLength) 
        $targetStream.Write($buffer, 0, $count) 
        $count = $responseStream.Read($buffer,0,$buffer.length) 
        $downloadedBytes = $downloadedBytes + $count 
    } 
  
    $targetStream.Flush()
    $targetStream.Close() 
    $targetStream.Dispose() 
    $responseStream.Dispose() 


# Give a basic message to the user to let them know we are done
Write-Host "`r`nDownload complete"

start-process $FullFilePath -wait

cat 'C:\Program Files (x86)\Acrylic DNS Proxy\AcrylicConfiguration.ini' | %{$_ -replace "PrimaryServerAddress=8.8.8.8","PrimaryServerAddress=208.67.222.123"}
cat 'C:\Program Files (x86)\Acrylic DNS Proxy\AcrylicConfiguration.ini' | %{$_ -replace "SecondaryServerAddress=8.8.4.4","SecondaryServerAddress=208.67.220.123"}

ipconfig /flushdns

& "C:\Program Files (x86)\Acrylic DNS Proxy\AcrylicController.exe" PurgeAcrylicCacheDataSilently

Set-DNSClientServerAddress –interfaceAlias Wi-Fi –ServerAddresses ("127.0.0.1")
Get-DnsClientServerAddress -InterfaceAlias Wi-Fi

Acrylic was created and is maintained at http://mayakron.altervista.org, made available to anyone under the GNU General Public License

All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code PowerShell

Post navigation

Previous post
Next post

Related Posts

Count/Limit characters in a textbox using Javascript

Posted on July 15, 2013October 26, 2015

<html> <head> <script type="text/javascript" src="/js/jquery-1.9.1.js"></script> <script type="text/javascript" src="/js/jquery.limit2.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#text").limita({ limit: 100, id_result: "counter", alertClass: "alert" }); }); </script> </head> <body> <form id="input_form" method="POST" action="?"> <textarea id="text" rows="4" cols="49"></textarea> <input type="submit" value="submit"> </form> <div id="counter"></div> </body> </html> (function($){ $.fn.limita = function(options) { var defaults = { limit:…

Read More

Mac OS X – Remove Users In Terminal/SSH

Posted on February 19, 2016March 30, 2016

Recently I had to remove users from a Mac that was on a network only with SSH available. In this document I use the user name “administrator” as the account that I do the work in and would like to keep, your user name may be different. First we need…

Read More

Bash – Mass NSlookup

Posted on July 19, 2018

When you are moving from one server public IP to another you could use some help knowing things are changed. This bash script will do an NSLookup on various DNS servers. #!/bin/sh # Digkittell.net.sh # # # Created by David Kittell on 1/6/18. # netDomain="kittell.net" dnsServerList="68.94.156.132|10.40.20.1|8.8.8.8|192.168.10.21|192.168.10.20|10.40.20.6|208.67.220.220|9.9.9.9|209.18.47.61|4.2.2.2|168.63.129.16|172.26.38.1" clear echo "AT&T DNS…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • PowerShell - IIS Remove Site
  • Front Page
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • PowerShell - IIS Remove Site
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories
  • Raspberry Pi - Remove Default Apps
  • PowerShell - Change Windows CD/DVD Drive Letter
©2025 David Kittell | WordPress Theme by SuperbThemes