diff --git a/mytv/nginx.conf b/mytv/nginx.conf index 6ce4264..bc26e61 100644 --- a/mytv/nginx.conf +++ b/mytv/nginx.conf @@ -85,7 +85,7 @@ http { server { listen 20000; listen [::]:20000; - server_name cdn.1678520.xyz; # 替换为您的域名 + server_name cdn5.163189.xyz; # 替换为您的域名 # 自定义响应头:缓存命中状态和剩余缓存时间 add_header X-Cache-Status $upstream_cache_status; @@ -123,7 +123,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) { @@ -137,7 +137,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) { @@ -154,7 +154,7 @@ http { server { listen 20001; listen [::]:20001; - server_name cdn.1678520.xyz; # 替换为您的域名 + server_name cdn5.163189.xyz; # 替换为您的域名 # 自定义响应头:缓存命中状态和剩余缓存时间 add_header X-Cache-Status $upstream_cache_status; @@ -192,7 +192,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) { @@ -206,7 +206,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) { @@ -223,7 +223,7 @@ http { server { listen 20002; listen [::]:20002; - server_name cdn.1678520.xyz; # 替换为您的域名 + server_name cdn5.163189.xyz; # 替换为您的域名 # 自定义响应头:缓存命中状态和剩余缓存时间 add_header X-Cache-Status $upstream_cache_status; @@ -261,7 +261,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) { @@ -275,7 +275,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) { @@ -292,7 +292,7 @@ http { server { listen 20003; listen [::]:20003; - server_name cdn.1678520.xyz; # 替换为您的域名 + server_name cdn5.163189.xyz; # 替换为您的域名 # 自定义响应头:缓存命中状态和剩余缓存时间 add_header X-Cache-Status $upstream_cache_status; @@ -330,7 +330,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) { @@ -344,7 +344,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) { @@ -361,7 +361,7 @@ http { server { listen 20004; listen [::]:20004; - server_name cdn.1678520.xyz; # 替换为您的域名 + server_name cdn5.163189.xyz; # 替换为您的域名 # 自定义响应头:缓存命中状态和剩余缓存时间 add_header X-Cache-Status $upstream_cache_status; @@ -399,7 +399,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) { @@ -430,7 +430,7 @@ http { server { listen 20005; listen [::]:20005; - server_name cdn.1678520.xyz; # 替换为您的域名 + server_name cdn5.163189.xyz; # 替换为您的域名 # 自定义响应头:缓存命中状态和剩余缓存时间 add_header X-Cache-Status $upstream_cache_status; @@ -468,7 +468,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) { @@ -482,7 +482,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) { @@ -499,7 +499,7 @@ http { server { listen 20006; listen [::]:20006; - server_name cdn.1678520.xyz; # 替换为您的域名 + server_name cdn5.163189.xyz; # 替换为您的域名 # 自定义响应头:缓存命中状态和剩余缓存时间 add_header X-Cache-Status $upstream_cache_status; @@ -537,7 +537,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) { @@ -551,7 +551,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) { @@ -568,7 +568,7 @@ http { server { listen 20007; listen [::]:20007; - server_name cdn.1678520.xyz; # 替换为您的域名 + server_name cdn5.163189.xyz; # 替换为您的域名 # 自定义响应头:缓存命中状态和剩余缓存时间 add_header X-Cache-Status $upstream_cache_status; @@ -606,7 +606,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) { @@ -620,7 +620,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) { @@ -637,7 +637,7 @@ http { server { listen 20008; listen [::]:20008; - server_name cdn.1678520.xyz; # 替换为您的域名 + server_name cdn5.163189.xyz; # 替换为您的域名 # 自定义响应头:缓存命中状态和剩余缓存时间 add_header X-Cache-Status $upstream_cache_status; @@ -675,7 +675,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) { @@ -689,7 +689,7 @@ http { # 针对 m3u8 文件内容修改 location ~ \.m3u8$ { if ($auth_ok = 0) { - return 302 https://cdn.1678520.xyz/403?mytv; + return 302 https://cdn5.163189.xyz/403/?mytv; } if ($arg_token) { @@ -712,7 +712,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) { @@ -728,7 +728,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) { @@ -757,7 +757,7 @@ http { server { listen 20009; listen [::]:20009; - server_name cdn.1678520.xyz; # 替换为您的域名 + server_name cdn5.163189.xyz; # 替换为您的域名 # 自定义响应头:缓存命中状态和剩余缓存时间 add_header X-Cache-Status $upstream_cache_status; @@ -795,7 +795,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) { @@ -809,7 +809,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) { @@ -826,7 +826,7 @@ http { server { listen 20010; listen [::]:20010; - server_name cdn.1678520.xyz; # 替换为您的域名 + server_name cdn5.163189.xyz; # 替换为您的域名 # 自定义响应头:缓存命中状态和剩余缓存时间 add_header X-Cache-Status $upstream_cache_status; @@ -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) { @@ -878,7 +878,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) { @@ -893,7 +893,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) { @@ -905,12 +905,27 @@ 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; # 替换为您的域名 # 自定义响应头:缓存命中状态和剩余缓存时间 add_header X-Cache-Status $upstream_cache_status; @@ -948,7 +963,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) {