|
2594 | 2594 | <div id="backupStatus" style="margin: 8px 0; color: #00ff00; font-family: 'Courier New', monospace; text-shadow: 0 0 3px #00ff00;">${t.proxyIPStatus}${t.checking}</div> |
2595 | 2595 | <div id="currentIP" style="margin: 8px 0; color: #00ff00; font-family: 'Courier New', monospace; text-shadow: 0 0 3px #00ff00;">${t.currentIP}${t.checking}</div> |
2596 | 2596 | <div id="echStatus" style="margin: 8px 0; color: #00ff00; font-family: 'Courier New', monospace; text-shadow: 0 0 3px #00ff00; font-size: 0.9rem;">ECH状态: ${t.checking}</div> |
2597 | | - <div id="echDebug" style="margin: 8px 0; padding: 8px; background: rgba(0, 20, 0, 0.6); border: 1px solid #00aa00; border-radius: 4px; color: #00aa00; font-family: 'Courier New', monospace; font-size: 0.8rem; display: none; white-space: pre-wrap; max-height: 200px; overflow-y: auto;"></div> |
2598 | 2597 | <div id="regionMatch" style="margin: 8px 0; color: #00ff00; font-family: 'Courier New', monospace; text-shadow: 0 0 3px #00ff00;">${t.regionMatch}${t.checking}</div> |
2599 | 2598 | <div id="selectionLogic" style="margin: 8px 0; color: #00aa00; font-family: 'Courier New', monospace; font-size: 0.9rem; text-shadow: 0 0 3px #00aa00;">${t.selectionLogic}${t.selectionLogicText}</div> |
2600 | 2599 | </div> |
|
3788 | 3787 |
|
3789 | 3788 | async function checkECHStatus() { |
3790 | 3789 | const echStatusEl = document.getElementById('echStatus'); |
3791 | | - const echDebugEl = document.getElementById('echDebug'); |
3792 | 3790 |
|
3793 | 3791 | if (!echStatusEl) return; |
3794 | 3792 |
|
|
3805 | 3803 | } |
3806 | 3804 | }); |
3807 | 3805 |
|
3808 | | - const echDebugHeader = response.headers.get('X-ECH-Debug'); |
3809 | 3806 | const echStatusHeader = response.headers.get('X-ECH-Status'); |
3810 | 3807 | const echConfigLength = response.headers.get('X-ECH-Config-Length'); |
3811 | 3808 |
|
3812 | 3809 | if (echStatusHeader === 'SUCCESS') { |
3813 | 3810 | echStatusEl.innerHTML = 'ECH状态: <span style="color: #44ff44;">✅ 已启用 (配置长度: ' + (echConfigLength || 'N/A') + ')</span>'; |
3814 | | - if (echDebugEl && echDebugHeader) { |
3815 | | - echDebugEl.style.display = 'block'; |
3816 | | - echDebugEl.textContent = 'ECH调试信息:\\n' + echDebugHeader.replace(/\s*\|\s*/g, '\\n'); |
3817 | | - } |
3818 | 3811 | } else if (echStatusHeader === 'FAILED') { |
3819 | 3812 | echStatusEl.innerHTML = 'ECH状态: <span style="color: #ff4444;">❌ 获取失败</span>'; |
3820 | | - if (echDebugEl && echDebugHeader) { |
3821 | | - echDebugEl.style.display = 'block'; |
3822 | | - echDebugEl.textContent = 'ECH调试信息:\\n' + echDebugHeader.replace(/\s*\|\s*/g, '\\n'); |
3823 | | - } |
3824 | 3813 | } else { |
3825 | 3814 | echStatusEl.innerHTML = 'ECH状态: <span style="color: #ffaa00;">⚠️ 未启用或未检测到</span>'; |
3826 | | - if (echDebugEl) { |
3827 | | - echDebugEl.style.display = 'none'; |
3828 | | - } |
3829 | 3815 | } |
3830 | 3816 | } catch (error) { |
3831 | 3817 | echStatusEl.innerHTML = 'ECH状态: <span style="color: #ff4444;">❌ 检测失败: ' + error.message + '</span>'; |
3832 | | - if (echDebugEl) { |
3833 | | - echDebugEl.style.display = 'block'; |
3834 | | - echDebugEl.textContent = '错误: ' + error.message; |
3835 | | - } |
3836 | 3818 | } |
3837 | 3819 | } |
3838 | 3820 |
|
|
0 commit comments