
A GitHub Hosts synchronization tool designed to help researchers and learners access GitHub faster
Download from Releases:
| Platform | File Type | Architecture |
|---|---|---|
| macOS | .dmg |
Universal (Intel + Apple Silicon) |
| Windows | .msi / .exe |
x86_64 |
| Linux | .deb / .AppImage |
x86_64 |
Download, install, and run. The app provides a graphical user interface.
Fetches the latest GitHub DNS records from remote hosts sources and writes them to the system hosts file.
Starts a local HTTP server that auto-resolves GitHub domains and serves hosts files.
9898hosts.txt (plain text) and hosts.json (JSON) formatsDownload your platform's binary from Releases and use it directly in the terminal.
| Parameter | Short | Default | Description |
|---|---|---|---|
--mode |
-m |
None (opens GUI) | Mode: client or server |
--interval |
-i |
60 |
Fetch interval in minutes |
--port |
-p |
9898 |
Server mode listening port |
--url |
-u |
https://hosts.gitcdn.top/hosts.txt |
Client mode remote hosts URL |
--template |
-t |
None (built-in) | Server mode custom HTML template file path |
--lang |
-l |
Auto-detect | Language (zh-CN, en-US, ja-JP) |
# Linux/macOS
sudo ./fetch-github-hosts -m client
# Windows
fetch-github-hosts.exe -m client
# Custom interval (every 10 minutes)
sudo ./fetch-github-hosts -m client -i 10
# Custom URL
sudo ./fetch-github-hosts -m client -u http://127.0.0.1:9898/hosts.json
# Linux/macOS
./fetch-github-hosts -m server
# Windows
fetch-github-hosts.exe -m server
# Custom port
./fetch-github-hosts -m server -p 6666
# Custom HTML template
./fetch-github-hosts -m server -t /path/to/template.html
💡 Custom templates support
{{FGH_VERSION}}(version) and{{FGH_UPDATE_TIME}}(last update time) template variables💡 Omitting the
-mparameter launches the graphical user interface
Visit https://hosts.gitcdn.top/hosts.txt and paste the content into your system hosts file.
/etc/hostsC:\Windows\System32\drivers\etc\hosts# macOS
sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder
# Windows
ipconfig /flushdns
# Linux
sudo systemd-resolve --flush-caches
sed -i "/# fetch-github-hosts begin/Q" /etc/hosts && curl https://hosts.gitcdn.top/hosts.txt >> /etc/hosts
💡 Set up a crontab task for automatic updates





$ claude mcp add fetch-github-hosts \
-- python -m otcore.mcp_server <graph>