Open travispk opened 7 years ago
Have to look in to this; great idea though!
Awesome! I have my event coming up this weekend. So I'm getting the LANcache server ready for it. LANFest NETWAR 32.0 - https://lanfest.intel.com/events/netwar32
I wish I had more free time cycles to work on this. Does anyone else?
If we add "server_name" directives in server settings in each vhost depot. We could consolidate all of the depots to a single IP address on the lancache server and GREATLY simplify it. Just need to take all of the DNS entries in Unbound and add them to server_name in each vhost. When a HTTP request comes to lancache, nginx will identify via http host header which vhost this request belongs to (virtual hosts), instead of by interface IP address.
For example, for Steam:
server { listen 80; server_name .steamcontent.com client-download.steampowered.com content1.steampowered.com content2.steampowered.com content3.steampowered.com content4.steampowered.com content5.steampowered.com content6.steampowered.com content7.steampowered.com content8.steampowered.com cs.steampowered.com clientconfig.akamai.steamstatic.com hsar.steampowered.com.edgesuite.net .cs.steampowered.com .hsar.steampowered.com.edgesuite.net .akamai.steamstatic.com;
We could then make these changes to lancache and it's installer:
For existing installs: Fresh install of OS for existing lancache install might be wise after this simplification (removal of additional interfaces, host entries, etc.) Or steps to clean it up.
@travispk I've done this in my fork: https://github.com/zeropingheroes/lancache
I used to use this configuration of a LANCache a few years ago (https://blog.yolocation.pro/index.php/2016/02/03/how-to-install-lancache-on-debian/)
One thing I REALLY liked about it, is that it only used 1 IP address. It had the hostnames part of the Nginix configuration for virtual name hosting. For example, if Steam client connected, Nginx would look at the Host in the HTTP header and identify it is connecting to a Host defined for Steam and direct it to that depot. This GREATLY simplified the LANCache configuration and DNS. Thoughts on implementing that in your AWESOME lancache?