This change adds [LeftHook](https://lefthook.dev/) as a GitHub hook management tool alongside [MegaLinter](https://megalinter.io/) to lint all relevant files within the repository.
For users that don't end up installing LeftHook for pre-commit hooks, megalinter picks up the necessary formatting changes and reports them.
* feat: add lefthook, megalinter and update editorconfig
* fix: lint commit ordering
* refactor: adjust megalinter reporters
* refactor: adjust description for cache domains
* refactor: single - for passing options
* refactor: add repo-specific fmt in megalinter pre-commands too
The domain in question is already covered by a wildcard defined further in the list. In AdGuard Home this was causing said domain to have a round-robin DNS entry with the same IP twice.
* fix: explicitly specify ipv4 addresses
This change fixes the AdGuard Home generation script by disabling the return of ipv6 addresses. This would have been causing issues for users who are running dual stack with the addresses that accept both ipv4 and ipv6 traffic.
* fix: explicitly block returning on ipv6 queries
Add new test CDN
When a network is using lancache-dns individual service configuration can be tested using nslookup <service>.cache.lancache.net however if a network is using the generator configs these lancache domains don't exist. This PR adds a new test service for ease of memory for diagnostics
Add new test cdn for the use in testing and diagnostics. Assuming the test service is enabled test.cache.lancache.net and canary.uklans.net will respond with a lancache IP
Recently found epicgames using new cache domain to download content from Fastly CDN then looked for the IP and domain then found the committed domain.
[egdownload.fastly-edge.com] 103.14.145.249 / - - - [13/Jan/2025:03:43:56 +0600] "GET /Builds/Org/o-dhz7kpvrvqngzdpnx5vn3jrljj53ca/68d2cc08f9a94b8fb51af4f5cfa6d41b/default/ChunksV4/54/A22AC07FF687FF79_8BE04A9545854CE8C1BF05851D60D52D.chunk HTTP/1.1" 200 1048642 "-" "EpicGamesLauncher/17.2.1-38570976+++Portal+Release-Live Windows/10.0.26100.1.256.64bit" "MISS" "egdownload.fastly-edge.com" "-"
* Tell dnsmasq not to pass requests upstream
The behavior of dnsmasq changed in version 2.86 -- before then, if a record was set for a domain name with dnsmasq, and a record for a type not specified for that domain was requested, dnsmasq would indicate no data existed for that record type. After 2.86, record types that are not specified are instead passed upstream. The latter behavior causes problems for, e.g., the Steam client, which will disregard a correctly set A-record for lancache.steamcontent.com, if no AAAA is set with dnsmasq and dnsmasq passes the AAAA query upstream. The documentation for dnsmasq indicates the correct way to restore the old behavior is to use the local=/host/ syntax -- emit this syntax for each of our lancache-hosted DNS entries.
* Update scripts/create-dnsmasq.sh
Co-authored-by: Amir Zarrinkafsh <nightah@me.com>
---------
Co-authored-by: Amir Zarrinkafsh <nightah@me.com>
This change addresses some general housecleaning for CDN hosts:
* Removing all hosts that do not resolve
* Only including the Steam CDN trigger address
This change addresses some general housecleaning for CDN hosts:
* Removing all hosts that do not resolve
* Removing any rogue whitespaces in CDN `.txt` files
* Removing hirez CDN (as the only host could not be resolved)
* add script to generate bind response policy zone for dns manipulation/filtering
* rpz: support custom basedomain via cli arg
* Update create-rpz.sh
* changed times to match current lanacache_dns
[Dnsmasq version >= 2.86](https://thekelleys.org.uk/dnsmasq/CHANGELOG) supports passing multiple IP addresses via the `address=` syntax now.
>Major rewrite of the DNS server and domain handling code. The change makes multiple addresses associated with a domain work address=/example.com/1.2.3.4 address=/example.com/5.6.7.8.
This allows us to simplify the script and the `.hosts` file workaround is no longer necessary.