Skip to content

Instantly share code, notes, and snippets.

@HuanMeng0
Last active July 16, 2016 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save HuanMeng0/a27464b591f9c7a010d460de31c94ff1 to your computer and use it in GitHub Desktop.
Save HuanMeng0/a27464b591f9c7a010d460de31c94ff1 to your computer and use it in GitHub Desktop.
cn.nytimes.com Nginx Proxy Conf
server {
server_name n1.bypassgfw.xyz;
listen 443;
ssl on;
ssl_certificate /root/.startapi.sh/g1.bypassgfw.xyz/g1.bypassgfw.xyz.cer;
ssl_certificate_key /root/.startapi.sh/g1.bypassgfw.xyz/g1.bypassgfw.xyz.key;
location / {
proxy_pass http://cn.nytimes.com/;
proxy_buffering off;
proxy_set_header Accept-Encoding "";
proxy_set_header Host cn.nytimes.com;
proxy_set_header X-Host cn.nytimes.com;
proxy_set_header X-NginX-Proxy true;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Referer http://$host;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header referer "http://cn.nytimes.com/$request_uri";
proxy_redirect off;
subs_filter_types text/css text/xml text/javascript;
subs_filter '纽约时报' '纽约时报镜像';
subs_filter http://cn.nytimes.com https://n1.bypassgfw.xyz ;
subs_filter http://static01.nyt.com https://s01.n1.bypassgfw.xyz ;
subs_filter http://up.nytimes.com https://up.n1.bypassgfw.xyz ;
subs_filter http://l0.cn.nytimes.com https://l0.n1.bypassgfw.xyz ;
}
}
server {
server_name s01.n1.bypassgfw.xyz;
listen 443;
ssl on;
ssl_certificate /root/.startapi.sh/s01.n1.bypassgfw.xyz/s01.n1.bypassgfw.xyz.cer;
ssl_certificate_key /root/.startapi.sh/s01.n1.bypassgfw.xyz/s01.n1.bypassgfw.xyz.key;
location / {
proxy_pass http://static01.nyt.com/;
proxy_buffering off;
proxy_set_header Accept-Encoding "";
proxy_set_header Host static01.nyt.com;
proxy_set_header X-Host static01.nyt.com;
proxy_set_header X-NginX-Proxy true;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Referer http://$host;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header referer "http://static01.nyt.com/$request_uri";
proxy_redirect off;
subs_filter_types text/css text/xml text/javascript;
subs_filter '纽约时报' '纽约时报镜像';
subs_filter http://cn.nytimes.com https://n1.bypassgfw.xyz ;
subs_filter http://static01.nyt.com https://s01.n1.bypassgfw.xyz ;
subs_filter http://up.nytimes.com https://up.n1.bypassgfw.xyz ;
subs_filter http://l0.cn.nytimes.com https://l0.n1.bypassgfw.xyz ;
}
}
server {
server_name up.n1.bypassgfw.xyz;
listen 443;
ssl on;
ssl_certificate /root/.startapi.sh/s01.n1.bypassgfw.xyz/s01.n1.bypassgfw.xyz.cer;
ssl_certificate_key /root/.startapi.sh/s01.n1.bypassgfw.xyz/s01.n1.bypassgfw.xyz.key;
location / {
proxy_pass http://up.nytimes.com/;
proxy_buffering off;
proxy_set_header Accept-Encoding "";
proxy_set_header Host up.nytimes.com;
proxy_set_header X-Host up.nytimes.com;
proxy_set_header X-NginX-Proxy true;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Referer http://$host;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header referer "http://up.nytimes.com/$request_uri";
proxy_redirect off;
subs_filter_types text/css text/xml text/javascript;
subs_filter '纽约时报' '纽约时报镜像';
subs_filter http://cn.nytimes.com https://n1.bypassgfw.xyz ;
subs_filter http://static01.nyt.com https://s01.n1.bypassgfw.xyz ;
subs_filter http://up.nytimes.com https://up.n1.bypassgfw.xyz ;
subs_filter http://l0.cn.nytimes.com https://l0.n1.bypassgfw.xyz ;
}
}
server {
server_name l0.n1.bypassgfw.xyz;
listen 443;
ssl on;
ssl_certificate /root/.startapi.sh/s01.n1.bypassgfw.xyz/s01.n1.bypassgfw.xyz.cer;
ssl_certificate_key /root/.startapi.sh/s01.n1.bypassgfw.xyz/s01.n1.bypassgfw.xyz.key;
location / {
proxy_pass http://l0.cn.nytimes.com/;
proxy_buffering off;
proxy_set_header Accept-Encoding "";
proxy_set_header Host up.nytimes.com;
proxy_set_header X-Host up.nytimes.com;
proxy_set_header X-NginX-Proxy true;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Referer http://$host;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header referer "http://l0.cn.nytimes.com/$request_uri";
proxy_redirect off;
subs_filter_types text/css text/xml text/javascript;
subs_filter '纽约时报' '纽约时报镜像';
subs_filter http://cn.nytimes.com https://n1.bypassgfw.xyz ;
subs_filter http://static01.nyt.com https://s01.n1.bypassgfw.xyz ;
subs_filter http://up.nytimes.com https://up.n1.bypassgfw.xyz ;
subs_filter http://l0.cn.nytimes.com https://l0.n1.bypassgfw.xyz ;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment