Created
September 5, 2019 16:50
-
-
Save tabjy/c30f664e4af81b578442f7aa64e75827 to your computer and use it in GitHub Desktop.
Dockerfile for Netease music reverse proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"code":200,"uwp":1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=STATIC:10m inactive=24h max_size=1g; | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name music.163.com; | |
location /weapi/feedback/weblog { | |
add_header Set-Cookie "os=uwp; path=/"; | |
error_page 405 = $uri; | |
alias /163-uwp.json; | |
} | |
location / { | |
proxy_redirect off; | |
proxy_pass http://music.163.com/; | |
# Hint: http://bgp.he.net/AS45102#_prefixes | |
proxy_set_header X-Real-IP 47.100.168.225; | |
proxy_cache STATIC; | |
proxy_cache_valid 200 1d; | |
proxy_cache_use_stale error timeout invalid_header updating | |
http_500 http_502 http_503 http_504; | |
} | |
} | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name ip.ws.126.net; | |
location /ipquery { | |
alias /ipquery.txt; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nginx:latest | |
EXPOSE 80 | |
ADD default.conf /etc/nginx/conf.d/default.conf | |
ADD ipquery.txt /ipquery.txt | |
ADD 163-uwp.json /163-uwp.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// XXX: save as GBK encoding! | |
var lo="广东省", lc="广州市"; | |
var localAddress={city:"广州市", province:"广东省"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment