ryanewen / lan-cache-docker Goto Github PK
View Code? Open in Web Editor NEWA super simple docker container to run a LAN cache for steam, origin, etc
A super simple docker container to run a LAN cache for steam, origin, etc
I followed the instructions on the installation, was having a little trouble but issue #9 resolved my problems.
C:\Users\fiber>nslookup steamcontent.com
Server: gamecache
Address: 10.0.0.45
Name: steamcontent.com
Address: 10.0.0.45
appears to work just fine, but when downloading CS:GO (steam) or Hearthstone (blizzard), access nor error logs change, and the data storage doesn't increase in size indicating that nothing is being downloaded. How else can I test to see if I have set lan-cache up right?
We used the cache yesterday for an event and it largely worked great, thank you for the work and making it available.
We ran into an issue with an attendee being unable to purchase Blizzard game content while behind the cache (D3 RoS). They were able to login and play just fine but when they tried to use the shop it would toss an error. Wasn't my machine so wasn't able to grab the blizzard code and was too long to remember.
Once again setting real DNS and flushing allowed it to work as expected. Any ideas on what to look at or adjust?
Thanks in advance.
If I wanted to remove a service, for example xbox live, which requires a spoofed SSL cert, do I just delete the xbox dnsmasq and nginx conf files and do the following?
docker-compose down
docker-compose up -d
The reason for asking, the lan cache was preventing login to Microsoft Store based games, Sea of Thieves beta specifically. One I had the attendees manually set real DNS and flush they were able to login.
So i'm trying to get this to work on my Raspberry PI 3B+ (~300mbit/s ethernet port). But when nginx tries to start i get the following: https://hastebin.com/bucavagexi.pl
And when i increase the server_names_hash_bucket_size from 32 to 64 (or even just 33) i get this:
https://hastebin.com/ikumimirul.js.
How can i fix this?
dnsmasq startup script start-dnsmasq.sh fails to detect IP address on machine running Ubuntu 17.10 using DHCP.
user@ubuntu:~/lan-cache-docker/docker-dnsmasq$ docker-compose up
Creating dnsmasq ... done
Creating nginx ... done
Creating sniproxy ... done
Attaching to nginx, sniproxy, dnsmasq
dnsmasq | sh: 100: unknown operand
dnsmasq | Could not autodetect host IP. Exiting.
sniproxy exited with code 1
dnsmasq exited with code 1
Running the part of the script that pulls the host IP address from the system in chunks on Ubuntu 16.04 not using DHCP looks like this:
user@ubuntu:~/lan-cache-docker/docker-dnsmasq$ ip route show dev enp0s25
default via 192.168.1.1 onlink
192.168.1.0/24 proto kernel scope link src 192.168.1.18
user@ubuntu:~/lan-cache-docker/docker-dnsmasq$ ip route show dev enp0s25 | grep -w "link"
192.168.1.0/24 proto kernel scope link src 192.168.1.18
user@ubuntu:~/lan-cache-docker/docker-dnsmasq$ ip route show dev enp0s25 | grep -w "link" | awk -F " " '{print $NF}'
192.168.1.18
Running the same thing on Ubuntu 17.10 using DHCP looks like this:
user@ubuntu:~/lan-cache-docker/docker-dnsmasq$ ip route show dev enp5s0
default via 192.168.1.1 proto dhcp src 192.168.1.18 metric 100
192.168.1.0/24 proto kernel scope link src 192.168.1.18
192.168.1.1 proto dhcp scope link src 192.168.1.18 metric 100
user@ubuntu:~/lan-cache-docker/docker-dnsmasq$ ip route show dev enp0s25 | grep -w "link"
192.168.1.0/24 proto kernel scope link src 192.168.1.18
192.168.1.1 proto dhcp scope link src 192.168.1.18 metric 100
user@ubuntu:~/lan-cache-docker/docker-dnsmasq$ ip route show dev enp0s25 | grep -w "link" | awk -F " " '{print $NF}'
192.168.1.18
100
The 100 at the end is being appended to HOST_IP which causes the error. I'm not sure what's causing the extra information; if it's the distro version, a different version of the ip
tool, if it's DHCP related, or something else.
Recommend changing the regex used in grep to explicitly match an IP address:
grep -Pom1 'link\s+src\s+\d+\.\d+\.\d+\.\d+'
The above will use a perl regular expression, returning only what's matched, and only one match. This will match on the first IP address found in the response from ip route
following the text link src
.
Hello, it seems that epic games is not caching correctly. If someone could fix this for me.
Thank you
Hello Ryan,
I'm running a PFsense firewall currently. I use your lancache as dns server for my network.
But I'm pretty sure that there're some steam downloads are not all the time took from cache but from the web. For example, I'm sure that your lancache is working fine for PS4 update because no one is complaining there're some lag on the network.
Can you advice what to do to make sure any game updates are pulled from cache ?
Thank you
Hi! nice work... is it possible to have a "walkthrough" about enabling Fornite updates, if some client side configuration is needed, no problem, hope you can make this ! thanks in advance.
Unsure if this is overactive heuristics by Kaspersky or not, but I get reports of "HEUR:Trojan-Downloader.Shell.Agent.p" on cloning the lan-cache-docker repo. Although Kaspersky has been known to conflict with Docker, these symptoms are different than those reported in the known false-positive cases I've been able to find.
Log export from Kaspersky is attached:
Hi Ryan,
I'm just starting to get into linux and networking and this was my first project. The lan cache is working, it's cacheing my game downloads on steam and ps4, but on ps4 when I have the cache in the dns settings, I get a Strict NAT type. Any ideas what could be causing this?
Hello, thanks for your great how-to :)
As I run my ubuntu server on Hyper-V and I have a NAS, and wish I could use it for cache the data.
Can you tell me how to do this ?
I have NFS share.
Thank you
At first I had the problem of, when I went to set things up I noticed it seemed to be working but when testing, all queries for things like steamcontent.com etc would show up nonexistent (nxdomain). When I poked about the docker container to see what was going on (I added bash to dnsmasq container and prodded its files to take a look), I noticed that the bit of each entry that's supposed to contain my IP was simply blank.
Looking at start-dnsmasq.sh immediately showed me why:
get_ip() {
interface=$(ip route | grep default | awk '{print $(NF)}')
ip addr show dev $interface | grep 'inet ' | grep -o '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*' | head -n 1
}
If I run ip route | grep default
on my system, I get the following output:
default via 192.168.1.1 dev bond0 src 192.168.1.201 metric 2
If I then expand that to ip route | grep default | awk '{print $(NF)}'
, the result is as follows:
2
which isn't exactly a correct parameter to ip addr show dev
(I assume you meant to pull 'bond0')
I think your shell magic may be slightly out of date or something? I admit, I'm not familiar with how AWK works, but it's clearly pulling the wrong part of the output.
For the time being, can I simply edit start-dnsmasq.sh to put HOST_IP=192.168.1.201 and restart docker, or does something else need done?
the cache works for blizzard and steam but league of legends crashes during update.
Working Nice and smooth as well then others like steamcache and other one ive tried so much lan caches but everyone have some problems .
I am a professional Mikrotik Certified i route all the traffic in reverse proxy for all the lan customers get that benefit i also really want to make cache epic games my backbone provider are caching epic games and other things we can help each other to make this possible if you have time.ty
I'm downloading PUBG, and frequently running sudo du -h -d 1 data/cache
The disk space does not reflect the amount downloaded according to Steam.
https://i.imgur.com/e7eDARL.png
The game is 13GB, but only 12GB is used on data/cache/steam. I have downloaded/deleted/redownloaded 4-5 times now just to ensure all the files are present.
I've been playing with a few different settings and adding a few new DNS records from Steam that I've been able to find, here's the original list:
address=/client-download.steampowered.com/NGINX_IP
address=/content-origin.steampowered.com/NGINX_IP
address=/content1.steampowered.com/NGINX_IP
address=/content2.steampowered.com/NGINX_IP
address=/content3.steampowered.com/NGINX_IP
address=/content4.steampowered.com/NGINX_IP
address=/content5.steampowered.com/NGINX_IP
address=/content6.steampowered.com/NGINX_IP
address=/content7.steampowered.com/NGINX_IP
address=/content8.steampowered.com/NGINX_IP
address=/content9.steampowered.com/NGINX_IP
address=/content0.steampowered.com/NGINX_IP
address=/.cs.steampowered.com/NGINX_IP
address=/.hsar.steampowered.com.edgesuite.net/NGINX_IP
address=/.akamai.steamstatic.com/NGINX_IP
address=/.steamcontent.com/NGINX_IP
Here's my new list with a few more domains that I've been able to track down.
address=/client-download.steampowered.com/NGINX_IP
address=/content-origin.steampowered.com/NGINX_IP
address=/origin.steampowered.com/NGINX_IP
address=/content1.steampowered.com/NGINX_IP
address=/content2.steampowered.com/NGINX_IP
address=/content3.steampowered.com/NGINX_IP
address=/content4.steampowered.com/NGINX_IP
address=/content5.steampowered.com/NGINX_IP
address=/content6.steampowered.com/NGINX_IP
address=/content7.steampowered.com/NGINX_IP
address=/content8.steampowered.com/NGINX_IP
address=/content9.steampowered.com/NGINX_IP
address=/content0.steampowered.com/NGINX_IP
address=/cdn.steampowered.com/NGINX_IP
address=/cdn2.steampowered.com/NGINX_IP
address=/cdn3.steampowered.com/NGINX_IP
address=/cdn4.steampowered.com/NGINX_IP
address=/steamcdn-a.akamaihd.net/NGINX_IP
address=/cdn.akamai.steamstatic.com.edgesuite.net/NGINX_IP
address=/steamcache.steamcontent.com/NGINX_IP
address=/.cs.steampowered.com/NGINX_IP
address=/.hsar.steampowered.com.edgesuite.net/NGINX_IP
address=/.akamai.steamstatic.com/NGINX_IP
address=/.steamcontent.com/NGINX_IP
address=/.deploy.static.akamaitechnologies.com/NGINX_IP
address=/.steampipe.steamcontent.com/NGINX_IP
Yet when I download games it is still resolving hostnames to these two IP addresses:
65.216.231.194, which belongs to UUNET a server in Ashburn Virginia, as I have my download settings on Steam pointing to Washington DC. As well as 151.205.0.27, which I'm not sure about.
Hi,
I got 302 errors and etag mismatch when trying to use lan-cache to cache playstation games.
Do you have an idea if we can correct this easily? Or is it more complicated feature that need to be implemented or tested?
Thanks
Does this work with ipv6? Or does it require ipv6 be disabled in the router or on each PC on the LAN?
Thanks in advance.
would it be possible to add linux distros and some other vendors?
ie:
Ubuntu, Fedora, debian, suse
Apple, Adobe
Hi - the instructions seemed extremely straighforward, I ran through them on a clean Ubuntu 18.04 install, and both times I encountered the same error. When the containers start up, the dnsmasq one is stuck with a status of Restarting (2) 3 seconds ago - the timer will slide up until it restarts the container again.
This is my first foray into Docker, so there is likely something I've done wrong, but I'm at a bit of a loss?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.