Skip to content

Merge ChainedHope's updates #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Aug 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ ADD steam.conf /etc/nginx/conf.d/
ADD blizzard.conf /etc/nginx/conf.d/
ADD league.conf /etc/nginx/conf.d/
ADD wargaming.conf /etc/nginx/conf.d/
ADD sony.conf /etc/nginx/conf.d/
ADD microsoft.conf /etc/nginx/conf.d/
ADD hirez.conf /etc/nginx/conf.d/
ADD epic.conf /etc/nginx/conf.d/

RUN mkdir -p /var/lib/nginx/body
RUN mkdir -p /var/lib/nginx/fastcgi
RUN mkdir -p /cache/origin
RUN mkdir -p /cache/origin /cache/steam /cache/blizzard /cache/league /cache/wargaming /cache/sony /cache/microsoft /cache/hirez /cache/epic

ADD nginx.conf /etc/nginx/nginx.conf

Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,34 @@ Wargaming.net:
dl.wargaming.net
dl2.wargaming.net
wg.gcdn.co

Sony (PS4):
*.dl.playstation.net
*.dl.playstation.net.edgesuite.net
dl.playstation.net
dl.playstation.net.edgesuite.net
pls.patch.station.sony.com;

Microsoft:
*.download.windowsupdate.com
download.windowsupdate.com
dlassets.xboxlive.com
*.xboxone.loris.llnwd.net
xboxone.vo.llnwd.net
images-eds.xboxlive.com
xbox-mbr.xboxlive.com
assets1.xboxlive.com.nsatc.net
assets1.xboxlive.com

Hirez:
hirez.http.internapcdn.net

Epic Games: (not tested, needs custom SSC)
download.epicgames.com
download1.epicgames.com
download2.epicgames.com
download3.epicgames.com
download4.epicgames.com
```

To build and run, do:
Expand Down
2 changes: 1 addition & 1 deletion blizzard.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
proxy_cache_path /cache/blizzard keys_zone=blizzard:10m levels=1:2 inactive=100d max_size=100g;
proxy_cache_path /cache/blizzard keys_zone=blizzard:10m levels=1:2 inactive=100d max_size=300g;

server {
listen 80;
Expand Down
24 changes: 24 additions & 0 deletions epic.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
proxy_cache_path /cache/epic keys_zone=epic:10m levels=1:2 inactive=100d max_size=200g;

server {
listen 80;
server_name download.epicgames.com download1.epicgames.com download2.epicgames.com download3.epicgames.com download4.epicgames.com ;

sendfile on;
resolver 8.8.8.8 8.8.4.4;

access_log /var/log/nginx/epic-access.log;
error_log /var/log/nginx/epic-error.log error;

location / {
slice 1m;
proxy_cache epic;
proxy_cache_key $uri$slice_range; # $is_args$args
proxy_set_header Range $slice_range;
proxy_cache_valid 200 206 3000h;
proxy_pass http://$host;

proxy_ignore_headers Expires Cache-Control;

}
}
24 changes: 24 additions & 0 deletions hirez.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
proxy_cache_path /cache/hirez keys_zone=hirez:10m levels=1:2 inactive=100d max_size=50g;

server {
listen 80;
server_name hirez.http.internapcdn.net;

sendfile on;
resolver 8.8.8.8 8.8.4.4;

access_log /var/log/nginx/hirez-access.log;
error_log /var/log/nginx/hirez-error.log error;

location / {
slice 1m;
proxy_cache hirez;
proxy_cache_key $uri$slice_range; # $is_args$args
proxy_set_header Range $slice_range;
proxy_cache_valid 200 206 3000h;
proxy_pass http://$host;

proxy_ignore_headers Expires Cache-Control;

}
}
24 changes: 24 additions & 0 deletions microsoft.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
proxy_cache_path /cache/microsoft keys_zone=microsoft:10m levels=1:2 inactive=100d max_size=1000g;

server {
listen 80;
server_name *.download.windowsupdate.com download.windowsupdate.com dlassets.xboxlive.com *.xboxone.loris.llnwd.net xboxone.vo.llnwd.net images-eds.xboxlive.com xbox-mbr.xboxlive.com assets1.xboxlive.com.nsatc.net assets1.xboxlive.com;

sendfile on;
resolver 8.8.8.8 8.8.4.4;

access_log /var/log/nginx/microsoft-access.log;
error_log /var/log/nginx/microsoft-error.log error;

location / {
slice 1m;
proxy_cache microsoft;
proxy_cache_key $uri$slice_range; # $is_args$args
proxy_set_header Range $slice_range;
proxy_cache_valid 200 206 3000h;
proxy_pass http://$host;

proxy_ignore_headers Expires Cache-Control;

}
}
2 changes: 1 addition & 1 deletion origin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ proxy_cache_path /cache/origin keys_zone=origin:10m levels=1:2 inactive=100d max

server {
listen 80;
server_name origin-a.akamaihd.net ;
server_name origin-a.akamaihd.net akamai.cdn.ea.com lvlt.cdn.ea.com ;

sendfile on;
resolver 8.8.8.8 8.8.4.4;
Expand Down
24 changes: 24 additions & 0 deletions sony.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
proxy_cache_path /cache/sony keys_zone=sony:10m levels=1:2 inactive=100d max_size=1000g;

server {
listen 80;
server_name *.dl.playstation.net *.dl.playstation.net.edgesuite.net dl.playstation.net dl.playstation.net.edgesuite.net pls.patch.station.sony.com;

sendfile on;
resolver 8.8.8.8 8.8.4.4;

access_log /var/log/nginx/sony-access.log;
error_log /var/log/nginx/sony-error.log error;

location / {
slice 1m;
proxy_cache sony;
proxy_cache_key $uri$slice_range; # $is_args$args
proxy_set_header Range $slice_range;
proxy_cache_valid 200 206 3000h;
proxy_pass http://$host;

proxy_ignore_headers Expires Cache-Control;

}
}
4 changes: 2 additions & 2 deletions steam.conf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
proxy_cache_path /cache/steam keys_zone=steam:100m levels=1:2 inactive=100d max_size=400g;
proxy_cache_path /cache/steam keys_zone=steam:100m levels=1:2 inactive=100d max_size=1000g;


server {
listen 80;

sendfile on;
server_name ~^(content[0-9]+)\.steampowered\.com$ ~^.*\.cs\.steampowered\.com$ client-download.steampowered.com;
server_name ~^(content[0-9]+)\.steampowered\.com$ ~^.*\.cs\.steampowered\.com$ client-download.steampowered.com *.hsar.steampowered.com.edgesuite.net *.akamai.steamstatic.com content-origin.steampowered.com;
resolver 8.8.8.8 8.8.4.4;

access_log /var/log/nginx/steam-access.log;
Expand Down