LANcache (Steam, Riot, others nginx proxy)

For those that might run RouterBoard-powered LAN parties, I thought I would share my Routerboard DNS setup for using LANcache to cache Steam and Riot since it took me a bit of trial and error to figure out:

add address=192.168.100.30 name="lancache-steam" ttl=3600s comment="LANcache Steam Proxy/Cache"
add address=192.168.100.30 name="cs.steampowered.com" ttl=3600s comment="LANcache Steam Proxy/Cache"
add address=192.168.100.30 name=".*.cs.steampowered.com\$" ttl=3600s comment="LANcache Steam Proxy/Cache"
add address=192.168.100.30 name="content1.steampowered.com" ttl=3600s comment="LANcache Steam Proxy/Cache"
add address=192.168.100.30 name="content2.steampowered.com" ttl=3600s comment="LANcache Steam Proxy/Cache"
add address=192.168.100.30 name="content3.steampowered.com" ttl=3600s comment="LANcache Steam Proxy/Cache"
add address=192.168.100.30 name="content4.steampowered.com" ttl=3600s comment="LANcache Steam Proxy/Cache"
add address=192.168.100.30 name="content5.steampowered.com" ttl=3600s comment="LANcache Steam Proxy/Cache"
add address=192.168.100.30 name="content6.steampowered.com" ttl=3600s comment="LANcache Steam Proxy/Cache"
add address=192.168.100.30 name="content7.steampowered.com" ttl=3600s comment="LANcache Steam Proxy/Cache"
add address=192.168.100.30 name="content8.steampowered.com" ttl=3600s comment="LANcache Steam Proxy/Cache"
add address=192.168.100.30 name=".*.hsar.steampowered.com.edgesuite.net\$" ttl=3600s comment="LANcache Steam Proxy/Cache"
add address=192.168.100.30 name="clientconfig.akamai.steamstatic.com" ttl=3600s comment="LANcache Steam Proxy/Cache"

add address=192.168.100.31 name="lancache-riot" ttl=3600s comment="LANcache Riot Proxy/Cache"
add address=192.168.100.31 name="l3cdn.riotgames.com" ttl=3600s comment="LANcache Riot Proxy/Cache"

The actual proxy is running off a Linux server with a setup similar to what LANcache configures.

I stumbled upon this today trying to do the same thing but this is now out of date. Taking the domains listed here for steam and changing the wildcards to regex I managed to get it working (this is for Steam only).


/ip dns static
add address=YOUR_IP_ADDRESS comment="LANcache Steam Proxy/Cache" name=\
    lancache-steam
add address=YOUR_IP_ADDRESS name=update1.csgo.wmsj.cn
add address=YOUR_IP_ADDRESS name=update2.csgo.wmsj.cn
add address=YOUR_IP_ADDRESS name=update3.csgo.wmsj.cn
add address=YOUR_IP_ADDRESS name=update4.csgo.wmsj.cn
add address=YOUR_IP_ADDRESS name=update5.csgo.wmsj.cn
add address=YOUR_IP_ADDRESS name=update6.csgo.wmsj.cn
add address=YOUR_IP_ADDRESS name=update1.dota2.wmsj.cn
add address=YOUR_IP_ADDRESS name=update2.dota2.wmsj.cn
add address=YOUR_IP_ADDRESS name=update3.dota2.wmsj.cn
add address=YOUR_IP_ADDRESS name=update4.dota2.wmsj.cn
add address=YOUR_IP_ADDRESS name=update5.dota2.wmsj.cn
add address=YOUR_IP_ADDRESS name=update6.dota2.wmsj.cn
add address=YOUR_IP_ADDRESS name=cdn1-sea1.valve.net
add address=YOUR_IP_ADDRESS name=cdn2-sea1.valve.net
add address=YOUR_IP_ADDRESS name=edge.steam-dns.top.comcast.net
add address=YOUR_IP_ADDRESS name=edge.steam-dns-2.top.comcast.net
add address=YOUR_IP_ADDRESS name=steampipe.akamaized.net
add address=YOUR_IP_ADDRESS name=steampipe-kr.akamaized.net
add address=YOUR_IP_ADDRESS name=steam.cdn.on.net
add address=YOUR_IP_ADDRESS name=steam.eca.qtlglb.com
add address=YOUR_IP_ADDRESS name=steam.ix.asn.au
add address=YOUR_IP_ADDRESS name=st.dl.bscstorage.net
add address=YOUR_IP_ADDRESS name=steam.naeu.qtlglb.com
add address=YOUR_IP_ADDRESS name=steam.apac.qtlglb.com
add address=YOUR_IP_ADDRESS name=steam.apac.qtlglb.com.mwcloudcdn.com
add address=YOUR_IP_ADDRESS name=clientconfig.akamai.steamtransparent.com
add address=YOUR_IP_ADDRESS name=cdn.mileweb.cs.steampowered.com.8686c.com
add address=YOUR_IP_ADDRESS regexp="^(.*\\.)\?steampowered\\.com\$"
add address=YOUR_IP_ADDRESS regexp=\
    "^(.*\\.)\?hsar\\.steampowered\\.com\\.edgesuite\\.net\$"
add address=YOUR_IP_ADDRESS regexp="^(.*\\.)\?steamcontent\\.com\$"
add address=YOUR_IP_ADDRESS regexp="^(.*\\.)\?edgecast\\.steamstatic\\.com\$"
add address=YOUR_IP_ADDRESS regexp="^(.*\\.)\?akamai\\.steamstatic\\.com\$"
add address=YOUR_IP_ADDRESS regexp=\
    "^(.*\\.)\?steam-content-dnld-1\\.apac-1-cdn\\.cqloud\\.com\$"

Just replace all instances of YOUR_IP_ADDRESS with the IP address of your steam cache server. I have also attached these commands as an RSC file if that is easier.
steam-cache-dns.rsc (2.13 KB)