Initial commit: KiraTV IPTV proxy server
Full-stack IPTV management system with Xtream Codes API compatibility, multi-account provider fan-out, Jellyfin local library integration, real-time dashboard, EPG support, and A/V-sync-safe stream recovery.
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
upstream kirastream_backend {
|
||||
server 127.0.0.1:8000;
|
||||
keepalive 32;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
|
||||
# Streaming: long timeouts, no buffering
|
||||
proxy_read_timeout 3600s;
|
||||
proxy_send_timeout 3600s;
|
||||
proxy_connect_timeout 10s;
|
||||
|
||||
# Frontend static build
|
||||
location /admin {
|
||||
alias /opt/kirastream/backend/static;
|
||||
try_files $uri $uri/ /admin/index.html;
|
||||
}
|
||||
|
||||
# API and Xtream Codes endpoints — proxy to FastAPI
|
||||
location / {
|
||||
proxy_pass http://kirastream_backend;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
# No buffering for streams
|
||||
proxy_buffering off;
|
||||
proxy_cache off;
|
||||
add_header X-Accel-Buffering no;
|
||||
}
|
||||
|
||||
# WebSocket monitoring
|
||||
location /api/admin/monitoring/ws {
|
||||
proxy_pass http://kirastream_backend;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_read_timeout 86400s;
|
||||
}
|
||||
|
||||
# Static files for frontend (direct serve)
|
||||
location /assets/ {
|
||||
alias /opt/kirastream/backend/static/assets/;
|
||||
expires 30d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# Gzip
|
||||
gzip on;
|
||||
gzip_types application/json application/javascript text/css text/plain application/x-mpegurl;
|
||||
gzip_min_length 1024;
|
||||
|
||||
# Logging
|
||||
access_log /var/log/nginx/kirastream_access.log;
|
||||
error_log /var/log/nginx/kirastream_error.log;
|
||||
}
|
||||
Reference in New Issue
Block a user