diff --git a/bsg.txt b/bsg.txt new file mode 100644 index 0000000..50eac29 --- /dev/null +++ b/bsg.txt @@ -0,0 +1,2 @@ +cdn-11.eft-store.com +cl-453343cd.gcdn.co diff --git a/cache_domains.json b/cache_domains.json index b94d749..9398b54 100644 --- a/cache_domains.json +++ b/cache_domains.json @@ -10,6 +10,11 @@ "description": "CDN for blizzard/battle.net", "domain_files": ["blizzard.txt"] }, + { + "name": "bsg", + "description": "CDN for Battle State Games, Tarkov", + "domain_files": ["bsg.txt"] + }, { "name": "cityofheroes", "description": "CDN for City of Heroes (Homecoming)", @@ -50,6 +55,18 @@ "description": "CDN for Nintendo consoles and download servers", "domain_files": ["nintendo.txt"] }, + { + "name": "origin", + "description": "CDN for origin", + "notes": "Should be enabled for HTTP traffic only or with a HTTPS proxy else origin client download fails", + "mixed_content": true, + "domain_files": ["origin.txt"] + }, + { + "name": "pathofexile", + "description": "CDN for Path Of Exile", + "domain_files": ["pathofexile.txt"] + }, { "name": "renegadex", "description": "CDN for Renegade X", @@ -70,6 +87,11 @@ "description": "CDN for sony / playstation", "domain_files": ["sony.txt"] }, + { + "name": "square", + "description": "CDN for Final Fantasy XIV", + "domain_files": ["square.txt"] + }, { "name": "steam", "description": "CDN for steam platform", diff --git a/cityofheroes.txt b/cityofheroes.txt index 9bbd47c..cc99ced 100644 --- a/cityofheroes.txt +++ b/cityofheroes.txt @@ -1 +1,2 @@ cdn.homecomingservers.com +nsa.tools diff --git a/epicgames.txt b/epicgames.txt index 9c5b10f..a3c6477 100644 --- a/epicgames.txt +++ b/epicgames.txt @@ -1,5 +1,10 @@ -epicgames-download1.akamaized.net +cdn1.epicgames.com +cdn.unrealengine.com +cdn1.unrealengine.com +cdn2.unrealengine.com +cdn3.unrealengine.com download.epicgames.com download2.epicgames.com download3.epicgames.com download4.epicgames.com +epicgames-download1.akamaized.net diff --git a/origin.txt b/origin.txt new file mode 100644 index 0000000..bd223ad --- /dev/null +++ b/origin.txt @@ -0,0 +1,3 @@ +# WARNING: Origin has been seen downloading https client downloads on origin-a.akamaihd.net. A solution should be in place to forward https to the origin server (eg sniproxy) +origin-a.akamaihd.net +lvlt.cdn.ea.com diff --git a/pathofexile.txt b/pathofexile.txt new file mode 100644 index 0000000..10c5217 --- /dev/null +++ b/pathofexile.txt @@ -0,0 +1 @@ +patchcdn.pathofexile.com diff --git a/renegadex.txt b/renegadex.txt index ca35def..a40505c 100644 --- a/renegadex.txt +++ b/renegadex.txt @@ -1,12 +1,5 @@ -rxp-fl.cncirc.net -rxp-chi.cncirc.net -rxp-nz.cncirc.net -rxp-bgr.cncirc.net -rxp-fr.cncirc.net -rxp-nyc.cncirc.net -rxp-uk.cncirc.net -rxp-sg.cncirc.net -rxp-la.cncirc.net -rxp-fin.cncirc.net -denver1.renegade-x.com -seattle1.renegade-x.com +rxp-lv.cncirc.net +cronub.fairplayinc.uk +amirror.tyrant.gg +mirror.usa.tyrant.gg +renx.b-cdn.net diff --git a/scripts/create-dnsmasq.sh b/scripts/create-dnsmasq.sh index 84fddf8..559fd59 100755 --- a/scripts/create-dnsmasq.sh +++ b/scripts/create-dnsmasq.sh @@ -27,6 +27,7 @@ done <<< $(jq -r '.cache_domains | to_entries[] | .key' config.json) rm -rf ${outputdir} mkdir -p ${outputdir} +touch ${outputdir}/lancache.conf while read -r entry; do unset cacheip unset cachename @@ -42,9 +43,26 @@ while read -r entry; do cacheip=$(jq -r 'if type == "array" then .[] else . end' <<< ${!cacheipname} | xargs) while read -r fileid; do while read -r filename; do - destfilename=$(echo $filename | sed -e 's/txt/conf/') + destfilename=$(echo $filename | sed -e 's/txt/hosts/') + lancacheconf=${outputdir}/lancache.conf outputfile=${outputdir}/${destfilename} + echo "addn-hosts=/etc/dnsmasq.d/${destfilename}" >> ${lancacheconf} touch "$outputfile" + # Wildcard entries + while read -r fileentry; do + # Ignore comments + if [[ $fileentry == \#* ]]; then + continue + fi + wildcard=$(echo $fileentry | grep "*." | sed -e "s/^\*\.//") + if grep -q "$wildcard" "$lancacheconf"; then + continue + fi + for i in ${cacheip}; do + echo "address=/${wildcard}/${i}" >> "$lancacheconf" + done + done <<< $(cat ${basedir}/$filename); + # All other entries while read -r fileentry; do # Ignore comments if [[ $fileentry == \#* ]]; then @@ -55,7 +73,7 @@ while read -r entry; do continue fi for i in ${cacheip}; do - echo "address=/${parsed}/${i}" >> "$outputfile" + echo "${i} ${parsed}" >> "$outputfile" done done <<< $(cat ${basedir}/$filename); done <<< $(jq -r ".cache_domains[$entry].domain_files[$fileid]" $path) diff --git a/sony.txt b/sony.txt index 4776937..928d0b6 100644 --- a/sony.txt +++ b/sony.txt @@ -1,3 +1,2 @@ -pls.patch.station.sony.com gs2.ww.prod.dl.playstation.net gs2.sonycoment.loris-e.llnwd.net diff --git a/square.txt b/square.txt new file mode 100644 index 0000000..0cf5e15 --- /dev/null +++ b/square.txt @@ -0,0 +1 @@ +patch-dl.ffxiv.com diff --git a/steam.txt b/steam.txt index b21270f..b80a4c5 100644 --- a/steam.txt +++ b/steam.txt @@ -1 +1,2 @@ lancache.steamcontent.com + diff --git a/twitch.txt b/twitch.txt index 8f18078..e69de29 100644 --- a/twitch.txt +++ b/twitch.txt @@ -1,4 +0,0 @@ -d3rmjivj4k4f0t.cloudfront.net -addons.forgesvc.net -media.forgecdn.net -files.forgecdn.net diff --git a/windowsupdates.txt b/windowsupdates.txt index 51e49ea..395b68d 100644 --- a/windowsupdates.txt +++ b/windowsupdates.txt @@ -1,4 +1,3 @@ -officecdn.microsoft.com *.windowsupdate.com windowsupdate.com *.dl.delivery.mp.microsoft.com diff --git a/xboxlive.txt b/xboxlive.txt index 1fb90dd..fa1af13 100644 --- a/xboxlive.txt +++ b/xboxlive.txt @@ -6,3 +6,6 @@ xboxone.loris.llnwd.net xboxone.vo.llnwd.net xbox-mbr.xboxlive.com assets1.xboxlive.com.nsatc.net +xvcf1.xboxlive.com +d1.xboxlive.com +