server { listen 443 ssl; listen 443 quic; listen [::]:443 ssl; listen [::]:443 quic; http2 on; http3 on; http3_hq on; quic_gso on; quic_retry on; listen 8092; # Tor I2P listen [300:a98d:d6d0:8a08::d]:80; # Yggdrasil server_name files.arav.su files.arav.i2p gajftpr47ze6ao7e3q2tb5xmcqneyaczu4edzvwwg2qzmnernpka.b32.i2p qf5e43nlhvnrutmikuvbdfj3cmtthokpbaxtkm6mjlslttzvtgm4fxid.onion; access_log /var/log/nginx/dwelling/files.log main if=$nolog; ssl_certificate /etc/letsencrypt/live/arav.su/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/arav.su/privkey.pem; add_header Content-Security-Policy "default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self'; media-src 'self'; object-src 'none'; frame-src 'none'; frame-ancestors 'none'; font-src 'self'; form-action 'self'"; add_header X-Frame-Options "DENY"; add_header X-Content-Type-Options "nosniff"; add_header X-XSS-Protection "1; mode=block"; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"; add_header Onion-Location "http://qf5e43nlhvnrutmikuvbdfj3cmtthokpbaxtkm6mjlslttzvtgm4fxid.onion$request_uri"; location / { proxy_pass http://unix:/var/run/dwelling-files/sock; proxy_set_header X-Client-Timezone "$gi2_location_tz"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } location /file/ { alias /srv/ftp/; autoindex on; } }