<!DOCTYPE html>
<html>
<head>
    <title>Reverse Proxy - [Website Title]</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <style>
        body {
            margin: 0;
            padding: 0;
        }
        iframe {
            width: 100%;
            height: 100vh;
            border: none;
        }
    </style>
</head>
<body>
    <iframe id="proxyFrame" src="https://idc.0vun.cn"></iframe>
<pre><code>&lt;script&gt;
    $(document).ready(function () {
        var proxyFrame = document.getElementById('proxyFrame');
        var proxyWindow = proxyFrame.contentWindow || proxyFrame.contentDocument.document || proxyFrame.contentDocument;
        
        $(window).on('message', function (event) {
            var message = event.originalEvent.data;
            
            if (message.type === 'proxy') {
                var url = message.url;
                proxyWindow.location.href = url;
            }
        });

        // Get and display the title of the loaded website
        proxyFrame.onload = function() {
            var title = proxyWindow.document.title;
            console.log(&quot;Website title:&quot;, title);
            // You can display the title on the page as well if desired
            // document.getElementById(&quot;websiteTitle&quot;).innerHTML = title;
        };
    });
&lt;/script&gt;
</code></pre>
</body>
</html>
Reverse Proxy - [Website Title]

原文地址: https://www.cveoy.top/t/topic/jDZU 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录