Open nexusofdoom opened 6 years ago
or 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 ~* "(/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;
}
}
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
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;
}
}
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.
[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"
still did not work with that still using mine
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;
include lancache/resolver; include lancache/cache-key-default;
location / {
# 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;
} }
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
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.
Testing this config
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;
}
}
NEW
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;
}
}
some one had this for a fix
location ~ ^.+(releaselisting_.*|.version$) { proxy_pass http://$host; } }
ref
https://github.com/steamcache/generic/blob/master/overlay/etc/nginx/sites-available/generic.conf
I haven't got my cache up to speed yet. Is this latest method known-working?
I think so. what is the issue?
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
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="-"
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.
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?
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?
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.
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.
@mfairouz why not tweak your expire time?
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
@nexusofdoom indeed, I can do that, any other ideas for what I should test too? (when I get to that point)
I also use httpry to look at the traffic no the lancache side. when downloading files.
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$) {
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;
}
}
@nexusofdoom I'll try that if the httpd logs don't turn anything up :)
pulled this from my home box
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$) { proxy_pass http://$host; }
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;
}
}
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;
}