This repository contains a application written in Go that detects if a user is using UK DNS Privacy Project resolvers. The application handles both DNS requests and HTTP requests, storing records of IP addresses that interact with it and returns the results as json.
- Go 1.23 or later
- Docker (optional, for containerized deployment)
-
Clone the repository:
git clone https://github.com/UK-DNS-Privacy-Project/service-detection.git
-
Navigate to the project directory:
cd service-detection
-
Build the application:
go build -o service-detection
-
Start the DNS and HTTP servers:
./service-detection
-
The DNS server will start on port 53 and the HTTP server on port 8080.
ACME_CHALLENGE_DOMAIN
: The domain for ACME challenge DNS queries (i.e._acme-challenge.lookup.dnsprivacy.co.uk.
).ACME_CHALLENGE_DNS_1
: The first DNS server to forward ACME challenge queries to.ACME_CHALLENGE_DNS_2
: The second DNS server to forward ACME challenge queries to.DOMAIN
: The primary domain for DNS records (i.e.lookup.dnsprivacy.co.uk.
).SOA_ADMIN
: The admin email for SOA records (i.e.dnsadmin.dnsadmin.org.uk
).TARGET_NS
: The target nameserver for NS records (should point to this application).TARGET_IPV4
: The target IPv4 address for A records (should point to this application).TARGET_IPV6
: The target IPv6 address for AAAA records (should point to this application).
/json
: Returns stored IP addresses for the requested host in JSON format.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.