mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
cache-domains: Fixed upstream changes + wolfssl
* The upstream script changed to use `.hosts` files from `.conf` files, so changes were required to make dnsmasq use the new file format. * Added a default wolfssl variant. Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
hotplug script 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](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.
|
||||
The configuration file (`/etc/cache-domains.json`) 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_domains` 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_domains` 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.
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -13,10 +13,10 @@ Configuration file follows the same [syntax as the upsteam file](https://github.
|
||||
"server3": "10.10.3.13"
|
||||
},
|
||||
"cache_domains": {
|
||||
"default": "server2",
|
||||
"default": "server1",
|
||||
"blizzard": "server1",
|
||||
"origin": "server1",
|
||||
"steam": "server1",
|
||||
"steam": "server2",
|
||||
"wsus": "server3",
|
||||
"xboxlive": "server3"
|
||||
}
|
||||
@@ -27,4 +27,4 @@ Configuration file follows the same [syntax as the upsteam file](https://github.
|
||||
`/usr/bin/cache-domains configure` will configure the local DNS (dnsmasq) to redirect the configured cache domains. `/usr/bin/cache-domains cleanup` will cleanup redirection. The hotplug script calls `/usr/bin/cache-domains configure` when the WAN interface is brought up.
|
||||
|
||||
## Testing
|
||||
With the above configuration set and the service running `nslookup swcdn.apple.com` would return `10.10.3.12`
|
||||
After configuring with the above example configuration, running `nslookup lancache.steamcontent.com` would return `10.10.3.12`
|
||||
|
||||
Reference in New Issue
Block a user