mirror of
				https://github.com/uklans/cache-domains
				synced 2025-11-04 03:28:51 +01:00 
			
		
		
		
	
				* Update scripts and add combined_output flag * Add editorconfig to enforcing formatting requirements * Adjust generic references to monolithic  | 
			||
|---|---|---|
| .. | ||
| config.example.json | ||
| create-adguardhome.sh | ||
| create-dnsmasq.sh | ||
| create-rpz.sh | ||
| create-squid.sh | ||
| create-unbound.sh | ||
| README.md | ||
DNS Generation Scripts
Introduction
The respective shell scripts contained within this directory can be utilised to generate application specific compliant configuration which can be utilised with:
- AdGuard Home
 - BIND9
 - Dnsmasq/Pi-hole
 - Squid
 - Unbound
 
Usage
- Copy 
config.example.jsontoconfig.json. - Modify 
config.jsonto include your Cacheserver's IP(s) and the CDNs you plan to cache. 
The following example assumes a single shared Cacheserver IP:
{
    "combined_output": false,
    "ips": {
        "monolithic":   ["10.10.10.200"]
    },
    "cache_domains": {
        "blizzard":     "monolithic",
        "epicgames":    "monolithic",
        "nintendo":     "monolithic",
        "origin":       "monolithic",
        "riot":         "monolithic",
        "sony":         "monolithic",
        "steam":        "monolithic",
        "uplay":        "monolithic",
        "wsus":         "monolithic"
    }
}
- Run generation script relative to your DNS implementation: 
bash create-dnsmasq.sh. - If 
combined_outputis set totruethis will result in a single output file:lancache.confwith all your enabled services (applies to Adguard Home, Dnsmasq or Unbound). - Copy files from 
output/{adguardhome,dnsmasq,rpz,squid,unbound}/*to the respective locations for Dnsmasq/Unbound. - Restart the appropriate service.
 
Notes for Dnsmasq users
This also applies to users utilising the script alongside Pi-hole.
Multi-IP Lancache setups are only supported with Dnsmasq or Pi-hole versions >= 2.86 or 2021.09 respectively.
Notes for AdGuard Home users
- Utilising 
"combined_output": trueis more convenient. - Once you have run the script and uploaded the file to the appropriate location, you should navigate to Adguard Home -> Filters -> DNS blocklists -> Add blocklist -> Add a custom list.