Ok this is so retarded please time to go back to conf.d

This commit is contained in:
Fijxu 2023-12-21 04:05:09 -03:00
parent 95bf048921
commit e15b52f09e
64 changed files with 898 additions and 8 deletions

View File

@ -0,0 +1,98 @@
limit_req_zone $binary_remote_addr zone=4get:10m rate=4r/s;
# CLEARNET
server {
access_log /var/log/nginx/4get.access.log limited;
error_log /var/log/nginx/4get.error.log;
server_name 4get.zzls.xyz;
root /var/www/4get-zzls;
include configs/general.conf;
include configs/robotsNone.conf;
include configs/security.conf;
location @upstream {
try_files $uri.php $uri/index.php =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_intercept_errors on;
}
location ~* ^(.*)\.php$ {
return 301 $1;
}
location / {
try_files $uri @upstream;
}
location /web {
try_files $uri @upstream;
limit_req zone=4get nodelay;
limit_req_status 429;
if ($server_protocol ~* "HTTP/1.1") {
return 444;
}
include snippets/torblacklist.conf;
error_page 403 =302 /torisblocked;
error_page 429 =302 /rl;
}
location /torisblocked {
alias errors/$request_uri;
}
location /rl {
alias errros/$request_uri;
}
location /data {
return 444;
}
# Tor Header
add_header Onion-Location http://4get.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion$request_uri;
# QUIC
include configs/http3.conf;
listen 443 ssl;
http2 on;
include configs/ssl.conf;
}
# TOR
server {
listen 80;
server_name 4get.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion;
root /var/www/4get;
location @upstream {
try_files $uri.php $uri/index.php =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_intercept_errors on;
}
location / {
try_files $uri @upstream;
}
location ~* ^(.*)\.php$ {
return 301 $1;
}
}
server {
if ($host = 4get.zzls.xyz) {
return 301 https://$host$request_uri;
}
listen 80;
server_name 4get.zzls.xyz;
}

View File

@ -0,0 +1,98 @@
limit_req_zone $binary_remote_addr zone=4get:10m rate=4r/s;
# CLEARNET
server {
access_log /var/log/nginx/4get.access.log limited;
error_log /var/log/nginx/4get.error.log;
server_name 4get.zzls.xyz;
root /var/www/4get-zzls;
include configs/general.conf;
include configs/robotsNone.conf;
include configs/security.conf;
location @upstream {
try_files $uri.php $uri/index.php =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_intercept_errors on;
}
location ~* ^(.*)\.php$ {
return 301 $1;
}
location / {
try_files $uri @upstream;
}
location /web {
try_files $uri @upstream;
limit_req zone=4get nodelay;
limit_req_status 429;
if ($server_protocol ~* "HTTP/1.1") {
return 444;
}
include snippets/torblacklist.conf;
error_page 403 =302 /torisblocked;
error_page 429 =302 /rl;
}
location /torisblocked {
alias errors/$request_uri;
}
location /rl {
alias errros/$request_uri;
}
location /data {
return 444;
}
# Tor Header
add_header Onion-Location http://4get.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion$request_uri;
# QUIC
include configs/http3.conf;
listen 443 ssl;
http2 on;
include configs/ssl.conf;
}
# TOR
server {
listen 80;
server_name 4get.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion;
root /var/www/4get;
location @upstream {
try_files $uri.php $uri/index.php =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_intercept_errors on;
}
location / {
try_files $uri @upstream;
}
location ~* ^(.*)\.php$ {
return 301 $1;
}
}
server {
if ($host = 4get.zzls.xyz) {
return 301 https://$host$request_uri;
}
listen 80;
server_name 4get.zzls.xyz;
}

View File

