I am pretty sure that the answer is NO but I want to make sure before I go down another route.
We want to build a DNS service on CF Workers which will resolve a requested URL to a local IP address. Here is a simple example.
- The browser (client) requests the resolution of a URL. For example browser requests a DNS resolution of 192-168-1-105.mydomain.com.
- Assume that the DNS of the client/browser is configured to use the WebWorker DNS service as the DNS service
- The DNS request triggers the WebWorks which using basic JS will return the IP address of 192.168.1.105
The reason we want this is we want the client browser to see the local as a trusted destination and not issue that horrible security warning like Chrome browser does.
Is this possible using Workers?
Not possible since DNS works on UDP/TCP packets and Workers are HTTP & WebSocket only.
Why not just use the normal Cloudflare DNS? It can happily issue RFC 1918 addresses?
You can build DNS over HTTPS with a Worker.
Brilliant suggestion. I dont know why I didnt think of the most obvious solution.
So I guess it would be something like
- Server App registers with our server
- Our server will use the CF API to create a DNS entry for this device which resolves to a local IP address
- The browser client will request 192-168-1-105.mydomain.com and CF will resolve that to the local IP
I cant wait to try it. Thank you for the suggestion.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.