openwrt-packages/utils/cache-domains
Gerard Ryan 6e8be5f42e cache-domains: added game cache DNS config service
Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2019-10-12 15:24:21 +08:00
..
files cache-domains: added game cache DNS config service 2019-10-12 15:24:21 +08:00
Makefile cache-domains: added game cache DNS config service 2019-10-12 15:24:21 +08:00
README.md cache-domains: added game cache DNS config service 2019-10-12 15:24:21 +08:00

README.md

cache-domains

Service to dynamically configure the local DNS (dnsmasq) to redirect game content servers to a LAN cache. Definitive list dynamically obtained from https://github.com/uklans/cache-domains.

Configuration

Configuration file follows the same syntax as the upsteam file. The key for each cache_domain member matches the name of one of the .txt files in the upstream root directory, except for the default key which matches the all the unreferenced .txt files. The value of each cache_domain member maps to one of the keys of the ips members, Thus mapping a cached domain to a list of IP addresses/LAN cache server.

{
	"ips": {
		"server1":	["10.10.3.10", "10.10.3.11"],
		"server2":	"10.10.3.12",
		"server3":	"10.10.3.13"
	},
	"cache_domains": {
		"default":	"server2",
		"blizzard":	"server1",
		"origin":	"server1",
		"steam":	"server1",
		"wsus":		"server3",
		"xboxlive":	"server3"
	}
}

Startup/Shutdown

On start the local DNS (dnsmasq) will be configured to redirect the configured cache domains and on stop the redirection will be removed.

Testing

With the above configuration set and the service running nslookup swcdn.apple.com would return 10.10.3.12