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 44 forks source link

Origin cannot download #113

Open t0mt opened 6 years ago

t0mt commented 6 years ago

Hi,

The Origin client cannot download the games. In my error log i see: (when I enable debuglogging)

2018/09/22 17:54:56 [debug] 5222#5222: *1 http range cacheable: header filter - skip no size
2018/09/22 17:54:56 [debug] 5222#5222: *1 http range cacheable: body filter - skip ctx
2018/09/22 17:54:56 [debug] 5222#5222: *1 http range cacheable: body filter - skip ctx
2018/09/22 17:54:56 [debug] 5222#5222: *2 http range cacheable: header filter - skip no size
2018/09/22 17:54:56 [debug] 5222#5222: *2 http range cacheable: body filter - skip ctx

The HTTP header from the client shows: Range: bytes=0-0\r\n

Any idea ?

Kind regards, Tom Times-LAN (www.times-lan.nl)

t0mt commented 6 years ago

I changed include lancache/cache-slice; to include lancache/cache-range; and now it's seems to work. Is this the correct config ?

nexusofdoom commented 6 years ago

I am using this and was working will test more tonight

server { listen lancache-origin deferred default; servername origin ; access_log lc-srv-loc/logs/access/origin.log main buffer=128k flush=1m; access_log lc-srv-loc/logs/keys/origin.log keys_slice buffer=128k flush=1m; error_log lc-srv-loc/logs/errors/origin.log;

proxy_cache_background_update on;

# Origin Node
include lancache/resolver;
include lancache/cache-key-default;
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_bind lc-host-proxybind;
    proxy_ignore_headers Expires Cache-Control;
    proxy_hide_header ETag;
    proxy_cache_valid 206 90d;
    proxy_read_timeout 150;
    # Use Origin cache
    proxy_cache origin;
    include lancache/proxy-cache;
    include lancache/cache-slice;
}

}

nexusofdoom commented 6 years ago

it was working for me with slice. no issues on my side.

nexusofdoom commented 6 years ago

image

nagilum99 commented 6 years ago

From here we can verify that downloads with cache-slice lead to an error downloading the games with Origin.

Following this issue, I changed the line to cache-range and downloads worked.

But in opposite to steam it looks a bit weird: Downloads are being cached, but un- and reinstalling the same games lead to a new online download, which again was being cached. It seems only small parts of the downloads have been reused.

Couldn't find out a reason for now - maybe it changes the CDN?