lancachenet / monolithic

A monolithic lancache service capable of caching all CDNs in a single instance
https://hub.docker.com/r/lancachenet/monolithic
Other
728 stars 73 forks source link

Change maps to allow user agent mapping too #87

Closed VibroAxe closed 4 years ago

VibroAxe commented 4 years ago

See #86 for details

VibroAxe commented 4 years ago

Note: this should definitely be merged using a squash commit!

VibroAxe commented 4 years ago

Huh.. it passed unit test o_O

Anyone with a working lancache infrastructure able to pull this pr, build and test with new steam.. much appreciated (Needs to be pulled with a custom cache_domains with nothing but lancache.steampowered.com) :P

MathewBurnett commented 4 years ago

downloaded https://82-162466976-gh.circle-artifacts.com/0/docker-lancachenet-monolithic.tar run docker load -i docker-lancachenet-monolithic.tar set one dns override of lancache.steamcontent.com to point to the cache

[cache32-lhr1.steamcontent.com] 10.81.0.19 / - - - [29/Jan/2020:13:50:10 +0000] "GET /depot/431241/chunk/2baf7dbb1d336a0ebee62cd3ecb97a2a263b41ec HTTP/1.1" 200 156032 "-" "Valve/Steam HTTP Client 1.0" "MISS" "cache32-lhr1.steamcontent.com" "-" [cache25-lhr1.steamcontent.com] 10.81.0.19 / - - - [29/Jan/2020:13:50:10 +0000] "GET /depot/431241/chunk/7d415b2811f878cf74ba2a9acb44f96b6188f869 HTTP/1.1" 200 216400 "-" "Valve/Steam HTTP Client 1.0" "MISS" "cache25-lhr1.steamcontent.com" "-"

At present it doesn't seem to be identifying the user agent and mapping to steam

MathewBurnett commented 4 years ago

user agent mapping now works tested from https://84-162466976-gh.circle-artifacts.com/0/docker-lancachenet-monolithic.tar

[steam] 10.81.0.19 / - - - [29/Jan/2020:15:06:54 +0000] "GET /depot/431241/chunk/776db455eea025032be90362f28e5058c47918cb HTTP/1.1" 200 305024 "-" "Valve/Steam HTTP Client 1.0" "MISS" "cache19-lhr1.steamcontent.com" "-" [steam] 10.81.0.19 / - - - [29/Jan/2020:15:06:54 +0000] "GET /depot/431241/chunk/82bcb3909c76da4b6411fef440a1b424bf9d1de0 HTTP/1.1" 200 55664 "-" "Valve/Steam HTTP Client 1.0" "MISS" "cache21-lhr1.steamcontent.com" "-"

EDIT: spoke to soon the steam mappings are also included

MathewBurnett commented 4 years ago

switched to -e CACHE_DOMAINS_REPO="https://github.com/vibroaxe/cache-domains.git" Now without the explict mappings it does not match steam

[cache25-lhr1.steamcontent.com] 10.81.0.19 / - - - [29/Jan/2020:15:48:44 +0000] "GET /depot/431241/chunk/2063a13fd4821b6db41a5a3ce45d2502959757c9 HTTP/1.1" 200 305008 "-" "Valve/Steam HTTP Client 1.0" "MISS" "cache25-lhr1.steamcontent.com" "-" [cache25-lhr1.steamcontent.com] 10.81.0.19 / - - - [29/Jan/2020:15:48:44 +0000] "GET /depot/431241/chunk/78de691f1a1872b61f8413547fd22e70bc8fd192 HTTP/1.1" 200 370992 "-" "Valve/Steam HTTP Client 1.0" "MISS" "cache25-lhr1.steamcontent.com" "-"

MathewBurnett commented 4 years ago

https://86-162466976-gh.circle-artifacts.com/0/docker-lancachenet-monolithic.tar -e CACHE_DOMAINS_REPO="https://github.com/vibroaxe/cache-domains.git" https://gist.github.com/8d144d5c5b203f815e3c2664b370ddc3 Lancache-dns standard

[steam] 10.81.0.19 / - - - [29/Jan/2020:16:17:21 +0000] "GET /depot/431241/chunk/a5e49b773a8c282a20597752df3b120b98076f2c HTTP/1.1" 200 497184 "-" "Valve/Steam HTTP Client 1.0" "MISS" "cache31-lhr1.steamcontent.com" "-" [steam] 10.81.0.19 / - - - [29/Jan/2020:16:17:21 +0000] "GET /depot/431241/chunk/849ce7f49c83f92752ff7a3d4e50c1b002b06d72 HTTP/1.1" 200 625920 "-" "Valve/Steam HTTP Client 1.0" "MISS" "cache31-lhr1.steamcontent.com" "-"

This now appears to work

VibroAxe commented 4 years ago

--Edit--

I am not a smart, full log output including the config map can be found in protos post: https://gist.github.com/8d144d5c5b203f815e3c2664b370ddc3

MathewBurnett commented 4 years ago

@MathewBurnett could you please upload the gist of the final run for reviewers as it includes the full config map

See line 3 of previous post, https://gist.github.com/8d144d5c5b203f815e3c2664b370ddc3

Lepidopterist commented 4 years ago

Looks good to me.

VibroAxe commented 4 years ago

LGTM reviews from @GotenXiao @crabbey and @rconan on UKlans