How 521xueweihan/github520 works
GitHub520 generates and publishes host-to-IP mappings intended to improve GitHub access and image loading. Its main workflow resolves configured GitHub domains, combines DNS answers, selects a low-latency address, and writes hosts data; a separate updater imports the published JSON and regenerates outputs. Users or host-management tools consume the published hosts file. The source excerpts show the resolver and writers, while README statements establish the published endpoints and usage; the scheduled automation’s internal wiring is not shown.
Main entry points: fetch_ips.py Domain Resolver · common.py Hosts Formatter · hosts hosts · update_ips.py JSON Importer
Components 15
IP Discovery
- GitHub Domains
- DNS Services
- HTTPS Targets
- Domain Resolver
fetch_ips.py - IP Selector
fetch_ips.py
Content Generation
- Hosts Formatter
common.py - Published Hosts JSON
- Remote Hosts JSON
- JSON Importer
update_ips.py - hosts
hosts - hosts.json
hosts.json - README Output
README.md
Host Consumption
- Host Tools
- Raw Hosts Service
Other components
- User
Connections 15
- Domain Resolver → GitHub Domains: resolves
fetch_ips.py - Domain Resolver → DNS Services: queries DNS
fetch_ips.py - Domain Resolver → HTTPS Targets: tests latency
fetch_ips.py - Domain Resolver → IP Selector: ranks answers
fetch_ips.py - Domain Resolver → Hosts Formatter: writes mappings
fetch_ips.py - Hosts Formatter → hosts: writes
common.py - Hosts Formatter → hosts.json: writes
common.py - Hosts Formatter → README Output: updates
common.py - JSON Importer → Remote Hosts JSON: fetches
update_ips.py - JSON Importer → Hosts Formatter: regenerates content
update_ips.py - hosts → Raw Hosts Service: published as
README.md - hosts.json → Published Hosts JSON: published as
README.md - Raw Hosts Service → Host Tools: provides hosts
README.md - Host Tools → User: configures mappings
README.md - User → hosts: installs manually
README.md