mirror of
https://github.com/rad168/iptv.git
synced 2025-12-16 23:10:21 +08:00
Update nginx.conf
This commit is contained in:
@@ -104,7 +104,7 @@ http {
|
||||
# 代理头设置
|
||||
proxy_set_header X-Real-IP $remote_addr; # 传递客户端真实 IP
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 支持多级代理
|
||||
proxy_set_header Host cdn.16899.ggff.net; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
proxy_set_header Host cdn.veryfast.filegear-sg.me; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
|
||||
# SSL 配置
|
||||
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # 指定 SSL 协议
|
||||
@@ -131,7 +131,7 @@ http {
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass https://cdn.16899.ggff.net; # 替换为您的源站地址
|
||||
proxy_pass http://cdn.veryfast.filegear-sg.me; # 替换为您的源站地址
|
||||
}
|
||||
|
||||
# 针对 .ts 和 .aac 文件的特殊缓存设置
|
||||
@@ -145,7 +145,7 @@ http {
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass https://cdn.16899.ggff.net; # 替换为您的源站地址
|
||||
proxy_pass http://cdn.veryfast.filegear-sg.me; # 替换为您的源站地址
|
||||
proxy_cache_valid 200 206 60s; # 缓存 .ts 文件 60 秒
|
||||
expires 60s; # 设置浏览器端缓存 60 秒
|
||||
}
|
||||
@@ -173,7 +173,7 @@ http {
|
||||
# 代理头设置
|
||||
proxy_set_header X-Real-IP $remote_addr; # 传递客户端真实 IP
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 支持多级代理
|
||||
proxy_set_header Host cdn3.163189.xyz; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
proxy_set_header Host cdn3.veryfast.filegear-sg.me; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
|
||||
# SSL 配置
|
||||
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # 指定 SSL 协议
|
||||
@@ -200,7 +200,7 @@ http {
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass https://cdn3.163189.xyz; # 替换为您的源站地址
|
||||
proxy_pass http://cdn3.veryfast.filegear-sg.me; # 替换为您的源站地址
|
||||
}
|
||||
|
||||
# 针对 .ts 和 .aac 文件的特殊缓存设置
|
||||
@@ -214,7 +214,7 @@ http {
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass https://cdn3.163189.xyz; # 替换为您的源站地址
|
||||
proxy_pass http://cdn3.veryfast.filegear-sg.me; # 替换为您的源站地址
|
||||
proxy_cache_valid 200 206 60s; # 缓存 .ts 文件 60 秒
|
||||
expires 60s; # 设置浏览器端缓存 60 秒
|
||||
}
|
||||
@@ -242,7 +242,7 @@ http {
|
||||
# 代理头设置
|
||||
proxy_set_header X-Real-IP $remote_addr; # 传递客户端真实 IP
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 支持多级代理
|
||||
proxy_set_header Host smt.1789.dpdns.org; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
proxy_set_header Host smt.veryfast.filegear-sg.me; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
|
||||
# SSL 配置
|
||||
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # 指定 SSL 协议
|
||||
@@ -269,7 +269,7 @@ http {
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass https://smt.1789.dpdns.org; # 替换为您的源站地址
|
||||
proxy_pass http://smt.veryfast.filegear-sg.me; # 替换为您的源站地址
|
||||
}
|
||||
|
||||
# 针对包含 smt2.1.5.php 的 URL,设置缓存时间为 60 秒
|
||||
@@ -285,7 +285,7 @@ http {
|
||||
|
||||
proxy_cache_valid 200 206 60s; # 缓存 60 秒
|
||||
expires 60s; # 设置浏览器缓存 60 秒
|
||||
proxy_pass https://smt.1789.dpdns.org;
|
||||
proxy_pass http://smt.veryfast.filegear-sg.me;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ http {
|
||||
# 代理头设置
|
||||
proxy_set_header X-Real-IP $remote_addr; # 传递客户端真实 IP
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 支持多级代理
|
||||
proxy_set_header Host cdn6.16899.ggff.net; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
proxy_set_header Host cdn6.veryfast.filegear-sg.me; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
|
||||
# SSL 配置
|
||||
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # 指定 SSL 协议
|
||||
@@ -338,7 +338,7 @@ http {
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass https://cdn6.16899.ggff.net; # 替换为您的源站地址
|
||||
proxy_pass http://cdn6.veryfast.filegear-sg.me; # 替换为您的源站地址
|
||||
}
|
||||
|
||||
# 针对 .ts 和 .aac 文件的特殊缓存设置
|
||||
@@ -352,7 +352,7 @@ http {
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass https://cdn6.16899.ggff.net; # 替换为您的源站地址
|
||||
proxy_pass http://cdn6.veryfast.filegear-sg.me; # 替换为您的源站地址
|
||||
proxy_cache_valid 200 206 60s; # 缓存 .ts 文件 60 秒
|
||||
expires 60s; # 设置浏览器端缓存 60 秒
|
||||
}
|
||||
@@ -380,7 +380,7 @@ http {
|
||||
# 代理头设置
|
||||
proxy_set_header X-Real-IP $remote_addr; # 传递客户端真实 IP
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 支持多级代理
|
||||
proxy_set_header Host v2h.1789.dpdns.org; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
proxy_set_header Host v2h.veryfast.filegear-sg.me; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
|
||||
# SSL 配置
|
||||
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # 指定 SSL 协议
|
||||
@@ -407,7 +407,7 @@ http {
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass http://v2h.1789.dpdns.org; # 替换为您的源站地址
|
||||
proxy_pass http://v2h.veryfast.filegear-sg.me; # 替换为您的源站地址
|
||||
}
|
||||
|
||||
# 针对 .ts 和 .aac 文件的特殊缓存设置
|
||||
@@ -421,7 +421,7 @@ http {
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass http://v2h.1789.dpdns.org; # 替换为您的源站地址
|
||||
proxy_pass http://v2h.veryfast.filegear-sg.me; # 替换为您的源站地址
|
||||
proxy_cache_valid 200 206 60s; # 缓存 .ts 文件 60 秒
|
||||
expires 60s; # 设置浏览器端缓存 60 秒
|
||||
}
|
||||
@@ -518,7 +518,7 @@ http {
|
||||
# 代理头设置
|
||||
proxy_set_header X-Real-IP $remote_addr; # 传递客户端真实 IP
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 支持多级代理
|
||||
proxy_set_header Host cdn5.163189.xyz; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
proxy_set_header Host cdn5.veryfast.filegear-sg.me; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
|
||||
# SSL 配置
|
||||
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # 指定 SSL 协议
|
||||
@@ -545,7 +545,7 @@ http {
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass https://cdn5.163189.xyz; # 替换为您的源站地址
|
||||
proxy_pass http://cdn5.veryfast.filegear-sg.me; # 替换为您的源站地址
|
||||
}
|
||||
|
||||
# 针对 .ts 和 .aac 文件的特殊缓存设置
|
||||
@@ -559,7 +559,7 @@ http {
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass https://cdn5.163189.xyz; # 替换为您的源站地址
|
||||
proxy_pass http://cdn5.veryfast.filegear-sg.me; # 替换为您的源站地址
|
||||
proxy_cache_valid 200 206 60s; # 缓存 .ts 文件 60 秒
|
||||
expires 60s; # 设置浏览器端缓存 60 秒
|
||||
}
|
||||
@@ -587,7 +587,7 @@ http {
|
||||
# 代理头设置
|
||||
proxy_set_header X-Real-IP $remote_addr; # 传递客户端真实 IP
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 支持多级代理
|
||||
proxy_set_header Host cdn2.16899.ggff.net; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
proxy_set_header Host cdn2.veryfast.filegear-sg.me; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
|
||||
# SSL 配置
|
||||
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # 指定 SSL 协议
|
||||
@@ -605,7 +605,6 @@ http {
|
||||
|
||||
# 默认 location 配置
|
||||
location / {
|
||||
|
||||
if ($auth_ok = 0) {
|
||||
return 302 https://cdn.1678520.xyz/403?mytv;
|
||||
}
|
||||
@@ -615,7 +614,7 @@ http {
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass https://cdn2.16899.ggff.net; # 替换为您的源站地址
|
||||
proxy_pass http://cdn2.veryfast.filegear-sg.me; # 替换为您的源站地址
|
||||
}
|
||||
|
||||
# 针对 .ts 和 .aac 文件的特殊缓存设置
|
||||
@@ -629,7 +628,7 @@ http {
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass https://cdn2.16899.ggff.net; # 替换为您的源站地址
|
||||
proxy_pass http://cdn2.veryfast.filegear-sg.me; # 替换为您的源站地址
|
||||
proxy_cache_valid 200 206 60s; # 缓存 .ts 文件 60 秒
|
||||
expires 60s; # 设置浏览器端缓存 60 秒
|
||||
}
|
||||
@@ -712,6 +711,15 @@ http {
|
||||
|
||||
# 针对 .ts 和 .aac 文件的特殊缓存设置
|
||||
location ~* \.(ts|aac)$ {
|
||||
if ($auth_ok = 0) {
|
||||
return 302 https://cdn.1678520.xyz/403?mytv;
|
||||
}
|
||||
|
||||
if ($arg_token) {
|
||||
add_header Set-Cookie "token=$arg_token; Path=/";
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass http://s1.m16tv.cfd; # 替换为您的源站地址
|
||||
proxy_cache_valid 200 206 60s; # 缓存 .ts 文件 60 秒
|
||||
expires 60s; # 设置浏览器端缓存 60 秒
|
||||
@@ -768,7 +776,7 @@ http {
|
||||
# 代理头设置
|
||||
proxy_set_header X-Real-IP $remote_addr; # 传递客户端真实 IP
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 支持多级代理
|
||||
proxy_set_header Host cdn8.163189.xyz; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
proxy_set_header Host cdn8.veryfast.filegear-sg.me; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
|
||||
# SSL 配置
|
||||
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # 指定 SSL 协议
|
||||
@@ -795,7 +803,7 @@ http {
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass https://cdn8.163189.xyz; # 替换为您的源站地址
|
||||
proxy_pass http://cdn8.veryfast.filegear-sg.me; # 替换为您的源站地址
|
||||
}
|
||||
|
||||
# 针对 .ts 和 .aac 文件的特殊缓存设置
|
||||
@@ -809,7 +817,7 @@ http {
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass https://cdn8.163189.xyz; # 替换为您的源站地址
|
||||
proxy_pass http://cdn8.veryfast.filegear-sg.me; # 替换为您的源站地址
|
||||
proxy_cache_valid 200 206 60s; # 缓存 .ts 文件 60 秒
|
||||
expires 60s; # 设置浏览器端缓存 60 秒
|
||||
}
|
||||
@@ -863,8 +871,8 @@ http {
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass https://mytv.101.qzz.io; # 替换为您的源站地址
|
||||
proxy_set_header Host mytv.101.qzz.io; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
proxy_pass http://mytv.veryfast.filegear-sg.me; # 替换为您的源站地址
|
||||
proxy_set_header Host mytv.veryfast.filegear-sg.me; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
}
|
||||
|
||||
# /o12/ 子目录
|
||||
@@ -878,8 +886,8 @@ http {
|
||||
return 302 $redirect_uri;
|
||||
}
|
||||
|
||||
proxy_pass https://o12.1678520.xyz/;
|
||||
proxy_set_header Host o12.1678520.xyz; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
proxy_pass http://o12.veryfast.filegear-sg.me/;
|
||||
proxy_set_header Host o12.veryfast.filegear-sg.me; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||
}
|
||||
|
||||
}
|
||||
@@ -906,7 +914,7 @@ http {
|
||||
# 代理头设置
|
||||
proxy_set_header X-Real-IP $remote_addr; # 传递客户端真实 IP
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 支持多级代理
|
||||
proxy_set_header Host cdn5.163189.xyz;
|
||||
proxy_set_header Host cdn.veryfast.filegear-sg.me;
|
||||
|
||||
# SSL 配置
|
||||
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # 指定 SSL 协议
|
||||
@@ -932,7 +940,7 @@ http {
|
||||
add_header Set-Cookie "token=$arg_token; Path=/";
|
||||
}
|
||||
|
||||
proxy_pass https://cdn5.163189.xyz/mytv.m3u; # 替换为您的源站地址
|
||||
proxy_pass http://cdn.veryfast.filegear-sg.me/mytv.m3u; # 替换为您的源站地址
|
||||
sub_filter '服务器ip' '$host';
|
||||
sub_filter '.m3u8' '.m3u8?token=$arg_token';
|
||||
sub_filter 'smt3.2.1.php?' 'smt3.2.1.php?token=$arg_token&';
|
||||
@@ -945,5 +953,4 @@ http {
|
||||
proxy_set_header Accept-Encoding "";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user