bntjah / lancache

Improve download speeds and reduce strain on your Internet connection at LAN parties. Locally cache game installs and updates from the largest distributors: Steam, RIOT, Blizard, Hirez, Origin, Sony, Microsoft, Tera, GOG, ArenaNetworks, WarGaming, and Uplay. Super easy to setup with auto installer script!
173 stars 44 forks source link

riot game client update issue #79

Open nexusofdoom opened 6 years ago

nexusofdoom commented 6 years ago

if I use the current settings it does not download the current version

so I am using this

server { listen lancache-riot deferred default; servername riot ; access_log /srv/lancache/logs/Access/riot.log main buffer=128k flush=1m; access_log /srv/lancache/logs/Keys/riot.log keys_range buffer=128k flush=1m; error_log /srv/lancache/logs/Errors/riot.log;

# Default Node
include lancache/resolver;
include lancache/cache-key-default;

location / {
    # Some downloads are very large so we cache based on
    # range to keep single downloads quick and hence ensure
    # interactivity is good.
    set $no_cache 0;
    if ($request_uri ~* .patchmanifest$) {
        set $no_cache "1";
    }
    proxy_no_cache $no_cache;
    proxy_cache_bypass $no_cache;
    proxy_bind x.x.x.x;
    #proxy_ignore_headers Expires;
    proxy_ignore_headers Expires Cache-Control;
    #proxy_hide_header ETag;
    proxy_cache_valid 200 206 90d;
    proxy_cache riot;
    proxy_read_timeout 150;
    include lancache/proxy-cache;
    include lancache/cache-range;
}

}

nexusofdoom commented 6 years ago

or this

riot

server { listen lancache-riot deferred default; servername riot ; access_log /srv/lancache/logs/Access/riot.log main buffer=128k flush=1m; access_log /srv/lancache/logs/Keys/riot.log keys_range buffer=128k flush=1m; error_log /srv/lancache/logs/Errors/riot.log;

# Default Node
include lancache/resolver;
include lancache/cache-key-default;

location / {
    # Some downloads are very large so we cache based on
    # range to keep single downloads quick and hence ensure
    # interactivity is good.
    set $no_cache 0;
    if ($request_uri ~* "(/releases/live/solutions/*/releases/releaselisting_NA)") {
        set $no_cache 1;
    }
    proxy_no_cache $no_cache;
    proxy_cache_bypass $no_cache;
    proxy_bind 10.0.4.21;
    #proxy_ignore_headers Expires;
    proxy_ignore_headers Expires Cache-Control;
    #proxy_hide_header ETag;
    proxy_cache_valid 200 206 90d;
    proxy_cache riot;
    proxy_read_timeout 150;
    include lancache/proxy-cache;
    include lancache/cache-range;
}

}

nexusofdoom commented 6 years ago

ok got to bypass

24/Dec/2017:15:18:09 -0600] - REQUEST="riot/releases/live/solutions/league_client_sln/releases/releaselisting_NA" - KEY="riot/releases/live/solutions/league_client_sln/releases/releaselisting_NA -" - CACHE="BYPASS" [24/Dec/2017:15:18:09 -0600] - REQUEST="riot/releases/live/solutions/lol_game_client_sln/releases/releaselisting_NA" - KEY="riot/releases/live/solutions/lol_game_client_sln/releases/releaselisting_NA -" - CACHE="BYPASS"

using this


riot

server { listen lancache-riot deferred default; servername riot ; access_log /srv/lancache/logs/Access/riot.log main buffer=128k flush=1m; access_log /srv/lancache/logs/Keys/riot.log keys_range buffer=128k flush=1m; error_log /srv/lancache/logs/Errors/riot.log;

# Default Node
include lancache/resolver;
include lancache/cache-key-default;

location / {
    # Some downloads are very large so we cache based on
    # range to keep single downloads quick and hence ensure
    # interactivity is good.
    set $no_cache 0;
    if ($request_uri ~* "(/releases/live/solutions/.*/releases/releaselisting_NA)") {
        set $no_cache 1;
    }
    proxy_no_cache $no_cache;
    proxy_cache_bypass $no_cache;
    proxy_bind 10.0.4.21;
    #proxy_ignore_headers Expires;
    #proxy_ignore_headers Expires Cache-Control;
    #proxy_hide_header ETag;
    #proxy_cache_valid 200 206 90d;
    proxy_cache riot;
    proxy_read_timeout 150;
    include lancache/proxy-cache;
    include lancache/cache-range;
}

}