@ -0,0 +1,66 @@
limit_req_zone $binary_remote_addr zone=one:10m rate=2r/s;
upstream inv-debug {
server 127.0.0.1:40050;
}
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;
location / {
proxy_pass http://inv-debug;
include configs/proxy.conf;
limit_rate 12000k;
# Disable buffering and cache so i don't kill my
# SSD and bandwidth usage
proxy_buffering off;
proxy_request_buffering off;
proxy_cache off;
proxy_intercept_errors on;
error_page 502 = @fallback;
}
location ~ ^/api/ {
proxy_pass http://inv-debug;
include configs/proxy.conf;
limit_rate 12000k;
# Disable buffering and cache so i don't kill my
# SSD and bandwidth usage
proxy_buffering off;
proxy_request_buffering off;
proxy_cache off;
limit_req zone=one;
}
location ~ (^/videoplayback|^/vi/|^/ggpht/|^/sb/) {
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_set_header Connection keep-alive;
proxy_max_temp_file_size 32m;
access_log /var/log/nginx/http3-ytproxy.log;
proxy_pass http://unix:/opt/http3-ytproxy/socket/http-proxy-1.sock;
add_header Cache-Control private always;
}
location @fallback {
root /etc/nginx/errors;
try_files $uri /502.html =502;
}
# QUIC
include configs/http3.conf;
listen 443 ssl;
http2 on;
include configs/ssl.conf;
}

View File

