Update i.pximg.net proxy

This commit is contained in:
mashirozx 2021-01-24 17:44:59 +08:00
parent a892ef014c
commit 20cdd42069
3 changed files with 105 additions and 106 deletions

View File

@ -1,34 +1,31 @@
#user nobody; #user nobody;
worker_processes 1; worker_processes 1;
#error_log logs/error.log; #error_log logs/error.log;
#error_log logs/error.log notice; #error_log logs/error.log notice;
#error_log logs/error.log info; #error_log logs/error.log info;
#pid logs/nginx.pid; #pid logs/nginx.pid;
events { events {
worker_connections 1024; worker_connections 1024;
} }
http { http {
include mime.types; include mime.types;
default_type application/octet-stream; default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" ' #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" ' # '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"'; # '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main; #access_log logs/access.log main;
sendfile on;
sendfile on;
#tcp_nopush on; #tcp_nopush on;
#keepalive_timeout 0; #keepalive_timeout 0;
keepalive_timeout 65; keepalive_timeout 65;
client_max_body_size 100m; client_max_body_size 100m;
server_names_hash_max_size 512; server_names_hash_max_size 512;
server_names_hash_bucket_size 1024; server_names_hash_bucket_size 1024;

View File

@ -112,13 +112,15 @@ server {
ssl_certificate_key ca/pixiv.net.key; ssl_certificate_key ca/pixiv.net.key;
location / { location / {
proxy_pass https://i-pximg-net; rewrite ^/(.*)$ https://i.pixiv.cat/$1 redirect;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # proxy_pass https://i-pximg-net;
proxy_set_header X-Real_IP $remote_addr; # proxy_set_header Host $http_host;
proxy_set_header User-Agent $http_user_agent; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding ''; # proxy_set_header X-Real_IP $remote_addr;
proxy_buffering off; # proxy_set_header User-Agent $http_user_agent;
# proxy_set_header Accept-Encoding '';
# proxy_buffering off;
} }
} }
@ -264,7 +266,7 @@ server {
ssl_certificate_key ca/pixiv.net.key; ssl_certificate_key ca/pixiv.net.key;
location ^~ /recaptcha/ { location ^~ /recaptcha/ {
rewrite ^(.*)$ https://www.recaptcha.net$1 break; rewrite ^(.*)$ https://www.recaptcha.net$1 break;
} }
location / { location / {
@ -275,10 +277,10 @@ server {
} }
upstream wikipedia-text-lb { upstream wikipedia-text-lb {
server 208.80.153.224:443; server 208.80.153.224:443;
#server 208.80.154.224:443; #server 208.80.154.224:443;
server 91.198.174.192:443; server 91.198.174.192:443;
#server 103.102.166.224:443; #server 103.102.166.224:443;
} }
server { server {
@ -319,10 +321,10 @@ server {
} }
} }
upstream wikipedia-upload-lb { upstream wikipedia-upload-lb {
server 208.80.153.240:443; server 208.80.153.240:443;
server 208.80.154.240:443; server 208.80.154.240:443;
server 91.198.174.208:443; server 91.198.174.208:443;
server 103.102.166.240:443; server 103.102.166.240:443;
} }
server { server {
@ -381,7 +383,7 @@ server {
proxy_buffering off; proxy_buffering off;
} }
} }
server { server {
listen 443 ssl; listen 443 ssl;
server_name *.archiveofourown.org; server_name *.archiveofourown.org;
server_name archiveofourown.org; server_name archiveofourown.org;
@ -422,12 +424,12 @@ server {
} }
upstream exhentai-lb { upstream exhentai-lb {
server 178.175.128.252:443; server 178.175.128.252:443;
server 178.175.128.254:443; server 178.175.128.254:443;
server 178.175.129.252:443; server 178.175.129.252:443;
server 178.175.129.254:443; server 178.175.129.254:443;
server 178.175.132.20:443; server 178.175.132.20:443;
server 178.175.132.22:443; server 178.175.132.22:443;
} }
server { server {
@ -450,8 +452,8 @@ server {
} }
upstream e-hentai-lb { upstream e-hentai-lb {
server 104.20.26.25:443; server 104.20.26.25:443;
server 104.20.27.25:443; server 104.20.27.25:443;
} }
server { server {

View File

@ -1 +1 @@
2948 5812