nexusofdoom commented 6 years ago

need to do more testing but it looks like it doing what I want it to do bypass the uri for the update list for the client

and pull updates down.

nexusofdoom commented 6 years ago

[24/Dec/2017:18:49:38 -0600] - REQUEST="riot/releases/live/solutions/lol_game_client_sln/releases/releaselisting_NA" - KEY="riot/releases/live/solutions/lol_game_client_sln/releases/releaselisting_NA -" - CACHE="BYPASS" [24/Dec/2017:18:49:59 -0600] - REQUEST="riot/releases/live/solutions/league_client_sln/releases/releaselisting_NA" - KEY="riot/releases/live/solutions/league_client_sln/releases/releaselisting_NA -" - CACHE="BYPASS" [24/Dec/2017:18:49:59 -0600] - REQUEST="riot/releases/live/solutions/lol_game_client_sln/releases/releaselisting_NA" - KEY="riot/releases/live/solutions/lol_game_client_sln/releases/releaselisting_NA -" - CACHE="BYPASS" [24/Dec/2017:18:50:20 -0600] - REQUEST="riot/releases/live/solutions/league_client_sln/releases/releaselisting_NA" - KEY="riot/releases/live/solutions/league_client_sln/releases/releaselisting_NA -" - CACHE="BYPASS" [24/Dec/2017:18:50:20 -0600] - REQUEST="riot/releases/live/solutions/lol_game_client_sln/releases/releaselisting_NA" - KEY="riot/releases/live/solutions/lol_game_client_sln/releases/releaselisting_NA -" - CACHE="BYPASS" [24/Dec/2017:18:50:41 -0600] - REQUEST="riot/releases/live/solutions/league_client_sln/releases/releaselisting_NA" - KEY="riot/releases/live/solutions/league_client_sln/releases/releaselisting_NA -" - CACHE="BYPASS" [24/Dec/2017:18:50:41 -0600] - REQUEST="riot/releases/live/solutions/lol_game_client_sln/releases/releaselisting_NA" - KEY="riot/releases/live/solutions/lol_game_client_sln/releases/releaselisting_NA -" - CACHE="BYPASS"

gellis713 commented 6 years ago

80 I've fixed this issue and verified in a currently active LAN party.

nexusofdoom commented 6 years ago

still did not work with that still using mine

nexusofdoom commented 6 years ago

riot

server { listen lancache-riot deferred default; servername riot ;

access_log /srv/lancache/logs/Access/riot.log main buffer=128k flush=1m; access_log /srv/lancache/logs/Keys/riot.log keys_range buffer=128k flush=1m; error_log /srv/lancache/logs/Errors/riot.log;

Default Node

include lancache/resolver; include lancache/cache-key-default;

location / {

Some downloads are very large so we cache based on

# range to keep single downloads quick and hence ensure
# interactivity is good.
set $no_cache 0;
if ($request_uri ~* "(/releases/live/solutions/.*/releases/releaselisting)") {
    set $no_cache 1;
}
proxy_no_cache $no_cache;
proxy_cache_bypass $no_cache;
proxy_bind 10.0.4.21;
#proxy_ignore_headers Expires;
proxy_ignore_headers Expires Cache-Control;
#proxy_hide_header ETag;
proxy_cache_valid 200 206 360d;
proxy_cache riot;
proxy_read_timeout 300;
include lancache/proxy-cache;
include lancache/cache-range;

} }

nexusofdoom commented 6 years ago

img_20171230_161015

nexusofdoom commented 6 years ago

image issues getting updates again

