首页自定义端口随机跳转

<html>
<head>
    <script>
        var arr =
            "https://53.com," +
            "https://49.com," +
            "https://46.com," +
            "https://45.com," +
            "https://43.com," +
            "https://42.com," +
            "https://32.com," +
            "https://30.com," +
            "https://64.com," +
            "https://63.com," +
            "https://62.com," +
            "https://61.com," +
            "https://59.com," +
            "https://57.com," +
            "https://56.com," +
            "https://55.com,";

        arr = arr.split(",");

        var rand = parseInt(Math.random() * arr.length);
        
        window.location.href = arr[rand] + ":443";
    </script>
</head>
<body></body>
</html>

域名随机跳转-腾讯判定

<!DOCTYPE html>

<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, user-scalable=yes, minimum-scale=1, maximum-scale=1.0">
    <meta name="format-detection" content="telephone=no">
    <title></title>
    <style type="text/css">
        .tips-txt {
            display: none;
            text-align: center;
            font-size: 18px;
            color: #333;
        }

        .width-100 {
            display: block;
            max-width: 100%;
            height: auto;
            margin: auto;
        }
    </style>
</head>

<body>
<div class="tips-txt" id="tipsTxt">
    <img src="https://www.15920760983.cn/jumpout.png" class="width-100">
</div>

<script type="text/javascript">
    var urlList = ['https://www.test1.com', 'https://www.test2.com', 'https://www.test3.com',
        'https://www.test4.com', 'https://www.test5.com'];
    var urlTest = urlList[Math.floor(Math.random() * urlList.length)];
    var u = navigator.userAgent;
    var isWechat = (u.match(/MicroMessenger/i));
    // var isQQ = (u.match(/QQ/i));

    var qqBrowser = false, qqWebview = false;

    var browser = navigator.userAgent.toLowerCase();
    if (browser.indexOf('qbwebviewtype') != -1 && browser.indexOf('mqqbrowser') == -1) {
        //qq内置浏览器
        qqWebview = true;
    } else if (browser.indexOf('qbwebviewtype') != -1 && browser.indexOf("mqqbrowser") != -1) {
        //qq浏览器
        qqBrowser = true;
    }

    if (isWechat) {
        var styleElement = document.getElementById('tipsTxt');
        styleElement.setAttribute('style', 'display: block');
    }// QQ内置浏览器
    else if (qqWebview == true && qqBrowser != true) {
        var styleElement = document.getElementById('tipsTxt');
        styleElement.setAttribute('style', 'display: block');
    }
    // QQ浏览器
    else if (qqBrowser == true && qqWebview != true) {
        window.location.href = urlTest;
    } else {
        window.location.href = urlTest;
    }
</script>

</body>

</html>

域名随机跳转

<html>
<head>
    <script>
        var arr =
            "https://minglichengxin.com," +
            "https://tuanjieyouai.com," +
            "https://qinjianziqiang.com," +
            "https://jingyefengxian.com," +
            "https://aiguoshoufa.com," +
            "https://www.minglichengxin.com," +
            "https://www.tuanjieyouai.com," +
            "https://www.qinjianziqiang.com," +
            "https://www.jingyefengxian.com," +
            "https://www.aiguoshoufa.com";
 

        arr = arr.split(",");
        var rand = parseInt(Math.random() * arr.length);
        window.location.href = arr[rand];
        
    </script>
</head>
<body></body>
</html>

判断设备跳转

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>xxxxx</title>
    <script>

        if (!isMobile()) { // PC
            window.location.href = "http://test1.com";
        } else { // mobile
            window.location.href = "http://test2.com";
        }

        //判断Mobile装置
        function isMobile() {
            return (/AppleWebKit.*Mobile/i.test(navigator.userAgent)
                || /Android/i.test(navigator.userAgent)
                || /BlackBerry/i.test(navigator.userAgent)
                || /IEMobile/i.test(navigator.userAgent)
                || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent)));
        }

    </script>
</head>
<body>

</body>
</html>

判断跳转

功能如下:
1:判断QQ浏览器,进行引导页访问跳转
2:如果是QQ浏览器访问,则展示引导页,引导访客使用其他浏览器访问
3:如果是其他浏览器(PC或移动端),直接跳转
4:按照引导页操作后,会访问“域名”+port
5:用户部署服务的时候,需要部署对应“port”的跳转服务,跳转到目标域名
6:前端代码在附件