Pixiv-Nginx/conf/pixiv.conf

146 lines
4.2 KiB
Plaintext
Raw Normal View History

upstream pixiv {
server 210.140.131.200:443;
server 210.140.131.202:443;
server 210.140.131.220:443;
2020-09-16 10:45:41 +08:00
server 210.140.131.223:443;
server 210.140.131.226:443;
}
server {
2021-01-24 17:44:59 +08:00
listen 80 default_server;
rewrite ^(.*) https://$host$1 permanent;
}
server {
listen 443 ssl;
server_name forums.e-hentai.org;
2021-01-24 17:44:59 +08:00
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
2021-01-24 17:44:59 +08:00
client_max_body_size 50M;
2021-01-24 17:44:59 +08:00
location / {
proxy_pass https://94.100.18.243:443;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
2021-01-24 17:44:59 +08:00
proxy_set_header Accept-Encoding '';
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name pixiv.net;
server_name ssl.pixiv.net;
server_name accounts.pixiv.net;
server_name touch.pixiv.net;
server_name oauth.secure.pixiv.net;
server_name www.pixiv.net;
server_name app-api.pixiv.net;
2021-01-24 17:44:59 +08:00
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
2021-01-24 17:44:59 +08:00
client_max_body_size 50M;
2021-01-24 17:44:59 +08:00
location / {
# cloudflare代理需要SNIIP需要指定为非cloudflare
proxy_pass https://pixiv;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
2021-01-24 17:44:59 +08:00
proxy_set_header Accept-Encoding '';
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name sketch.pixiv.net;
resolver 101.6.6.6:5353 valid=300s ipv6=on;
ssl_certificate ca/pixiv.net.pem;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://$http_host;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
2021-01-24 17:44:59 +08:00
proxy_set_header Accept-Encoding '';
proxy_buffering off;
}
2021-01-24 17:44:59 +08:00
# Proxying WebSockets
location /ws/ {
proxy_pass https://$http_host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
}
2020-09-16 10:45:41 +08:00
server {
listen 443 ssl;
server_name www.google.com;
2021-01-24 17:44:59 +08:00
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
2021-01-24 17:44:59 +08:00
location ^~ /recaptcha/ {
2021-01-24 17:44:59 +08:00
rewrite ^(.*)$ https://www.recaptcha.net$1 break;
}
2021-01-24 17:44:59 +08:00
location / {
default_type text/html;
charset utf-8;
return 200 'Pixiv-Nginx提醒本工具默认代理了www.google.com用于加载P站登陆时的验证码插件如果你有方法正常访问www.google.com并且不希望看到这个页面那么将 <code>C:\Windows\System32\drivers\etc\hosts</code> 中 <code>127.0.0.1 www.google.com</code> 的那行记录删除即可。如果删除后刷新网页还是看到这个页面,请先清除一下浏览器缓存。';
}
}
server {
listen 443 ssl;
server_name *.steamcommunity.com;
server_name steamcommunity.com;
server_name *.steampowered.com;
server_name steampowered.com;
server_name *.archiveofourown.org;
server_name archiveofourown.org;
server_name nyaa.si;
server_name *.nyaa.si;
server_name *.wikimedia.org;
server_name wikimedia.org;
server_name *.wikipedia.org;
server_name *.m.wikipedia.org;
server_name *.pixivsketch.net;
server_name *.pximg.net;
server_name *.pixiv.net;
2021-10-23 17:18:01 +08:00
server_name exhentai.org;
server_name *.exhentai.org;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
2021-01-24 17:44:59 +08:00
location / {
# 无污染DNS解析无需显式指定IP
resolver 101.6.6.6:5353 valid=300s;
proxy_pass https://$http_host$1;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
2021-01-24 17:44:59 +08:00
proxy_set_header Accept-Encoding '';
proxy_buffering off;
}
}