mirror of
https://github.com/rad168/iptv.git
synced 2025-12-17 23:34:38 +08:00
Update nginx.conf
This commit is contained in:
@@ -69,7 +69,7 @@ http {
|
|||||||
# 代理头设置
|
# 代理头设置
|
||||||
proxy_set_header X-Real-IP $remote_addr; # 传递客户端真实 IP
|
proxy_set_header X-Real-IP $remote_addr; # 传递客户端真实 IP
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 支持多级代理
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 支持多级代理
|
||||||
proxy_set_header Host cdn.163189.xyz; # 确保请求的 Host 匹配 Cloudflare 配置
|
proxy_set_header Host cdn.163.dedyn.io; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||||
|
|
||||||
# SSL 配置
|
# SSL 配置
|
||||||
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # 指定 SSL 协议
|
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # 指定 SSL 协议
|
||||||
@@ -87,12 +87,12 @@ http {
|
|||||||
|
|
||||||
# 默认 location 配置
|
# 默认 location 配置
|
||||||
location / {
|
location / {
|
||||||
proxy_pass https://cdn.163189.xyz; # 替换为您的源站地址
|
proxy_pass https://cdn.163.dedyn.io; # 替换为您的源站地址
|
||||||
}
|
}
|
||||||
|
|
||||||
# 针对 .ts 和 .aac 文件的特殊缓存设置
|
# 针对 .ts 和 .aac 文件的特殊缓存设置
|
||||||
location ~* \.(ts|aac)$ {
|
location ~* \.(ts|aac)$ {
|
||||||
proxy_pass https://cdn.163189.xyz; # 替换为您的源站地址
|
proxy_pass https://cdn.163.dedyn.io; # 替换为您的源站地址
|
||||||
proxy_cache_valid 200 206 60s; # 缓存 .ts 文件 60 秒
|
proxy_cache_valid 200 206 60s; # 缓存 .ts 文件 60 秒
|
||||||
expires 60s; # 设置浏览器端缓存 60 秒
|
expires 60s; # 设置浏览器端缓存 60 秒
|
||||||
}
|
}
|
||||||
@@ -151,7 +151,7 @@ http {
|
|||||||
# 代理头设置
|
# 代理头设置
|
||||||
proxy_set_header X-Real-IP $remote_addr; # 传递客户端真实 IP
|
proxy_set_header X-Real-IP $remote_addr; # 传递客户端真实 IP
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 支持多级代理
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 支持多级代理
|
||||||
proxy_set_header Host cdn12.jdshipin.com; # 确保请求的 Host 匹配 Cloudflare 配置
|
proxy_set_header Host smt.cdn6.rr.nu; # 确保请求的 Host 匹配 Cloudflare 配置
|
||||||
|
|
||||||
# SSL 配置
|
# SSL 配置
|
||||||
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # 指定 SSL 协议
|
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # 指定 SSL 协议
|
||||||
@@ -169,12 +169,12 @@ http {
|
|||||||
|
|
||||||
# 默认 location 配置
|
# 默认 location 配置
|
||||||
location / {
|
location / {
|
||||||
proxy_pass https://cdn12.jdshipin.com; # 替换为您的源站地址
|
proxy_pass https://smt.cdn6.rr.nu; # 替换为您的源站地址
|
||||||
}
|
}
|
||||||
|
|
||||||
# 针对 .ts 和 .aac 文件的特殊缓存设置
|
# 针对 .ts 和 .aac 文件的特殊缓存设置
|
||||||
location ~* \.(ts|aac)$ {
|
location ~* \.(ts|aac)$ {
|
||||||
proxy_pass https://cdn12.jdshipin.com; # 替换为您的源站地址
|
proxy_pass https://smt.cdn6.rr.nu; # 替换为您的源站地址
|
||||||
proxy_cache_valid 200 206 60s; # 缓存 .ts 文件 60 秒
|
proxy_cache_valid 200 206 60s; # 缓存 .ts 文件 60 秒
|
||||||
expires 60s; # 设置浏览器端缓存 60 秒
|
expires 60s; # 设置浏览器端缓存 60 秒
|
||||||
}
|
}
|
||||||
@@ -183,7 +183,7 @@ http {
|
|||||||
location ~ smt2\.1\.5\.php {
|
location ~ smt2\.1\.5\.php {
|
||||||
proxy_cache_valid 200 206 60s; # 缓存 60 秒
|
proxy_cache_valid 200 206 60s; # 缓存 60 秒
|
||||||
expires 60s; # 设置浏览器缓存 60 秒
|
expires 60s; # 设置浏览器缓存 60 秒
|
||||||
proxy_pass https://cdn12.jdshipin.com;
|
proxy_pass https://smt.cdn6.rr.nu;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user