Skip to content

Commit cdc3c2c

Browse files
Merge pull request #1 from richardhollis/m3u-proxy
M3u proxy
2 parents c490aed + ef745d2 commit cdc3c2c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docker/8.4/nginx/xtream.conf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,25 @@ server {
9090
proxy_set_header X-Real-IP $remote_addr;
9191
}
9292

93+
### M3U-PROXY DEFAULT MPEG-TS STREAMS - M3U8 ###
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 - ANY EXTENSION ###
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 / {

0 commit comments

Comments
 (0)