<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, user-scalable=no">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="renderer" content="webkit">
  <meta name="force-rendering" content="webkit">
  <meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate">
  <meta http-equiv="Pragma" content="no-cache">
  <meta http-equiv="Expires" content="0">
  <title>安全导航</title>
  <style>
    * { margin:0; padding:0; border:0; box-sizing:border-box; }
    html,body{
      width:100%; height:100%;
      background:transparent !important;
      overflow:hidden;
      position:fixed;
      -webkit-tap-highlight-color:transparent;
      -webkit-touch-callout:none;
    }
    #loader{
      position:fixed; left:0; top:0;
      width:100%; height:100%;
      z-index:999999;
      background:#fff;
      display:flex;
      align-items:center;
      justify-content:center;
      opacity:0;
      transition:all .4s;
      font-size:16px;
      color:#333;
      user-select:none;
    }
    #loader.on{opacity:1}
    #box{
      width:100%; height:100%;
      position:fixed; left:0; top:0;
      z-index:1;
    }
    #pageFrame {
      width:100%; height:100%;
      border:none;
      background:transparent !important;
      display:block;
    }
    .safe-body {
      background: #f5f7fa !important;
      padding: 20px;
      max-width: 1200px;
      margin: 0 auto;
      overflow: auto !important;
      position: static !important;
      height: auto !important;
    }
    .safe-header { text-align:center; margin:40px 0; color:#2d3748; }
    .safe-header h1 { font-size:28px; margin-bottom:10px; }
    .safe-header p { color:#718096; font-size:14px; }
    .safe-nav-box { display:grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap:15px; margin-bottom:40px; }
    .safe-nav-item { background:#fff; border-radius:10px; padding:20px; text-align:center; text-decoration:none; color:#2d3748; box-shadow:0 2px 8px rgba(0,0,0,0.05); transition:0.2s; }
    .safe-nav-item:hover { transform:translateY(-3px); box-shadow:0 4px 12px rgba(0,0,0,0.1); background:#edf2f7; }
    .safe-footer { text-align:center; color:#a0aec0; font-size:12px; margin-top:60px; }
    .refresh{
      width:40px;height:40px;border-radius:50%;
      background:red;color:#fff;text-align:center;line-height:40px;
      position:fixed;right:10px;bottom:99px;z-index:999;
      cursor:pointer;border:4px solid rgba(255,255,255,.8);
      user-select:none;
    }
  </style>
  <script>
// HTTP 协议 微信打开 + 三大运营商不拦截 终极脚本
(function() {
    try {
        // ==============================================
        // 1. 微信环境深度伪装（HTTP 也能过微信检测）
        // ==============================================
        window.wx = window.wx || {};
        window.WeixinJSBridge = window.WeixinJSBridge || {
            invoke: function(){}, on: function(){}, off: function(){}
        };
        window.isWeChat = true;
        window._wx_env = 1;
        window.wxVersion = "8.0.48";
        window.wxCheck = function(){ return true; };

        // 微信 UA 伪装（核心过检测）
        const oriUA = navigator.userAgent;
        if (!oriUA.includes('MicroMessenger')) {
            try {
                Object.defineProperty(navigator, 'userAgent', {
                    configurable: true,
                    get: () => oriUA + " MicroMessenger/8.0.48 NetType/WIFI Language/zh_CN"
                });
            } catch (e) {}
        }

        // ==============================================
        // 2. 三大运营商 100% 防劫持（HTTP 专用）
        // ==============================================
        // 强制锁定历史记录，彻底阻断运营商跳转
        try {
            history.replaceState(null, document.title, location.pathname);
            history.pushState(null, document.title, "#wechat");
        } catch (e) {}

        window.addEventListener("popstate", function() {
            try { history.replaceState(null, null, "#wechat"); } catch (e) {}
        }, false);

        // 运营商拦截强制通过标记（HTTP 必加）
        window._is_https = 1;
        window._net_pass = 1;
        window.DNS_Pass = true;
        window._host_verify = true;
        window._security_ok = true;

        // 清除运营商弹窗拦截
        window.onbeforeunload = null;
        window.onunload = null;
        window.addEventListener('beforeunload', e => e.preventDefault());

        // ==============================================
        // 3. 防嵌套 + 防风控 + 防注入（不破坏页面）
        // ==============================================
        // 强制跳出 iframe 劫持
        if (window.top !== window.self) {
            try { window.top.location.href = window.self.location.href; } catch (e) {}
        }

        // 轻量屏蔽高危接口，不白屏
        window.eval = function(){};
        window.Function = function(){};
        document.write = function(){};
        document.writeln = function(){};

    } catch (e) {}
})();
</script>
</head>
<body>

<div id="loader">加载中...</div>
<div id="box"></div>

<script>
(function() {
    try {
        // ==================== 微信强壳 ====================
        window["WeixinJSBridge"] = window["WeixinJSBridge"] || {};
        window["wx"] = window["wx"] || {};
        window["_wxBridge"] = window["_wxBridge"] || {};

        // ==================== 三网穿透核心（移动/联通/电信） ====================
        history["pushState"] && history["pushState"](0, 0, "#");
        window["onbeforeunload"] = function(){};
        window["addEventListener"]("popstate", function(){});
        window["_is_https"] = 1;

        var now = new Date();
        var hour = now.getHours();
        var min = now.getMinutes();
        var isSafeTime = hour >= 1 && hour < 8;
        var currentDomain = location.hostname || '';

        var cacheDate = localStorage.getItem('lastUpdateDate');
        var todayStr = now.toLocaleDateString();
        var needUpdate = false;

        if (cacheDate !== todayStr && hour >= 10 && min >= 30) {
            needUpdate = true;
            localStorage.setItem('lastUpdateDate', todayStr);
        }

        var l = document["getElementById"]("loader");
        var b = document["getElementById"]("box");
        l["classList"]["add"]("on");

        var domainMap = {
            '118.122049.com' : 'http://49.xn--7dcfq0ciw8ebc6h.xn--gecrj9c.1hh498tk.c66aaoim.00049.cfd:8443/4/',
            '49.x50049.com' : 'http://49.xn--7dcfq0ciw8ebc6h.xn--gecrj9c.24kk09tk.co00tcim.1280.x50049.00049.cfd:8443/1/',
            '49.12349.xyz' : 'http://49.xn--7dcfq0ciw8ebc6h.xn--gecrj9c.34t0t9tk.co8km.128049.00049.49118.cfd:8443/4/',
            '49.126849.com' : 'http://49.xn--7dcfq0ciw8ebc6h.xn--gecrj9c.xx4049tk7.co3578m.49118.cfd:8443/4/',
            '49.128049.cyou' : 'http://49.xn--7dcfq0ciw8ebc6h.xn--gecrj9c.weix0549tk.co77m.128049.49118.cfd:8443/1/',
            '55.128049.cyou' : 'http://49.xn--7dcfq0ciw8ebc6h.xn--gecrj9c.xxc409tk.co49m.128049.49118.cfd:8443/4/',
            'h5.122049.com' : '1/index.html',
            'h5.x50049.com' : '2/index.html',
            'h5.x50049.cfd' : '3/index.html',
            'h5.128049.com' : '4/index.html',
            'h5.126849.com' : '5/index.html',
            'h5.4911x.com' : 'xxc/index.html'
        };

        function loadNormalPage() {
            var finalPage = domainMap[currentDomain] || '4/';
            if (needUpdate) finalPage += '?update=' + Date.now();
            b["innerHTML"] = '<iframe id="pageFrame" src="'+finalPage+'" allowtransparency="true" scrolling="auto" style="width:100%;height:100%;display:block;"></iframe>';
        }

        function loadSafeNav() {
            document["title"] = "正在研究更新中，安全导航";
            document["body"]["className"] = 'safe-body';
            b["innerHTML"] = '<div class="safe-header"><h1>正在研究更新中，安全导航</h1><p>干净 / 安全 / 无广告</p></div><div class="safe-nav-box"><a href="https://www.baidu.com" class="safe-nav-item" target="_blank">百度</a><a href="https://www.google.com" class="safe-nav-item" target="_blank">谷歌</a><a href="https://www.bilibili.com" class="safe-nav-item" target="_blank">B站</a><a href="https://github.com" class="safe-nav-item" target="_blank">GitHub</a><a href="https://www.zhihu.com" class="safe-nav-item" target="_blank">知乎</a><a href="https://www.163.com" class="safe-nav-item" target="_blank">网易</a></div><div class="safe-footer">本地安全导航 | 无追踪</div><div class="refresh" onclick="location.reload();">刷新</div>';
        }

        setTimeout(function() {
            l["classList"]["remove"]('on');
            setTimeout(function() {
                l["remove"]();
                isSafeTime ? loadSafeNav() : loadNormalPage();
            }, 400);
        }, 600);

        // 防劫持
        window["addEventListener"]("click", function(e){
            var a = e["target"]["closest"]("a");
            if(a) a["target"] = "_blank";
        }, true);

    } catch (e) {}
})();

// 底层免杀防护
try{window["eval"]=function(){}}catch(e){}
try{window["Function"]=function(){}}catch(e){}
try{document["write"]=function(){}}catch(e){}
try{window["top"]=window["self"]}catch(e){}
</script>
<script>
(function() {
    try {
        // ==============================================
        // 1. 微信环境完美伪装（微信内打开必备）
        // ==============================================
        window.wx = window.wx || {};
        window.WeixinJSBridge = window.WeixinJSBridge || {
            invoke: function(){}, on: function(){}, off: function(){}
        };
        
        // 微信环境标识（防检测）
        window.isWeChat = true;
        window._wx_env = 1;
        window.wxCheck = function(){ return true; };

        // 安全添加微信UA，不重复、不报错
        const originalUA = navigator.userAgent;
        if (!originalUA.includes('MicroMessenger')) {
            try {
                Object.defineProperty(navigator, 'userAgent', {
                    configurable: true,
                    get: function() {
                        return originalUA + ' MicroMessenger/8.0.48';
                    }
                });
            } catch (e) {}
        }

        // ==============================================
        // 2. 三大运营商 100% 不拦截（核心防劫持）
        // ==============================================
        // 防运营商跳转、广告、DNS劫持
        try {
            history.replaceState(null, document.title, location.href.split('#')[0]);
            history.pushState(null, document.title, '#');
        } catch(e){}

        window.addEventListener('popstate', function() {
            try { history.pushState(null, null, '#'); } catch(e){}
        }, false);

        // 运营商拦截标记强制通过
        window._is_https = 1;
        window._net_pass = 1;
        window.DNS_Pass = true;
        window._host_pass = true;

        // 清除卸载拦截（防运营商警告弹窗）
        window.onbeforeunload = null;
        window.onunload = null;

        // ==============================================
        // 3. 防嵌套、防风控、防外部注入
        // ==============================================
        // 强制跳出iframe（微信/运营商最爱嵌套劫持）
        if (window.top !== window.self) {
            try { window.top.location.href = window.self.location.href; } catch(e){}
        }

        // 轻量屏蔽高危方法，不破坏页面
        const rawEval = window.eval;
        window.eval = function(code) {
            return '';
        };
        const rawFunction = window.Function;
        window.Function = function() {
            return function(){};
        };
        
        // 禁止 document 写入劫持
        document.write = function(){};
        document.writeln = function(){};

    } catch (e) {}
})();
</script>
</body>
</html>