From bd8ce44a48a64a92a8c6a6e8667e582336ed5338 Mon Sep 17 00:00:00 2001 From: rad168 <86744795+rad168@users.noreply.github.com> Date: Sun, 24 Aug 2025 17:19:07 +0800 Subject: [PATCH] Update nginx.conf --- mytv/alpine/nginx.conf | 89 ++++++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 37 deletions(-) diff --git a/mytv/alpine/nginx.conf b/mytv/alpine/nginx.conf index 2d3321a..275258c 100644 --- a/mytv/alpine/nginx.conf +++ b/mytv/alpine/nginx.conf @@ -67,7 +67,7 @@ http { server { listen 20000; listen [::]:20000; - server_name cdn.1678520.xyz; + server_name cdn5.163189.xyz; # 屏蔽 Cloudflare 响应头 proxy_hide_header Server; @@ -106,7 +106,7 @@ http { # 默认 location 配置 location / { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -121,7 +121,7 @@ http { # 针对 .ts 和 .aac 文件的特殊缓存设置 location ~* \.(ts|aac)$ { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -140,7 +140,7 @@ http { server { listen 20001; listen [::]:20001; - server_name cdn.1678520.xyz; + server_name cdn5.163189.xyz; # 屏蔽 Cloudflare 响应头 proxy_hide_header Server; @@ -179,7 +179,7 @@ http { # 默认 location 配置 location / { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -194,7 +194,7 @@ http { # 针对 .ts 和 .aac 文件的特殊缓存设置 location ~* \.(ts|aac)$ { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -213,7 +213,7 @@ http { server { listen 20002; listen [::]:20002; - server_name cdn.1678520.xyz; + server_name cdn5.163189.xyz; # 屏蔽 Cloudflare 响应头 proxy_hide_header Server; @@ -252,7 +252,7 @@ http { # 默认 location 配置 location / { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -267,7 +267,7 @@ http { # 针对包含 smt2.1.5.php 的 URL,设置缓存时间为 60 秒 location ~ smt2\.1\.5\.php { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -286,7 +286,7 @@ http { server { listen 20003; listen [::]:20003; - server_name cdn.1678520.xyz; + server_name cdn5.163189.xyz; # 屏蔽 Cloudflare 响应头 proxy_hide_header Server; @@ -325,7 +325,7 @@ http { # 默认 location 配置 location / { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -340,7 +340,7 @@ http { # 针对 .ts 和 .aac 文件的特殊缓存设置 location ~* \.(ts|aac)$ { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -359,7 +359,7 @@ http { server { listen 20004; listen [::]:20004; - server_name cdn.1678520.xyz; + server_name cdn5.163189.xyz; # 屏蔽 Cloudflare 响应头 proxy_hide_header Server; @@ -398,7 +398,7 @@ http { # 默认 location 配置 location / { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -413,7 +413,7 @@ http { # 针对 .ts 和 .aac 文件的特殊缓存设置 location ~* \.(ts|aac)$ { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -432,7 +432,7 @@ http { server { listen 20005; listen [::]:20005; - server_name cdn.1678520.xyz; + server_name cdn5.163189.xyz; # 屏蔽 Cloudflare 响应头 proxy_hide_header Server; @@ -471,7 +471,7 @@ http { # 默认 location 配置 location / { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -486,7 +486,7 @@ http { # 针对 .ts 和 .aac 文件的特殊缓存设置 location ~* \.(ts|webvtt|key)$ { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -505,7 +505,7 @@ http { server { listen 20006; listen [::]:20006; - server_name cdn.1678520.xyz; + server_name cdn5.163189.xyz; # 屏蔽 Cloudflare 响应头 proxy_hide_header Server; @@ -544,7 +544,7 @@ http { # 默认 location 配置 location / { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -559,7 +559,7 @@ http { # 针对 .ts 和 .aac 文件的特殊缓存设置 location ~* \.(ts|aac)$ { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -578,7 +578,7 @@ http { server { listen 20007; listen [::]:20007; - server_name cdn.1678520.xyz; + server_name cdn5.163189.xyz; # 屏蔽 Cloudflare 响应头 proxy_hide_header Server; @@ -617,7 +617,7 @@ http { # 默认 location 配置 location / { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -632,7 +632,7 @@ http { # 针对 .ts 和 .aac 文件的特殊缓存设置 location ~* \.(ts|aac)$ { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -651,7 +651,7 @@ http { server { listen 20008; listen [::]:20008; - server_name cdn.1678520.xyz; + server_name cdn5.163189.xyz; # 屏蔽 Cloudflare 响应头 proxy_hide_header Server; @@ -690,7 +690,7 @@ http { # 默认 location 配置 location / { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -705,7 +705,7 @@ http { # 针对 .ts 和 .aac 文件的特殊缓存设置 location ~* \.(ts|aac)$ { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -722,7 +722,7 @@ http { # 针对 m3u 文件内容修改 location ~ \.m3u$ { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -752,7 +752,7 @@ http { server { listen 20009; listen [::]:20009; - server_name cdn.1678520.xyz; + server_name cdn5.163189.xyz; # 屏蔽 Cloudflare 响应头 proxy_hide_header Server; @@ -791,7 +791,7 @@ http { # 默认 location 配置 location / { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -806,7 +806,7 @@ http { # 针对 .ts 和 .aac 文件的特殊缓存设置 location ~* \.(ts|aac)$ { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -825,7 +825,7 @@ http { server { listen 20010; listen [::]:20010; - server_name cdn.1678520.xyz; + server_name cdn5.163189.xyz; # 屏蔽 Cloudflare 响应头 proxy_hide_header Server; @@ -863,7 +863,7 @@ http { # 默认 location 配置 location / { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -879,7 +879,7 @@ http { # /o12/ 子目录 location /o12/ { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -894,7 +894,7 @@ http { # /cdn9/ 子目录 location /cdn9/ { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -906,13 +906,28 @@ http { proxy_set_header Host cdn9.veryfast.filegear-sg.me; # 确保请求的 Host 匹配 Cloudflare 配置 } + # /hn/ 子目录 + location /hn/ { + if ($auth_ok = 0) { + return 302 https://cdn5.163189.xyz/403/?mytv; + } + + if ($arg_token) { + add_header Set-Cookie "token=$arg_token; Path=/"; + return 302 $redirect_uri; + } + + proxy_pass http://hn.any.myfw.us/; + proxy_set_header Host hn.any.myfw.us; # 确保请求的 Host 匹配 Cloudflare 配置 + } + } # 反代设置:订阅链接 server { listen 30000; listen [::]:30000; - server_name cdn.1678520.xyz; + server_name cdn5.163189.xyz; # 屏蔽 Cloudflare 响应头 proxy_hide_header Server; @@ -951,7 +966,7 @@ http { # 默认 location 配置 location /mytv.m3u { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) {