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!
175 stars 43 forks source link

feature requests - network speed control #3

Closed nexusofdoom closed 7 years ago

nexusofdoom commented 8 years ago

/etc/network/interfaces >

adjust speed from internet to around 30mbps down and for local network speed to 1GBps

up /sbin/wondershaper eth0 58800 1000000 down /sbin/wondershaper remove eth0

nexusofdoom commented 8 years ago

wondershaper would have to be installed.

bntjah commented 8 years ago

Gonna have a look in to this and might update the github later on; currently looking in to Blizzard & Origin not caching but my internet is throttled by my isp due to reaching my download limit (due to testing w/ steam) so after this I'm gonna look in to this features!

nexusofdoom commented 8 years ago

this is what i am using to cache Blizzard & Origin. both blizzard and origin are working in my tests

files attached

my setup is ubuntu server 14.04 64bit

running nginx 1.90 and your configs that i updated..

http://www.discoverpc.netTravus Elm - Support Specialist travus@discoverpc.netdiscoverpc.NET http://discoverpc.net/, 1402 Tower Ave., Superior, WI 54880 Local: (715) 398-6767 ::: Toll-free: (800) 721-1350 Mobile: (218) 260-1940 ::: Fax: (866) 704-3660Follow or like us on Google+ https://plus.google.com/111445774308955992766/about?gl=us&hl=en _, _Facebook http://www.facebook.com/pages/discoverpcNET-Computer-Solutions-Center/35471145348 PRIVILEGED AND CONFIDENTIAL COMMUNICATION This e-mail transmission, and any documents, files or previous e-mail messages attached to it, may contain confidential information that is legally privileged. If you are not the intended recipient or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of any of the information contained in or attached to this transmission is STRICTLY PROHIBITED. If you have received this transmission in error, please: (1) immediately notify me by reply e-mail, or by collect telephone call; and (2) destroy the original transmission and its attachments without reading or saving in any manner .

On Sun, Jan 3, 2016 at 1:08 PM, bntjah notifications@github.com wrote:

Gonna have a look in to this and might update the github later on; currently looking in to Blizzard & Origin not caching but my internet is throttled by my isp due to reaching my download limit (due to testing w/ steam) so after this I'm gonna look in to this features!

— Reply to this email directly or view it on GitHub https://github.com/bntjah/lancache/issues/3#issuecomment-168532034.

nexusofdoom commented 8 years ago

blizzard

log_format keys_blizzard "$server_name$request_uri $http_range";

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

DNS entries:

# lancache-blizzard dist.blizzard.com.edgesuite.net llnw.blizzard.com dist.blizzard.com
access_log /srv/lancache/logs/lancache-blizzard-access.log main buffer=128k flush=1m;
access_log /srv/lancache/logs/lancache-blizzard-keys.log keys_blizzard buffer=128k flush=1m;
error_log /srv/lancache/logs/lancache-blizzard-error.log;
# Blizzard Node
include lancache/resolver;

location / {
    # Some downloads are very large so we cache based on range to keep
    # single downloads quick and hence ensure interactivity is good.
    proxy_set_header Range $http_range;
    proxy_set_header If-Range $http_if_range;
    proxy_cache_key "$server_name$request_uri $http_range";
    proxy_cache_valid 206 90d;

    # Use Blizzard cache
    proxy_cache blizzard;
    proxy_read_timeout 150;
    include lancache/proxy-cache;
}

}

nexusofdoom commented 8 years ago

origin

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

DNS entries:

# lancache-origin akamai.cdn.ea.com
access_log /srv/lancache/logs/lancache-origin-access.log main buffer=128k flush=1m;
error_log /srv/lancache/logs/lancache-origin-error.log;
# Origin Node
include lancache/resolver;

location / {
    # Currently Origin:
    # * Blocks caching so we have to ignore Expires and Cache-Control.
    # * Puts sauth=<authkey> in the query string so we use $uri instead of $request_uri
    #   in the cache key.
    # * Uses a single archive file with range requests and refuses requests to download
    #   the entire file.
    #   To combat this we pass-through the Range headers and include the range to the
    #   cache key and allow caching of 206 responses.
    proxy_ignore_headers Expires Cache-Control;
    proxy_set_header Range $http_range;
    proxy_set_header If-Range $http_if_range;
    proxy_cache_key "$server_name$uri $http_range";
    proxy_cache_valid 206 90d;
    proxy_read_timeout 150; 
    # Use Origin cache
    proxy_cache origin;
    include lancache/proxy-cache;
}   

}

bntjah commented 8 years ago

Thanks; will give these a test run! I've added you as a collaborator so you can make changes; your last requests I've added to development (gives me the time to test run these)

nexusofdoom commented 8 years ago

ok sounds good. thanks.