- 🖥️ クロスプラットフォーム対応 — macOS (Intel & Apple Silicon)、Windows、Linux
- 🔄 クライアントモード — リモートソースからシステムへ自動的に Hosts を同期
- 🌐 サーバーモード — DNS 解決サービスを自前で構築、HTTP API を提供
- 🌓 ダーク / ライト / システム テーマモード
- 🌍 多言語対応 — 简体中文、English、日本語
- 🔒 スマート権限昇格 — 初回のみパスワード入力、セッション中は再入力不要
- 📡 システムトレイ — バックグラウンド実行、ワンクリックで起動/停止
Releases からお使いのプラットフォーム用のインストーラーをダウンロードしてください:
| プラットフォーム | ファイル形式 | アーキテクチャ |
|---|---|---|
| macOS | .dmg |
Universal (Intel + Apple Silicon) |
| Windows | .msi / .exe |
x86_64 |
| Linux | .deb / .AppImage |
x86_64 |
ダウンロード・インストール後、起動するだけです。グラフィカルなインターフェースで操作できます。
リモートの Hosts ソースから最新の GitHub DNS レコードを取得し、システムの hosts ファイルに書き込みます。
- 複数の Hosts ソースに対応(FetchGithubHosts、Github520)
- カスタム URL の設定が可能
- 自動取得間隔の設定(分単位)
ローカルで HTTP サーバーを起動し、GitHub ドメインを自動解決して hosts ファイルを提供します。
- デフォルトポート:
9898 hosts.txt(プレーンテキスト)とhosts.json(JSON)の2形式を提供- ダーク/ライトテーマ・多言語対応の Web ページを内蔵
Releases からお使いのプラットフォーム用のバイナリをダウンロードし、ターミナルから直接使用できます。
| パラメータ | 短縮形 | デフォルト値 | 説明 |
|---|---|---|---|
--mode |
-m |
なし(GUI起動) | モード: client(クライアント)/ server(サーバー) |
--interval |
-i |
60 |
hosts 取得間隔(分) |
--port |
-p |
9898 |
サーバーモードのリスニングポート |
--url |
-u |
https://hosts.gitcdn.top/hosts.txt |
クライアントモードのリモート hosts URL |
--template |
-t |
なし(内蔵テンプレート) | サーバーモードのカスタム HTML テンプレートファイルパス |
--lang |
-l |
自動検出 | 言語(zh-CN、en-US、ja-JP) |
# Linux/macOS
sudo ./fetch-github-hosts -m client
# Windows
fetch-github-hosts.exe -m client
# カスタム間隔(10分ごと)
sudo ./fetch-github-hosts -m client -i 10
# カスタム 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
# カスタムポート
./fetch-github-hosts -m server -p 6666
# カスタム HTML テンプレート
./fetch-github-hosts -m server -t /path/to/template.html💡 カスタムテンプレートは
{{FGH_VERSION}}(バージョン)と{{FGH_UPDATE_TIME}}(最終更新日時)のテンプレート変数をサポートしています
💡
-mパラメータを省略するとグラフィカルインターフェースが起動します
https://hosts.gitcdn.top/hosts.txt にアクセスし、内容をシステムの hosts ファイルに貼り付けてください。
- Linux / macOS:
/etc/hosts - Windows:
C:\Windows\System32\drivers\etc\hosts
# macOS
sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder
# Windows
ipconfig /flushdns
# Linux
sudo systemd-resolve --flush-cachessed -i "/# fetch-github-hosts begin/Q" /etc/hosts && curl https://hosts.gitcdn.top/hosts.txt >> /etc/hosts💡 crontab で定期実行すれば自動更新できます





