@echo off
chcp 65001 >nul
echo.
echo   恢复 treelinclass206.xyz → 远程服务器...

net session >nul 2>&1
if %errorlevel% neq 0 (
    powershell -Command "Start-Process '%~f0' -Verb RunAs -Wait"
    exit /b
)

powershell -Command "(Get-Content '%SystemRoot%\System32\drivers\etc\hosts') -notmatch 'treelinclass206.xyz' | Set-Content '%SystemRoot%\System32\drivers\etc\hosts'"
echo   [✓] 已恢复，treelinclass206.xyz 指向远程服务器
echo.
pause