Starting capture on enp2s0f0 interface 2018-02-10 11:27:22 10.0.5.39 10.0.4.23 > GET l3cdn.riotgames.com /releases/live/solutions/league_client_sln/releases/releaselisting_NA HTTP/1.1 - - 2018-02-10 11:27:22 10.0.4.2 209.197.3.7 > GET l3cdn.riotgames.com /releases/live/solutions/league_client_sln/releases/releaselisting_NA HTTP/1.0 - - 2018-02-10 11:27:22 209.197.3.7 10.0.4.2 < - - - HTTP/1.1 200 OK 2018-02-10 11:27:22 10.0.4.23 10.0.5.39 < - - - HTTP/1.1 200 OK 2018-02-10 11:27:22 10.0.5.39 10.0.4.23 > GET l3cdn.riotgames.com /releases/live/solutions/lol_game_client_sln/releases/releaselisting_NA HTTP/1.1 - - 2018-02-10 11:27:22 10.0.4.2 209.197.3.7 > GET l3cdn.riotgames.com /releases/live/solutions/lol_game_client_sln/releases/releaselisting_NA HTTP/1.0 - - 2018-02-10 11:27:22 209.197.3.7 10.0.4.2 < - - - HTTP/1.1 200 OK 2018-02-10 11:27:22 10.0.4.23 10.0.5.39 < - - - HTTP/1.1 200 OK 2018-02-10 11:27:22 10.0.5.39 10.0.4.23 > GET l3cdn.riotgames.com /releases/live/solutions/lol_game_client_sln/releases/releaselisting_NA HTTP/1.1 - - 2018-02-10 11:27:22 10.0.4.2 209.197.3.7 > GET l3cdn.riotgames.com /releases/live/solutions/lol_game_client_sln/releases/releaselisting_NA HTTP/1.0 - - 2018-02-10 11:27:22 209.197.3.7 10.0.4.2 < - - - HTTP/1.1 200 OK 2018-02-10 11:27:22 10.0.4.23 10.0.5.39 < - - - HTTP/1.1 200 OK 2018-02-10 11:27:22 10.0.5.39 10.0.4.23 > HEAD l3cdn.riotgames.com /releases/live/solutions/lol_game_client_sln/releases/0.0.1.202/tag HTTP/1.1 - - 2018-02-10 11:27:22 10.0.4.23 10.0.5.39 < - - - HTTP/1.1 403 Forbidden 2018-02-10 11:27:22 10.0.5.39 10.0.4.23 > GET l3cdn.riotgames.com /releases/live/solutions/lol_game_client_sln/releases/0.0.1.202/solutionmanifest HTTP/1.1 - - 2018-02-10 11:27:22 10.0.4.2 209.197.3.7 > GET l3cdn.riotgames.com /releases/live/solutions/lol_game_client_sln/releases/0.0.1.202/solutionmanifest HTTP/1.0 - - 2018-02-10 11:27:22 209.197.3.7 10.0.4.2 < - - - HTTP/1.1 304 Not Modified 2018-02-10 11:27:22 10.0.4.23 10.0.5.39 < - - - HTTP/1.1 200 OK 2018-02-10 11:27:22 10.0.5.39 10.0.4.23 > GET l3cdn.riotgames.com /releases/live/projects/lol_game_client/releases/releaselisting_NA HTTP/1.1 - - 2018-02-10 11:27:22 10.0.4.23 10.0.5.39 < - - - HTTP/1.1 200 OK

nexusofdoom commented 6 years ago

getting file not found http://l3cdn.riotgames.com/releases/live/solutions/lol_game_client_sln/releases/0.0.1.202/tag

nexusofdoom commented 6 years ago

I cleared the cache and it working again some thing is getting cached that should not be I will be trying to attach a log file of all the files it is pulling down for this patch to see what it is.

nexusofdoom commented 6 years ago

access.log

nexusofdoom commented 6 years ago

maybe this uri http://l3cdn.riotgames.com/releases/live/projects/lol_game_client_en_us/releases/0.0.1.131/packages/patches/0.0.1.130/packagemanifest

nexusofdoom commented 6 years ago

Testing this config

riot

