update invidious config and backends
This commit is contained in:
parent
4edef5863b
commit
eb677a5958
3 changed files with 6 additions and 94 deletions
|
@ -2,39 +2,9 @@ upstream php-fpm-8.3 {
|
|||
server unix:/run/php-fpm/php-fpm.sock;
|
||||
}
|
||||
|
||||
lua_shared_dict servers 12k;
|
||||
upstream inv {
|
||||
keepalive 128;
|
||||
server 127.0.0.1:11101;
|
||||
# server 127.0.0.1:11102;
|
||||
# server 127.0.0.1:11103;
|
||||
# server 127.0.0.1:11104;
|
||||
# server 127.0.0.1:11105;
|
||||
# balancer_by_lua_file "conf/lua/invidious-balancer.lua";
|
||||
}
|
||||
|
||||
upstream invidious-1 {
|
||||
keepalive 32;
|
||||
server 127.0.0.1:11101;
|
||||
}
|
||||
|
||||
upstream invidious-2 {
|
||||
keepalive 32;
|
||||
server 127.0.0.1:11102;
|
||||
}
|
||||
|
||||
upstream invidious-3 {
|
||||
keepalive 32;
|
||||
server 127.0.0.1:11103;
|
||||
}
|
||||
|
||||
upstream invidious-4 {
|
||||
keepalive 32;
|
||||
server 127.0.0.1:11104;
|
||||
}
|
||||
|
||||
upstream invidious-5 {
|
||||
keepalive 32;
|
||||
server 127.0.0.1:11105;
|
||||
}
|
||||
|
||||
upstream inv-feed-receiver {
|
||||
|
|
|
@ -1,18 +1,3 @@
|
|||
map $host $invidious_backend {
|
||||
default inv;
|
||||
inv1.nadeko.net invidious-1;
|
||||
inv2.nadeko.net invidious-2;
|
||||
inv3.nadeko.net invidious-3;
|
||||
inv4.nadeko.net invidious-4;
|
||||
inv5.nadeko.net invidious-5;
|
||||
}
|
||||
|
||||
# map $invidious_backend $cache_case {
|
||||
# default "";
|
||||
# inv $cookie_INVIDIOUS_SERVER_ID;
|
||||
# invidious-* $invidious_backend;
|
||||
# }
|
||||
|
||||
# CLEARNET TOR AND I2P
|
||||
# (Tor and I2P listens on 4080, defined on configs/listen.conf)
|
||||
server {
|
||||
|
@ -20,13 +5,12 @@ server {
|
|||
server_name
|
||||
inv.nadeko.net
|
||||
~^inv([1-5])\.nadeko\.net$
|
||||
inv.nadekonw7plitnjuawu6ytjsl7jlglk2t6pyq6eftptmiv3dvqndwvyd.onion ~^inv([1-5])\.nadekonw7plitnjuawu6ytjsl7jlglk2t6pyq6eftptmiv3dvqndwvyd\.onion$;
|
||||
inv.nadekonw7plitnjuawu6ytjsl7jlglk2t6pyq6eftptmiv3dvqndwvyd.onion
|
||||
~^inv([1-5])\.nadekonw7plitnjuawu6ytjsl7jlglk2t6pyq6eftptmiv3dvqndwvyd\.onion$;
|
||||
include configs/listen.conf;
|
||||
include configs/robotsNone.conf;
|
||||
include configs/asn-ban.conf;
|
||||
include configs/manual-ip-ban.conf;
|
||||
# MAINTENANCE MODE
|
||||
# include configs/maintenance-mode.conf;
|
||||
|
||||
# The messed up invidious configuration
|
||||
include http.d/locations/inv.conf;
|
||||
|
@ -42,19 +26,9 @@ server {
|
|||
";
|
||||
}
|
||||
|
||||
if ($ssl_cipher = "ECDHE-ECDSA-CHACHA20-POLY1305") {
|
||||
return 444;
|
||||
}
|
||||
#
|
||||
# if ($http_user_agent = "") {
|
||||
# return 444;
|
||||
# }
|
||||
|
||||
error_page 502 /502.html;
|
||||
error_page 503 /503.html;
|
||||
|
||||
#rewrite_by_lua_file conf/lua/rewrite-invidious/init.lua;
|
||||
|
||||
location = /503.html {
|
||||
content_by_lua_file conf/lua/503-invidious.lua;
|
||||
}
|
||||
|
@ -62,10 +36,6 @@ server {
|
|||
location = /502.html {
|
||||
content_by_lua_file conf/lua/502-invidious.lua;
|
||||
}
|
||||
|
||||
# location = /switchbackend {
|
||||
# content_by_lua_file conf/lua/switchbackend.lua;
|
||||
# }
|
||||
}
|
||||
|
||||
# CLEARNET FEED
|
||||
|
@ -76,7 +46,7 @@ server {
|
|||
include configs/listen.conf;
|
||||
include configs/robotsNone.conf;
|
||||
|
||||
# The messed up invidious configuration
|
||||
# The messed up invidious configuration
|
||||
include http.d/locations/inv-feed.conf;
|
||||
}
|
||||
|
||||
|
@ -91,22 +61,3 @@ server {
|
|||
include configs/proxy.conf;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
server_name inv-cl1.nadeko.net;
|
||||
include configs/listen.conf;
|
||||
include configs/robotsNone.conf;
|
||||
|
||||
location / {
|
||||
limit_rate 4000k;
|
||||
proxy_pass http://http3-ytproxy-backend1;
|
||||
include configs/proxy.conf;
|
||||
sendfile_max_chunk 512k;
|
||||
tcp_nopush on;
|
||||
aio threads=default;
|
||||
aio_write on;
|
||||
directio 16m;
|
||||
proxy_hide_header Cache-Control;
|
||||
add_header Cache-Control private always;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# configs/proxy.conf contains the directive to pass the Host header to Invidious
|
||||
|
||||
location @upstream {
|
||||
proxy_pass http://$invidious_backend;
|
||||
proxy_pass http://inv;
|
||||
include configs/proxy.conf;
|
||||
proxy_intercept_errors on;
|
||||
limit_rate 1000k;
|
||||
|
@ -62,7 +62,7 @@ location /watch_ajax {
|
|||
}
|
||||
|
||||
location /watch {
|
||||
proxy_pass http://$invidious_backend;
|
||||
proxy_pass http://inv;
|
||||
include configs/proxy.conf;
|
||||
limit_rate 1000k;
|
||||
|
||||
|
@ -80,7 +80,6 @@ location /feed/playlist {
|
|||
}
|
||||
|
||||
# API #
|
||||
|
||||
location /api/v1 {
|
||||
limit_req zone=invidious-apirl nodelay burst=100;
|
||||
try_files $uri @upstream;
|
||||
|
@ -96,11 +95,3 @@ location ~ ^/api/v1/(videos|channels|search|mixes|trending) {
|
|||
location /api/v1/comments {
|
||||
try_files $uri @upstream;
|
||||
}
|
||||
|
||||
location /api/v1/auth/notifications {
|
||||
return 403 "Endpoint disabled";
|
||||
}
|
||||
|
||||
location /api/v1/auth/subscriptions {
|
||||
return 403 "Endpoint disabled";
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue