@echo off setlocal set DOMAIN=pragma.academic-ruc.cc set CF_IP=104.21.2.164 set HOSTS=%SystemRoot%\System32\drivers\etc\hosts net session >nul 2>&1 if %errorlevel% neq 0 ( echo Requesting administrator privileges... powershell -NoProfile -ExecutionPolicy Bypass -Command "Start-Process '%~f0' -Verb RunAs" exit /b ) echo. echo === pragma DNS temporary fix === echo Domain: %DOMAIN% echo Cloudflare IP: %CF_IP% echo. echo This script adds a temporary hosts entry and flushes DNS cache. echo If the site later stops resolving, remove the old hosts entry first. echo. findstr /C:"%DOMAIN%" "%HOSTS%" >nul 2>&1 if %errorlevel% equ 0 ( echo Existing hosts entry: findstr /C:"%DOMAIN%" "%HOSTS%" echo. echo No changes made. Remove the old entry manually if it is outdated. pause exit /b ) echo.>> "%HOSTS%" echo # Cloudflare pragma - temporary DNS fix>> "%HOSTS%" echo %CF_IP% %DOMAIN%>> "%HOSTS%" echo Flushing DNS cache... ipconfig /flushdns echo. echo Done. Restart your browser, Claude Code, Codex CLI, or Cherry Studio. echo. pause