server { listen lancache-riot deferred default; servername riot ; access_log /srv/lancache/logs/Access/riot.log main buffer=128k flush=1m; access_log /srv/lancache/logs/Keys/riot.log keys_range buffer=128k flush=1m; error_log /srv/lancache/logs/Errors/riot.log;

# Default Node
include lancache/resolver;
include lancache/cache-key-default;

location ~ ^/releases/live/solutions/lol_game_client_sln/releases/releaselisting_NA { proxy_set_header Connection ""; proxy_set_header Host $proxy_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://$host$request_uri; }

location ~ ^/releases/live/solutions/lol_game_client_sln/releases/./solutionmanifest { proxy_set_header Connection ""; proxy_set_header Host $proxy_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://$host$request_uri; } location ~ ^/releases/live/projects/lol_game_client/releases/./releasemanifest { proxy_set_header Connection ""; proxy_set_header Host $proxy_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://$host$request_uri; }

location / {
    # Some downloads are very large so we cache based on
    # range to keep single downloads quick and hence ensure
    # interactivity is good.
    proxy_bind 10.0.4.2;
    #testing cache of 200 value
    #proxy_cache_valid 200 90d; proxy_cache_valid 206 90d;
    proxy_cache riot;
    proxy_read_timeout 150;
    include lancache/proxy-cache;
    include lancache/cache-range;
}

}

nexusofdoom commented 6 years ago

NEW

riot

server { listen lancache-riot deferred default; servername riot ; access_log /srv/lancache/logs/Access/riot.log main buffer=128k flush=1m; access_log /srv/lancache/logs/Keys/riot.log keys_range buffer=128k flush=1m; error_log /srv/lancache/logs/Errors/riot.log;

# Default Node
include lancache/resolver;
include lancache/cache-key-default;

location ~ ^/releases/live/solutions/lol_game_client_sln/releases/releaselisting_NA { proxy_set_header Connection ""; proxy_set_header Host $proxy_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://$host$request_uri; }

location ~ ^/releases/live/solutions/league_client_sln/releases/releaselisting_NA { proxy_set_header Connection ""; proxy_set_header Host $proxy_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://$host$request_uri; }

location ~ ^/releases/live/solutions/lol_game_client_sln/releases/.*/solutionmanifest { proxy_set_header Connection ""; proxy_set_header Host $proxy_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://$host$request_uri; }

location ~ ^/releases/live/projects/lol_game_client/releases/.*/releasemanifest { proxy_set_header Connection ""; proxy_set_header Host $proxy_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://$host$request_uri; }

location / {
    # Some downloads are very large so we cache based on
    # range to keep single downloads quick and hence ensure
    # interactivity is good.
    proxy_bind 10.0.4.2;
    #testing cache of 200 value
    #proxy_cache_valid 200 90d; proxy_cache_valid 206 90d;
    proxy_cache riot;
    proxy_read_timeout 150;
    include lancache/proxy-cache;
    include lancache/cache-range;
}

}

nexusofdoom commented 6 years ago

some one had this for a fix

Fix for League of Legends Updater

location ~ ^.+(releaselisting_.*|.version$) { proxy_pass http://$host; } }

ref

https://github.com/steamcache/generic/blob/master/overlay/etc/nginx/sites-available/generic.conf

BloodyIron commented 6 years ago

I haven't got my cache up to speed yet. Is this latest method known-working?

nexusofdoom commented 6 years ago

I think so. what is the issue?

BloodyIron commented 6 years ago

Well, as I mentioned, I haven't got it setup just yet. So I'm more asking ahead. I don't have an issue just yet! hah! ;P

mfairouz commented 6 years ago

still not able to cache LOL game update hope anyone can help.

[30/Mar/2018:11:29:10 -0400] - REQUEST="riot/releases/live/solutions/lol_game_client_sln/releases/releaselisting_EUW" - KEY="riot/releases/live/solutions/lol_game_client_sln/releases/releaselisting_EUW -" - CACHE="-" [30/Mar/2018:11:29:31 -0400] - REQUEST="riot/releases/live/solutions/league_client_sln/releases/releaselisting_EUW" - KEY="riot/releases/live/solutions/league_client_sln/releases/releaselisting_EUW -" - CACHE="-" [30/Mar/2018:11:29:31 -0400] - REQUEST="riot/releases/live/solutions/lol_game_client_sln/releases/releaselisting_EUW" - KEY="riot/releases/live/solutions/lol_game_client_sln/releases/releaselisting_EUW -" - CACHE="-"

nexusofdoom commented 6 years ago

that REQUEST should not be cached that is just a file that tells that there is news files to download. so it bypasses that request so it can get the new patch list file to get the files it needs for patching.

BloodyIron commented 6 years ago

Not 100% sure if relevant to this particular issue, but when I finally got the cache setup, the main website to download the LoL client kept... 404ing. I'm thinking it's DNS related, but haven't spent the time just yet to identify the issue. Anyone have any ideas?

nexusofdoom commented 6 years ago

when you ping the domains from the client does it show the lancache IP? from the lancache box when you ping the domain does it show the real world IP for the domain name? and /src/lancache/data folders permissions setup correct? sniproxy working?

mfairouz commented 6 years ago

this cache server working well for all others clients ( steam, blizzad, ... ) but for lol its not. i see its something related to expire date. but till now i didnt figure how to fix it. as the LOL update cached well and i can see the files under data folder but still not getting high hit ratio due to expire date.

BloodyIron commented 6 years ago

the LoL client itself got content from the cache (last I checked), as in downloading game content, but downloading the client from riot's website is where it got "blocked" or something.

however, I don't have it setup in front of me, so I can't troubleshoot it specifically. coincidentally, I may be able to do that later today!

are you still sure you want me to follow those ping instructions?

oh, and we are not using sniproxy, in testing I didn't see a need for it at all.

BloodyIron commented 6 years ago

@mfairouz why not tweak your expire time?

nexusofdoom commented 6 years ago

you talked about thinking it was a DNS issue if you try pining the hosts names from the client pc then on the lancahce server you can see how the DNS is handing out IPs

BloodyIron commented 6 years ago

@nexusofdoom indeed, I can do that, any other ideas for what I should test too? (when I get to that point)

nexusofdoom commented 6 years ago

I also use httpry to look at the traffic no the lancache side. when downloading files.

mfairouz commented 6 years ago

riot

server { listen lancache-riot deferred default; servername riot ; access_log /srv/lancache/logs/Access/riot.log main buffer=128k flush=1m; access_log /srv/lancache/logs/Keys/riot.log keys_range buffer=128k flush=1m; error_log /srv/lancache/logs/Errors/riot.log;

# Default Node
include lancache/resolver;
include lancache/cache-key-default;

location ~ ^.+(releaselisting_.*|.version$) {

location ~ ^/releases/live/solutions/.*/releaselisting {

    proxy_set_header Connection "";
    proxy_set_header Host $proxy_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://$host$request_uri;
}

location / {
    # Some downloads are very large so we cache based on
    # range to keep single downloads quick and hence ensure
    # interactivity is good.
    proxy_bind 192.168.1.10;
    proxy_ignore_headers Expires Cache-Control;
    proxy_cache_valid 200 206 365d;
    proxy_cache riot;
    proxy_read_timeout 150;
    include lancache/proxy-cache;
    include lancache/cache-range;
}

}

BloodyIron commented 6 years ago

@nexusofdoom I'll try that if the httpd logs don't turn anything up :)

nexusofdoom commented 6 years ago

pulled this from my home box

riot

server { listen lancache-riot deferred default; servername riot ; access_log /srv/lancache/logs/Access/riot.log main buffer=128k flush=1m; access_log /srv/lancache/logs/Keys/riot.log keys_range buffer=128k flush=1m; error_log /srv/lancache/logs/Errors/riot.log;

# Default Node
include lancache/resolver;
include lancache/cache-key-default;

Fix for League of Legends Updater

location ~ ^.+(releaselisting_.*|.version$) { proxy_pass http://$host; }

Normal Caching

location / {
    # Some downloads are very large so we cache based on
    # range to keep single downloads quick and hence ensure
    # interactivity is good.
    proxy_bind X.X.X.X;  ---- Add your IP
    #testing cache of 200 value
    #proxy_cache_valid 200 90d; proxy_cache_valid 206 90d;
    proxy_cache riot;
    proxy_read_timeout 150;
    include lancache/proxy-cache;
    include lancache/cache-range;
}

}