@ -6,9 +6,6 @@ include /etc/nginx/modules-enabled/*.conf;
load_module /usr/lib/nginx/modules/ngx_http_brotli_filter_module.so; # for compressing responses on-the-fly
load_module /usr/lib/nginx/modules/ngx_http_brotli_static_module.so; # for serving pre-compressed files
#Include external config
include /etc/nginx/conf.d/*.conf;
events {
worker_connections 4096;
multi_accept on;
@ -68,7 +65,5 @@ http {
include /etc/nginx/snippets/maps.conf;
include /etc/nginx/snippets/poop.conf;
# Virtual Host Configs
include /etc/nginx/sites-enabled/*.conf;
include /etc/nginx/conf.d/*.conf;
}

View File

@ -0,0 +1,106 @@
limit_req_zone $binary_remote_addr zone=4get:10m rate=4r/s;
# CLEARNET
server {
access_log /var/log/nginx/4get.access.log;
error_log /var/log/nginx/4get.error.log;
server_name debug4get.zzls.xyz;
root /var/www/4get-zzls;
include configs/general.conf;
include configs/robotsNone.conf;
include configs/security.conf;
location @upstream {
try_files $uri.php $uri/index.php =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_intercept_errors on;
}
location ~* ^(.*)\.php$ {
return 301 $1;
}
location / {
try_files $uri @upstream;
}
location /web {
try_files $uri @upstream;
limit_req zone=4get nodelay;
limit_req_status 429;
if ($server_protocol ~* "HTTP/1.1") {
return 444;
}
include snippets/torblacklist.conf;
error_page 403 =302 /torisblocked;
error_page 429 =302 /rl;
}
location /torisblocked {
add_header Content-Type text/plain;
return 200 "
Tor and Proxies are not allowed in this service, sorry.
Check if this service offers a Tor version instead, if yes, use it, if not, well, there is no way to use this service.
Tor y Proxies no estan permitidos en este servicio, lo siento.
Revisa si este servicio ofrece una version para Tor, si es asi, usalo, si no, pues no hay forma de usar este servicio.";
}
location /rl {
add_header Content-Type text/plain;
return 200 "Rate Limited, don't spam searches to prevent errors";
}
location /data {
return 444;
}
# Tor Header
add_header Onion-Location http://4get.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion$request_uri;
# QUIC
add_header Alt-Svc 'h3=":443";ma=86400';
listen 443 ssl;
listen 443 quic;
http2 on;
include configs/ssl.conf;
}
# TOR
server {
listen 80;
server_name 4get.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion;
root /var/www/4get;
location @upstream {
try_files $uri.php $uri/index.php =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_intercept_errors on;
}
location / {
try_files $uri @upstream;
}
location ~* ^(.*)\.php$ {
return 301 $1;
}
}
server {
if ($host = 4get.zzls.xyz) {
return 301 https://$host$request_uri;
}
listen 80;
server_name 4get.zzls.xyz;
}

View File

@ -0,0 +1,57 @@
server {
access_log /var/log/nginx/ayaya.beauty.access.log combined;
error_log /var/log/nginx/ayaya.beauty.error.log;
server_name ayaya.beauty;
include configs/general.conf;
include configs/security.conf;
include configs/robotsNone.conf;
include snippets/torblacklist.conf;
root /var/www/uguu/dist/public/;
autoindex off;
index index.html index.php;
client_max_body_size 512M;
location ~* \.(css|js|jpg|jpeg|gif|png|ico|xml|eot|woff|woff2|ttf|svg|otf|x-icon|avif|webp|apng)$ {
expires 7d;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_intercept_errors on;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location /torisblocked {
alias errors/torisblocked.txt;
}
error_page 403 =302 /torisblocked;
# QUIC
include configs/http3.conf;
listen 443 ssl;
http2 on;
ssl_certificate /etc/letsencrypt/live/ayaya.beauty/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ayaya.beauty/privkey.pem;
include configs/sslConfig.conf;
}
server {
if ($host = ayaya.beauty) {
return 301 https://$host$request_uri;
}
listen 80;
server_name ayaya.beauty;
return 404;
}

View File

@ -5,7 +5,7 @@ limit_req_zone $binary_remote_addr zone=debug-4get:10m rate=1r/s;
server {
access_log /var/log/nginx/debug-4get.access.log;
error_log /var/log/nginx/debug-4get.error.log;
server_name debug-4get.zzls.xyz;
server_name debug4get.zzls.xyz;
root /var/www/4get;
include configs/general.conf;
include configs/robotsNone.conf;

View File

@ -0,0 +1,33 @@
upstream forgejo {
server unix:/run/forgejo/forgejo.sock;
}
server {
access_log /var/log/nginx/git.access.log combined;
server_name git.zzls.xyz;
include configs/general.conf;
include configs/security.conf;
include configs/robots.conf;
location / {
proxy_pass http://forgejo;
include configs/proxy.conf;
client_max_body_size 128M;
}
# QUIC
include configs/http3.conf;
listen 443 ssl;
http2 on;
include configs/ssl.conf;
}
server {
if ($host = git.zzls.xyz) {
return 301 https://$host$request_uri;
}
listen 80;
server_name git.zzls.xyz;
}

View File

@ -0,0 +1,37 @@
server {
access_log /var/log/nginx/i.ayaya.beauty.access.log;
server_name i.ayaya.beauty;
include configs/general.conf;
include configs/security.conf;
include configs/robotsNone.conf;
root /mnt/ssd/i.ayaya.beauty/;
autoindex off;
index index.html;
location / {
rewrite ^/(.*)/$ /\$1 break;
try_files $uri $uri.jpg $uri.png $uri.gif $uri.css $uri.js $uri/ =404;
error_page 401 402 403 404 =301 https://ayaya.beauty;
}
# QUIC
include configs/http3.conf;
listen 443 ssl;
http2 on;
ssl_certificate /etc/letsencrypt/live/i.ayaya.beauty/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/i.ayaya.beauty/privkey.pem;
include configs/sslConfig.conf;
}
server {
if ($host = i.ayaya.beauty) {
return 301 https://$host$request_uri;
}
listen 80;
server_name i.ayaya.beauty;
return 404;
}

View File

@ -0,0 +1,193 @@
# Rate limit searches, just 5 per sec
limit_req_zone $binary_remote_addr zone=invidious:10m rate=5r/s;
# Rate limit api requests, just 60 per sec, wathcing a normal video does like
# 10 to 30 api requests so you don't need more than 30 in a second unless is a bot spamming shit lol
limit_req_zone $binary_remote_addr zone=invidiousapi:10m rate=40r/s;
upstream inv {
server 127.0.0.1:40015 max_fails=2 fail_timeout=2s;
server 127.0.0.1:40016 max_fails=2 fail_timeout=2s;
server 127.0.0.1:40017 max_fails=2 fail_timeout=2s;
}
upstream http3-ytproxy {
server unix:/opt/http3-ytproxy/socket/http-proxy-1.sock max_fails=2 fail_timeout=1s;
server unix:/opt/http3-ytproxy/socket/http-proxy-2.sock max_fails=2 fail_timeout=1s;
server unix:/opt/http3-ytproxy/socket/http-proxy-3.sock max_fails=2 fail_timeout=1s;
}
# CLEARNET
server {
access_log /var/log/nginx/inv.access.log limited;
error_log /var/log/nginx/inv.error.log;
server_name inv.zzls.xyz;
include configs/general.conf;
include configs/robotsNone.conf;
# SECURITY HEADERS ADDED BY Invidious
# include configs/security.conf;
location @upstream {
proxy_pass http://inv;
include configs/proxy.conf;
limit_rate 8000k;
# Disable buffering and cache so i don't kill my
# SSD and bandwidth usage
proxy_buffering off;
proxy_request_buffering off;
proxy_cache off;
proxy_intercept_errors on;
error_page 502 = @fallback;
}
location ~ (^/videoplayback|^/vi/|^/ggpht/|^/sb/) {
# 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_set_header Connection keep-alive;
proxy_max_temp_file_size 32m;
proxy_pass http://http3-ytproxy;
add_header Cache-Control private always;
}
location / {
try_files $uri @upstream;
}
location /search {
try_files $uri @upstream;
}
location /api {
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 @fallback {
root /etc/nginx/errors;
try_files $uri /502.html = 502;
}
# QUIC
include configs/http3.conf;
# TOR
add_header Onion-Location http://inv.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion$request_uri;
listen 443 ssl;
http2 on;
include configs/ssl.conf;
}
# TOR
server {
listen 80;
server_name inv.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion;
include configs/general.conf;
include configs/robotsNone.conf;
location @upstream {
proxy_pass http://inv;
include configs/proxy.conf;
limit_rate 8000k;
# Disable buffering and cache so i don't kill my
# SSD and bandwidth usage
proxy_buffering off;
proxy_request_buffering off;
proxy_cache off;
proxy_intercept_errors on;
}
location ~ (^/videoplayback|^/vi/|^/ggpht/|^/sb/) {
# 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_set_header Connection keep-alive;
proxy_max_temp_file_size 32m;
proxy_pass http://http3-ytproxy;
add_header Cache-Control private always;
}
location / {
try_files $uri @upstream;
}
}
# I2P
server {
listen 30003;
server_name zzlsbhhfvwg3oh36tcvx4r7n6jrw7zibvyvfxqlodcwn3mfrvzuq.b32.i2p;
include configs/general.conf;
include configs/robotsNone.conf;
location @upstream {
proxy_pass http://inv;
include configs/proxy.conf;
limit_rate 8000k;
# Disable buffering and cache so i don't kill my
# SSD and bandwidth usage
proxy_buffering off;
proxy_request_buffering off;
proxy_cache off;
proxy_intercept_errors on;
error_page 502 = @fallback;
}
location ~ (^/videoplayback|^/vi/|^/ggpht/|^/sb/) {
# 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_set_header Connection keep-alive;
proxy_max_temp_file_size 32m;
proxy_pass http://http3-ytproxy;
add_header Cache-Control private always;
}
location / {
try_files $uri @upstream;
}
}
server {
if ($host = inv.zzls.xyz) {
return 301 https://$host$request_uri;
}
listen 80;
server_name inv.zzls.xyz;
}

View File

@ -0,0 +1,46 @@
server {
server_name matrix.zzls.xyz;
include configs/general.conf;
include configs/robotsNone.conf;
include configs/security.conf;
location /.well-known/matrix/server {
return 200 '{ "m.server": "matrix.zzls.xyz:8448" }';
}
location /.well-known/matrix/client {
default_type application/json;
add_header Access-Control-Allow-Origin '*';
return 200 '{ "m.homeserver": { "base_url": "https://matrix.zzls.xyz" }, "org.matrix.msc3575.proxy": {"url": "https://matrix.zzls.xyz"}}';
}
#location ~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/sync) {
# proxy_pass http://127.0.0.1:40022;
# proxy_set_header X-Forwarded-For $remote_addr;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_set_header Host $host;
#}
location ~ ^(/_matrix|/_synapse/client|/health) {
proxy_pass http://127.0.0.1:40020;
include configs/proxy.conf;
client_max_body_size 64M;
}
# QUIC
include configs/http3.conf;
listen 443 ssl reuseport;
listen 8448 ssl default_server reuseport;
listen 8448 quic default_server reuseport;
include configs/ssl.conf;
http2 on;
}
server {
if ($host = matrix.zzls.xyz) {
return 301 https://$host$request_uri;
}
listen 80;
server_name matrix.zzls.xyz;
}

View File

@ -0,0 +1,26 @@
server {
server_name pbin.zzls.xyz;
include configs/general.conf;
include configs/security.conf;
include configs/robotsNone.conf;
location / {
proxy_pass http://localhost:40001;
include configs/proxy.conf;
}
# QUIC
include configs/http3.conf;
listen 443 ssl;
http2 on;
include configs/ssl.conf;
}
server {
if ($host = pbin.zzls.xyz) {
return 301 https://$host$request_uri;
}
listen 80;
server_name pbin.zzls.xyz;
}

View File

@ -0,0 +1,54 @@
# CLEARNET
server {
access_log off;
server_name ri.zzls.xyz;
include configs/general.conf;
include configs/robotsNone.conf;
location / {
proxy_pass http://127.0.0.1:40002/;
include configs/proxy.conf;
}
# QUIC
include configs/http3.conf;
listen 443 ssl;
http2 on;
include configs/ssl.conf;
}
# TOR
server {
listen 80;
server_name rimgo.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion;
include configs/general.conf;
include configs/robotsNone.conf;
location / {
proxy_pass http://127.0.0.1:40002/;
include configs/proxy.conf;
}
}
# I2P
server {
listen 30001;
server_name zzls3ubaix5wjfar4hskwqnh3vvwvrzoxsvcx64on2aogcxrvhoq.b32.i2p;
include configs/general.conf;
include configs/robotsNone.conf;
location / {
proxy_pass http://127.0.0.1:40002/;
include configs/proxy.conf;
}
}
server {
if ($host = ri.zzls.xyz) {
return 301 https://$host$request_uri;
}
listen 80;
server_name ri.zzls.xyz;
}

View File

@ -0,0 +1,28 @@
server {
root /var/www/html;
index index.html;
include configs/general.conf;
include configs/robotsNone.conf;
include configs/security.conf;
server_name selfhost.zzls.xyz;
location / {
try_files $uri $uri/ =404;
}
# QUIC
include configs/http3.conf;
listen 443 ssl default_server;
http2 on;
include configs/ssl.conf;
}
server {
if ($host = selfhost.zzls.xyz) {
return 301 https://$host$request_uri;
}
listen 80;
server_name selfhost.zzls.xyz;
}

View File

@ -0,0 +1,27 @@
server {
server_name spanixdev.zzls.xyz;
include configs/general.conf;
include configs/security.conf;
include configs/robotsNone.conf;
location / {
proxy_pass http://localhost:40080;
include configs/proxy.conf;
}
# QUIC
include configs/http3.conf;
listen 443 ssl;
listen 443 quic;
http2 on;
include configs/ssl.conf;
}
server {
if ($host = spanixdev.zzls.xyz) {
return 301 https://$host$request_uri;
}
listen 80;
server_name spanixdev.zzls.xyz;
}

View File

@ -0,0 +1,27 @@
server {
access_log /var/log/nginx/twitch.zzls.xyz.access.log;
server_name twitch.zzls.xyz;
include configs/general.conf;
include configs/security.conf;
include configs/robotsNone.conf;
location / {
proxy_pass http://127.0.0.1:9595;
include configs/proxy.conf;
}
# QUIC
include configs/http3.conf;
listen 443 ssl;
http2 on;
include configs/ssl.conf;
}
server {
if ($host = twitch.zzls.xyz) {
return 301 https://$host$request_uri;
}
listen 80;
server_name twitch.zzls.xyz;
}

View File

@ -1 +0,0 @@
/etc/nginx/sites-available/7tv.gay.conf