Skip to content

Commit 64982fb

Browse files
authored
fix: Add support for m3u-proxy in XTREAM_ONLY_ENABLED mode
2 parents 9927667 + 9fcbc0f commit 64982fb

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

docker/8.4/nginx/xtream.conf

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,28 @@ server {
9090
proxy_set_header X-Real-IP $remote_addr;
9191
}
9292

93+
### M3U-PROXY DEFAULT MPEG-TS STREAMS ###
94+
# /m3u-proxy/stream/<hash>
95+
location ~ "^/m3u-proxy/stream/[A-Za-z0-9 -]+$" {
96+
proxy_pass http://127.0.0.1:${APP_PORT};
97+
proxy_set_header Host $host;
98+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
99+
proxy_set_header X-Real-IP $remote_addr;
100+
}
101+
102+
### M3U-PROXY DEFAULT HLS STREAMS ###
103+
# /m3u-proxy/hls/<hash>/playlist.m3u8
104+
# /m3u-proxy/hls/<hash>/segment
105+
location ~ "^/m3u-proxy/hls/[A-Za-z0-9 -]+/[playlist\.m3u8|segment]+$" {
106+
proxy_pass http://127.0.0.1:${APP_PORT};
107+
proxy_set_header Host $host;
108+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
109+
proxy_set_header X-Real-IP $remote_addr;
110+
}
111+
93112
# ========= BLOCK EVERYTHING ELSE =========
94113

95114
location / {
96115
return 404;
97116
}
98-
}
117+
}

0 commit comments

Comments
 (0)