[English] | 简体中文
XiaomiUT is a website made to help users find and download official Xiaomi firmware directly from official mirrors. Adfree
- Smart Search: Quickly find firmware by device codename
- Downloads: Direct links to official Xiaomi mirrors (bigota/hugeota).
- Region Support: China, Global, EEA, India, and more
- Versatile: Support for OTA and Fastboot
- Framework: Next.js 14+ (Pages Router)
- Language: TypeScript
- Icons: @ant-design/icons
- Platform: Cloudflare Workers
- Runtime: Edge Runtime (JavaScript)
Xiaomi API servers have no CORS policies and browser block direct requests. You have two options:
-
Create a new Worker in your Cloudflare dashboard.
-
Copy the logic from
proxy/workers.jsto your worker. -
Important: Update the
Access-Control-Allow-Originheader to match your site's domain to ensure proper CORS security:newResponse.headers.set("Access-Control-Allow-Origin", "https://your-domain.com");
-
Deploy and copy the Worker URL.
If you prefer using your own backend (Nginx, Node.js, PHP), ensure it:
- Forwards requests to
update.miui.comand etc - Sets User-Agent:
Xiaomi-Update/3.0 - Handles CORS preflight (OPTIONS requests)
- Clone the repository:
git clone https://github.com/XiaomiUtils/XiaomiUT.git
cd XiaomiUT/frontend- Open
src/config.tsand point the URLs to your proxy:
export const API_CONFIG = {
OTA_BASE_URL: 'https://your-proxy.com/ota',
FASTBOOT_BASE_URL: 'https://your-proxy.com/fastboot',
TIMEOUT: 5000,
};-
Install and build:
npm install npm run build
-
Deploy your
frontend/outto your hosting