131 lines
2.9 KiB
Plaintext
131 lines
2.9 KiB
Plaintext
upstream debuginv{
|
|
server 127.0.0.1:40050 max_fails=2 fail_timeout=2s;
|
|
}
|
|
|
|
upstream http3-ytproxy-debug {
|
|
server 127.0.0.1:8080 max_fails=2 fail_timeout=1s;
|
|
}
|
|
|
|
# CLEARNET
|
|
server {
|
|
access_log /var/log/nginx/debuginv.access.log;
|
|
error_log /var/log/nginx/debuginv.error.log;
|
|
server_name debuginv.zzls.xyz;
|
|
include configs/general.conf;
|
|
include configs/robotsNone.conf;
|
|
# SECURITY HEADERS ADDED BY Invidious
|
|
# include configs/security.conf;
|
|
|
|
location @upstream {
|
|
proxy_pass http://debuginv;
|
|
include configs/proxy.conf;
|
|
limit_rate 1000k;
|
|
# Disable buffering and cache so i don't kill my
|
|
# SSD and bandwidth usage
|
|
proxy_buffering off;
|
|
proxy_request_buffering off;
|
|
proxy_cache off;
|
|
}
|
|
|
|
error_page 502 /502.html;
|
|
|
|
# location ~ (^/videoplayback|^/vi/|^/ggpht/|^/sb/) {
|
|
# access_log /var/log/nginx/debuginv-proxy.access.log;
|
|
# error_log /var/log/nginx/debuginv-proxy.error.log;
|
|
# # Woops! Sorry. I don't want to kill my SSD lol!
|
|
# proxy_buffering off;
|
|
# #proxy_buffers 1024 16k;
|
|
# proxy_set_header X-Forwarded-For "";
|
|
# proxy_hide_header "alt-svc";
|
|
# sendfile_max_chunk 512k;
|
|
# proxy_hide_header Cache-Control;
|
|
# proxy_hide_header etag;
|
|
# proxy_http_version 1.1;
|
|
# proxy_intercept_errors on;
|
|
# proxy_set_header Connection keep-alive;
|
|
# proxy_max_temp_file_size 32m;
|
|
# proxy_pass http://http3-ytproxy-debug;
|
|
# add_header Cache-Control private always;
|
|
# limit_rate 6000k;
|
|
# }
|
|
location ~ (^/videoplayback) {
|
|
access_log /var/log/nginx/debuginv-proxy.access.log;
|
|
error_log /var/log/nginx/debuginv-proxy.error.log;
|
|
# Woops! Sorry. I don't want to kill my SSD lol!
|
|
proxy_buffering off;
|
|
#proxy_buffers 1024 16k;
|
|
proxy_set_header X-Forwarded-For "";
|
|
proxy_hide_header "alt-svc";
|
|
sendfile_max_chunk 512k;
|
|
proxy_hide_header Cache-Control;
|
|
proxy_hide_header etag;
|
|
proxy_http_version 1.1;
|
|
proxy_intercept_errors on;
|
|
proxy_set_header Connection keep-alive;
|
|
proxy_max_temp_file_size 32m;
|
|
proxy_pass http://http3-ytproxy-debug;
|
|
add_header Cache-Control private always;
|
|
limit_rate 6000k;
|
|
}
|
|
|
|
|
|
location / {
|
|
try_files $uri @upstream;
|
|
}
|
|
|
|
location /search {
|
|
try_files $uri @upstream;
|
|
}
|
|
|
|
location /api/v1/ {
|
|
try_files $uri @upstream;
|
|
}
|
|
|
|
location /api/v1/storyboards {
|
|
try_files $uri @upstream;
|
|
}
|
|
|
|
location /api/v1/captions {
|
|
try_files $uri @upstream;
|
|
}
|
|
|
|
location /api/v1/comments {
|
|
try_files $uri @upstream;
|
|
}
|
|
|
|
location ~ ^/api/v1/channels/(.+)/shorts {
|
|
try_files $uri @upstream;
|
|
}
|
|
|
|
location = /502.html {
|
|
alias /etc/nginx/errors/502;
|
|
index index.html;
|
|
}
|
|
|
|
# QUIC
|
|
include configs/http3.conf;
|
|
|
|
# TOR
|
|
add_header Onion-Location http://debuginvzzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion$request_uri;
|
|
|
|
listen 443 ssl;
|
|
http2 on;
|
|
include configs/ssl.conf;
|
|
|
|
}
|
|
|
|
server {
|
|
set $x "";
|
|
if ($host = debuginv.zzls.xyz) {
|
|
set $x 1;
|
|
}
|
|
if ($host = debuginv.nadeko.net) {
|
|
set $x 1;
|
|
}
|
|
if ($x = 1) {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
listen 80;
|
|
server_name debuginv.zzls.xyz;
|
|
}
|