Set-DynamicIPDoHServer
0.1.4
💎 Use a DNS over HTTPS server that doesn't have a stable IP address, on Windows 11 💎
This module will automatically identify the correct and active network adapter/interface and set the Secure DNS settings for it based on parameters supplied by user.
That means it will detect the correct network adapter/interface even if you are using:
1. Windows built-in
💎 Use a DNS over HTTPS server that doesn't have a stable IP address, on Windows 11 💎
This module will automatically identify the correct and active network adapter/interface and set the Secure DNS settings for it based on parameters supplied by user.
That means it will detect the correct network adapter/interface even if you are using:
1. Windows built-in VPN connections (PPTP, L2TP, SSTP etc.)
2. OpenVPN
3. TUN/TAP virtual adapters (a lot of programs use them, including WireGuard)
4. Hyper-V virtual switches (Internal, Private, External, all at the same time)
5. Cloudflare WARP client
You can create a self-hosted DoH servers for free on Cloudflare or other providers, with custom domain name and dynamic IP addresses, which are hard or costly for ISPs, governments etc. to block
please refer to the GitHub repository of serverless-dns for more info: https://github.com/serverless-dns/serverless-dns
Example usage:
using module's alias: set-ddoh -DoHTemplate "https://example.com/" -DoHDomain "example.com"
using module's name: set-dynamicIPDoHServer -DoHTemplate "https://example.com/" -DoHDomain "example.com"
✅ Strong End-to-End encrypted workflow
✅ Created, targeted and tested on the latest version of Windows 11, on physical hardware and Virtual Machines
✅ Once you run this module for the first time and supply it with your DoH template and DoH domain, it will create a scheduled task that will run the module automatically based on 2 distinct criteria:
1) as soon as Windows detects the current DNS servers are unreachable
2) every 6 hours in order to check for new IP changes for the dynamic DoH server.
You can fine-tune the interval in Task Scheduler GUI if you like. I haven't had any downtimes in my tests because the module runs milliseconds after Windows detects DNS servers are unreachable, and even then, Windows still maintains the current active connections using the DNS cache. if your experience is different, please let me know on GitHub.
✅ the module and the scheduled task will use both IPv4s and IPv6s of the dynamic DoH server. the task will run whether or not any user is logged on.
✅ in order to make sure the module will always be able to acquire the IP addresses of the dynamic DoH server, even when the currently set IPv4s and IPv6s are outdated, the module performs DNS queries in this order:
1. First tries using Cloudflare's main encrypted API to get IP addresses of our DoH domain
2. if 1st one fails, tries using Cloudflare's secondary encrypted API to get IP addresses of our DoH domain
3. if 2nd one fails, tries using Google's main encrypted API to get IP addresses of our DoH domain
4. if 3rd one fails, tries using Google's secondary encrypted API to get IP addresses of our DoH domain
All of the connections to Cloudflare and Google servers use direct IP, are set to use TLS 1.3 with TLS_CHACHA20_POLY1305_SHA256 cipher suite and use HTTP/2
🛑 Make sure you have the latest stable PowerShell installed from GitHub before running this module: https://github.com/PowerShell/PowerShell/releases/latest
(Store installed version currently not supported, but soon will be)
🏴 I'm not the developer of Serverless-dns, however, since it's a great product and I personally use it, I decided to share this module so that Windows users can easily use it.
🔷 if you have any feedback about this module, please open a new issue or discussion on GitHub:
https://github.com/HotCakeX/Set-DynamicIPDoHServer
Minimum PowerShell version
7.3
Installation Options
Author(s)
HotCakeX
Copyright
(c)2023
Package Details
Owners
Tags
Security DNS Windows HTTPS DynamicIP DoH
Cmdlets
Functions
PSEditions
Dependencies
This module has no dependencies.
Release Notes
## Version
* 0.0.1 First release
* 0.0.2 added new parameter to ask user for DoH domain, also it can now choose the correct network adapter if both virtual VPN adapters and Hyper-V virtual switches are being used, all at the time time
* 0.0.3 added more details for the PowerShell Gallery's page
* 0.0.4 fixed some typos in PowerShell Gallery's description page
* 0.0.5 added an icon for the module
* 0.0.6 again fixed the PowerShell description text in PowerShell Gallery
* 0.0.7 modified the scheduled task trigger to run every 2 hours and added a 2nd trigger so the module will run the moment system detects DNS failure
* 0.0.8 fixed the typo in the line above, literally, improved PowerShell Gallery description, and set the scheduled task to end if it runs continiously longer than 1 minute
* 0.0.9 improved active network adapter detection logic to support Windows built-in VPN client connections, improved the description text and added new icon
* 0.1.0 Now when system DNS is unavailable, the module will use Encrypted Cloudflare API using TLS 1.3 and TLS_CHACHA20_POLY1305_SHA256 cipher suite, so everything is end-to-end encrypted. also made the system DNS query DNSSEC-aware.
* 0.1.1 Fixed a typo in the description of PowerShell gallery ¯\_(ツ)_/¯
* 0.1.2 Added a check to enable "TLS_CHACHA20_POLY1305_SHA256" if it's disabled (which is the default in Windows 11, at the moment), because cURL will need that cipher suite to perform encrypted DNS query, it uses Windows Schannel
* 0.1.3 Added Google encrypted API to the list of DNS query attempts. the scheduled task will now run every 6 hours instead of every 2 hours because the event-based trigger has proven to be very reliable (if you're already using the module, you can delete the scheduled task from Task Scheduler and run the module again with your DoH domain and template so that the new interval will be set or change it manually). changed some text colors to make them more readable and distinguishable.
* 0.1.4 Cleaned up all the empty lines, improved the functions and reduced repetitive codes
FileList
- Set-DynamicIPDoHServer.nuspec
- Set-DynamicIPDoHServer.psd1
- Set-DynamicIPDoHServer.psm1