From 13ef29f078114fd278b861aea92d045bdb98e766 Mon Sep 17 00:00:00 2001 From: rad168 <86744795+rad168@users.noreply.github.com> Date: Tue, 15 Jul 2025 16:21:31 +0800 Subject: [PATCH] Update nginx.conf --- mytv/notoken/nginx.conf | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/mytv/notoken/nginx.conf b/mytv/notoken/nginx.conf index b28d69a..10c525b 100644 --- a/mytv/notoken/nginx.conf +++ b/mytv/notoken/nginx.conf @@ -43,7 +43,7 @@ http { ## # Gzip 压缩设置 ## - gzip on; + gzip off; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript video/mp2t; ## @@ -487,7 +487,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 s1.tvm4a1.cfd; # 确保请求的 Host 匹配 Cloudflare 配置 + proxy_set_header Host s1.an94tv.cfd; # 确保请求的 Host 匹配 Cloudflare 配置 # SSL 配置 proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # 指定 SSL 协议 @@ -505,15 +505,15 @@ http { # 默认 location 配置 location / { - proxy_pass http://s1.tvm4a1.cfd; # 替换为您的源站地址 + proxy_pass http://s1.an94tv.cfd; # 替换为您的源站地址 } # 针对 m3u8 文件内容修改 location ~ \.m3u8$ { - proxy_pass http://s1.tvm4a1.cfd; + proxy_pass http://s1.an94tv.cfd; # 替换为相对路径 - sub_filter 'http://aktv_stream.m16tv.cfd/AKTV/stream/' '/AKTV/stream/'; + sub_filter 'http://s1.an94tv.cfd/AKTV/stream/' '/AKTV/stream/'; sub_filter_once off; sub_filter_types application/vnd.apple.mpegurl text/plain; @@ -524,7 +524,7 @@ http { # 针对 .ts 和 .aac 文件的特殊缓存设置 location ~* \.(ts|aac)$ { - proxy_pass http://s1.tvm4a1.cfd; # 替换为您的源站地址 + proxy_pass http://s1.an94tv.cfd; # 替换为您的源站地址 proxy_cache_valid 200 206 60s; # 缓存 .ts 文件 60 秒 expires 60s; # 设置浏览器端缓存 60 秒 } @@ -539,7 +539,7 @@ http { add_header Content-Disposition "inline" always; # 替换为相对路径 - sub_filter 'https://s1.tvm4a1.cfd' 'http://$host:20008'; + sub_filter 'http://s1.an94tv.cfd' 'http://$host:20008'; sub_filter_once off; sub_filter_types *; # 对所有 MIME 类型进行替换 @@ -649,6 +649,12 @@ http { proxy_set_header Host o12.veryfast.filegear-sg.me; # 确保请求的 Host 匹配 Cloudflare 配置 } + # /cdn9/ 子目录 + location /cdn9/ { + proxy_pass http://cdn9.veryfast.filegear-sg.me/; + proxy_set_header Host cdn9.veryfast.filegear-sg.me; # 确保请求的 Host 匹配 Cloudflare 配置 + } + } server {