Microsoft Hosts Picker

Microsoft Hosts Picker

A modern asynchronous Python script to automatically find and select the fastest IP addresses for Microsoft services

一个现代化的异步 Python 脚本,可自动查找并选择 Microsoft 服务的最快 IP 地址

Key Features

核心功能

Asynchronous Testing

异步并发测试

Concurrent latency testing with intelligent early termination for optimal performance

并发延迟测试,智能提前终止,优化性能表现

Intelligent IP Selection

智能 IP 选择

Automatically identifies lowest-latency endpoints across multiple Microsoft services

自动识别多种 Microsoft 服务的最低延迟端点

Modern Architecture

现代化架构

Built with contemporary Python patterns and asynchronous programming principles

基于现代 Python 模式和异步编程原理构建

Modular Configuration

模块化配置

Flexible service definitions with customizable performance thresholds

灵活的服务定义与可自定义的性能阈值

Getting Started

快速开始

Terminal Session
终端会话
uv run MicrosoftHostsPicker.py
==============================================================
Microsoft Hosts Picker
==============================================================
✅ Configuration validated: 9 services ready
📋 Testing 9 Microsoft services
────────────────────────────────
🔍 [ 1/9] Testing Microsoft Account...
✅ [ 1/9] Microsoft Account -> 23.66.151.205 (36.9ms)
🔍 [ 2/9] Testing Xbox Live CDN...
✅ [ 2/9] Xbox Live CDN -> 23.202.34.235 (34.9ms)
🔍 [ 3/9] Testing Xbox Live CDN 2...
✅ [ 3/9] Xbox Live CDN 2 -> 23.40.180.10 (38.0ms)
🔍 [ 4/9] Testing Xbox Cloud Sync...
✅ [ 4/9] Xbox Cloud Sync -> 131.253.21.2 (36.1ms)
🔍 [ 5/9] Testing Office CDN...
✅ [ 5/9] Office CDN -> 218.2.0.234 (22.3ms)
🔍 [ 6/9] Testing Microsoft Store Images...
✅ [ 6/9] Microsoft Store Images -> 23.200.153.227 (35.3ms)
...
🔍 [ 9/9] Testing Windows Update...
✅ [ 9/9] Windows Update -> 182.101.26.120 (32.2ms)
==============================================================
Testing complete! Total time: 9.2 seconds
==============================================================
📋 Generating Hosts File
─────────────────────────
📄 Hosts file generated: hosts
📖 Usage Instructions:
1. View the contents of the generated hosts file
2. Copy only the necessary entries to the system hosts file
3. It is recommended to only replace problematic IP addresses
4. Some services use global CDN, which may not require manual configuration
🎯 Press Enter to exit...
View on GitHub 在GitHub上查看