You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.3 KiB

  1. # cache-domains
  2. 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.
  3. ## Configuration
  4. Configuration file follows the same [syntax as the upsteam file](https://github.com/uklans/cache-domains/blob/master/scripts/config.example.json). The key for each `cache_domain` member matches the name of one of the `.txt` files in the [upstream root directory](https://github.com/uklans/cache-domains/blob/master/), 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.
  5. ```json
  6. {
  7. "ips": {
  8. "server1": ["10.10.3.10", "10.10.3.11"],
  9. "server2": "10.10.3.12",
  10. "server3": "10.10.3.13"
  11. },
  12. "cache_domains": {
  13. "default": "server2",
  14. "blizzard": "server1",
  15. "origin": "server1",
  16. "steam": "server1",
  17. "wsus": "server3",
  18. "xboxlive": "server3"
  19. }
  20. }
  21. ```
  22. ## Startup/Shutdown
  23. On start the local DNS (dnsmasq) will be configured to redirect the configured cache domains and on stop the redirection will be removed.
  24. ## Testing
  25. With the above configuration set and the service running `nslookup swcdn.apple.com` would return `10.10.3.12`