{"id":10008127,"date":"2023-08-21T21:00:39","date_gmt":"2023-08-21T13:00:39","guid":{"rendered":"https:\/\/blog.itmax.cn\/?p=10008127"},"modified":"2023-08-21T21:00:39","modified_gmt":"2023-08-21T13:00:39","slug":"%e5%9b%bd%e5%86%85%e7%94%a8%e6%88%b7%e8%ae%bf%e9%97%ae-github-%e9%80%9f%e5%ba%a6%e6%85%a2%e6%80%8e%e4%b9%88%e5%8a%9e%ef%bc%9f%e5%88%ab%e6%85%8c%ef%bc%81%e4%b8%80%e6%8b%9b%e5%b8%ae%e4%bd%a0%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10008127","title":{"rendered":"\u56fd\u5185\u7528\u6237\u8bbf\u95ee Github \u901f\u5ea6\u6162\u600e\u4e48\u529e\uff1f\u522b\u614c\uff01\u4e00\u62db\u5e2e\u4f60\u89e3\u51b3\uff0c\u770b\u8fd9"},"content":{"rendered":"<p>\u5bf9\u4e8e\u6211\u4eec\u4ece\u4e8b IT \u884c\u4e1a\u7684\u6280\u672f\u4eba\u5458\u6765\u8bf4\uff0c\u5bf9\u4e8e Github \u80af\u5b9a\u662f\u975e\u5e38\u719f\u6089\u7684\u3002\u65e5\u5e38\u5de5\u4f5c\u4e2d\u5fc5\u5907\u7684\u5de5\u5177\u4e4b\u4e00\uff0c\u7531\u4e8e\u65f6\u5e38\u9047\u5230\u65e0\u6cd5\u8bbf\u95ee\u3001\u6216\u8005\u8bbf\u95ee\u901f\u5ea6\u5f88\u6162\u7684\u95ee\u9898\uff0c\u5bfc\u81f4\u4f7f\u7528\u8d77\u6765\u975e\u5e38\u7684\u4e0d\u4fbf\u3002<img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044135255\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\">\u6240\u4ee5\uff0c\u4eca\u5929\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u4e00\u6b3e\u8f6f\u4ef6\uff1afetch-github-hosts\u3002<img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044135256\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><\/p>\n<h2>\u7b80\u4ecb<\/h2>\n<p>fetch-github-hosts \u5b83\u662f\u4e00\u6b3e\u540c\u6b65 github hosts \u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u89e3\u51b3\u56fd\u5185\u65e0\u6cd5\u8bbf\u95ee GitHub \u7684\u95ee\u9898\u3002\u529f\u80fd\u975e\u5e38\u5f3a\u5927\uff0c\u8de8\u5e73\u53f0\uff0c\u652f\u6301 Windows\u3001Mac\u548c Linux \u7aef\uff0cUI \u975e\u5e38\u6f02\u4eae\uff01<img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044135257\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\">\u6b64\u9879\u76ee\u662f\u901a\u8fc7\u90e8\u7f72\u6b64\u9879\u76ee\u672c\u8eab\u7684\u670d\u52a1\u5668\u6765\u83b7\u53d6 github.com \u7684 hosts\uff0c\u800c\u4e0d\u662f\u901a\u8fc7\u7b2c\u4e09\u65b9ip\u5730\u5740\u63a5\u53e3\u6765\u8fdb\u884c\u83b7\u53d6\uff0c\u4f8b\u5982 ipaddress.com \u7b49\u3002<\/p>\n<p>\u65f6\u9694\u4e00\u5e74\u5927\u66f4\u65b0 v2.6 \u53d1\u5e03\uff0c\u5c06 fetch-github-hosts \u7684\u4f9d\u8d56\u53ca UI \u754c\u9762\u8fdb\u884c\u4e86\u5927\u66f4\u65b0\uff0c\u589e\u52a0\u4e86\u4e00\u4e9b\u975e\u5e38\u5b9e\u7528\u7684\u529f\u80fd\u3002<\/p>\n<ul>\n<li>\u5f00\u6e90\u5730\u5740\uff1a<a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=KMAfv58qIY8%2FASP7dDEamA%3D%3D.r9s8eELRFfw7qfUd41AonN6%2Bwz%2Fl2SjUjMMIO6vtDtkNyX1Ej5uc65sXKxBaCFHg\" rel=\"noopener noreferrer\">https:\/\/github.com\/Licoy\/fetch-github-hosts<\/a><\/li>\n<\/ul>\n<h2>\u5b89\u88c5\u4e0e\u4f7f\u7528<\/h2>\n<p>\u5b89\u88c5\u4e0e\u4f7f\u7528\u90fd\u975e\u5e38\u7684\u7b80\u5355\u3001\u6613\u7528\u3002<\/p>\n<ul>\n<li>\u4e0b\u8f7d\u5730\u5740\uff1a<a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=9qzxrKgg4cpR65q1sReJoA%3D%3D.Vklp2gO6CaIx7D6XHTIgLrLSmtJN6cmF9c%2F3NUhjdUD2T6YtMvJZpdA8irVg4VUhaCK8GMirpxEsyfGAz%2Bc97Q%3D%3D\" rel=\"noopener noreferrer\">https:\/\/github.com\/Licoy\/fetch-github-hosts\/releases<\/a><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044135258\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><\/li>\n<\/ul>\n<h4>Windows \u7aef<\/h4>\n<p>\u4e0b\u8f7d\u76f8\u5e94\u7684\u5b89\u88c5\u5305<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044135260\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><\/p>\n<p>\u53cc\u51fb\u8fd0\u884c\u4e4b\u540e\u7684\u754c\u9762\u5982\u4e0b\uff1a<img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044135261\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\">\u70b9\u51fb\u542f\u52a8\u4e4b\u540e\u663e\u793a\u5982\u4e0b\uff1a<img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044135262\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\">\u8fd9\u65f6\u4f60\u518d\u8bbf\u95eeGithub\u5c31\u4e0d\u4f1a\u51fa\u73b0\u4e4b\u524d\u7684\u8d85\u65f6\u73b0\u8c61\u4e86\u3002<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044135264\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><\/p>\n<p>\u9009\u62e9\u5ba2\u6237\u7aef\u7684\u4e3b\u673a\u6e90\uff1a<img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044135265\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\">\u4f60\u4e5f\u53ef\u4ee5\u81ea\u5b9a\u4e49\u4e3b\u673a\u6e90\uff1a<img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044135266\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><\/p>\n<p>\u670d\u52a1\u7aef\u6a21\u5f0f\uff1a<img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044135267\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044135268\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><\/p>\n<h4>\u547d\u4ee4\u884c\u7ec8\u7aef<\/h4>\n<p>\u76ee\u524d\u652f\u6301 Windows\/Linux\/MacOS \u3002<img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044135269\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\">\u5177\u4f53\u7684\u4f7f\u7528\u53ef\u4ee5\u53c2\u8003\uff1a<a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=cY6HDJGEdukqYANYXwGqyg%3D%3D.j35badvCVqPAMFR580n9sfHoeeuIVd0vIlH7xWOPeP6n%2BePTY7Y%2F%2FR7GLYu7if8HxhmQl8a7MIc%2BBwfMi2ESTw%3D%3D\" rel=\"noopener noreferrer\">https:\/\/github.com\/Licoy\/fetch-github-hosts\/blob\/main\/README.md<\/a> \u5b98\u65b9\u6587\u6863\u4ecb\u7ecd\uff0c\u8fd9\u91cc\u5c31\u4e0d\u518d\u8d58\u8ff0\u4e86\uff0c\u975e\u5e38\u7b80\u5355\u3002<\/p>\n<h6>\u624b\u52a8\u6dfb\u52a0 Hosts \u6587\u4ef6<\/h6>\n<p>\u9700\u8981\u6211\u4eec\u624b\u52a8\u8bbf\u95ee <a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=jOY7ciU0p%2F6Pzr2Cjc9Zig%3D%3D.519EPCH%2BEwzvQqUHYEp9goN2Qmi7QMraX8W90BlmaUExyJRIEh6OS4pZLRgmOJXx\" rel=\"noopener noreferrer\">https:\/\/hosts.gitcdn.top\/hosts.txt<\/a>\uff0c\u7136\u540e\u5c06\u4e0b\u9762\u7684\u5168\u90e8\u5185\u5bb9\u7c98\u8d34\u5230\u4f60\u7684 hosts \u6587\u4ef6\u4e2d\u5373\u53ef\u3002<\/p>\n<pre><code># fetch-github-hosts begin\n140.82.113.26               alive.github.com\n140.82.113.26               live.github.com\n185.199.108.154             github.githubassets.com\n140.82.114.21               central.github.com\n185.199.110.133             desktop.githubusercontent.com\n2606:50c0:8001::153         assets-cdn.github.com\n185.199.110.133             camo.githubusercontent.com\n185.199.109.133             github.map.fastly.net\n146.75.105.194              github.global.ssl.fastly.net\n140.82.113.3                gist.github.com\n185.199.111.153             github.io\n140.82.113.3                github.com\n192.0.66.2                  github.blog\n140.82.112.5                api.github.com\n2606:50c0:8002::154         raw.githubusercontent.com\n2606:50c0:8002::154         user-images.githubusercontent.com\n185.199.109.133             favicons.githubusercontent.com\n185.199.109.133             avatars5.githubusercontent.com\n185.199.108.133             avatars4.githubusercontent.com\n185.199.109.133             avatars3.githubusercontent.com\n185.199.108.133             avatars2.githubusercontent.com\n185.199.111.133             avatars1.githubusercontent.com\n185.199.109.133             avatars0.githubusercontent.com\n2606:50c0:8001::154         avatars.githubusercontent.com\n140.82.114.9                codeload.github.com\n54.231.163.161              github-cloud.s3.amazonaws.com\n52.216.54.233               github-com.s3.amazonaws.com\n54.231.133.153              github-production-release-asset-2e65be.s3.amazonaws.com\n52.216.104.235              github-production-user-asset-6210df.s3.amazonaws.com\n3.5.16.126                  github-production-repository-file-5c1aeb.s3.amazonaws.com\n185.199.109.153             githubstatus.com\n140.82.114.18               github.community\n52.224.38.193               github.dev\n140.82.114.22               collector.github.com\n2620:1ec:21::16             pipelines.actions.githubusercontent.com\n2606:50c0:8001::154         media.githubusercontent.com\n185.199.111.133             cloud.githubusercontent.com\n185.199.111.133             objects.githubusercontent.com\n# last fetch time: 2023-08-20 11:42:51\n# update url: https:\/\/hosts.gitcdn.top\/hosts.txt\n# fetch-github-hosts end<\/code><\/pre>\n<ul>\n<li>Linux \/ MacOS \u7cfb\u7edf hosts \u6587\u4ef6\u76ee\u5f55\uff1a\/etc\/hosts<\/li>\n<li>Windows hosts\u6587\u4ef6\u76ee\u5f55\uff1aC:\/Windows\/System32\/drivers\/etc\/hosts<\/li>\n<\/ul>\n<p>\u6ce8\uff1a\u4e0a\u9762\u7684\u6587\u4ef6\u5185\u5bb9\u662f\u52a8\u6001\u66f4\u65b0\u7684\uff08last fetch time: 2023-08-20 11:42:51\uff09\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u5b9a\u65f6\u4efb\u52a1\u53bb\u66f4\u65b0\u5373\u53ef\u3002<\/p>\n<p>\u6dfb\u52a0\u5b8c\u6587\u4ef6\u4e4b\u540e\uff0c\u6211\u4eec\u9700\u8981\u8fdb\u884c\u624b\u52a8\u5237\u65b0\u52a8\u4f5c\uff0c\u624d\u80fd\u662f\u4f7f\u4e4b\u751f\u6548\uff0c\u5177\u4f53\u64cd\u4f5c\u5982\u4e0b\uff1a<\/p>\n<pre><code>#\u00a0Linux\n\/etc\/init.d\/network\u00a0restart\n\n#\u00a0Windows\nipconfig\u00a0\/flushdns\n\n#\u00a0Macos\nsudo\u00a0killall\u00a0-HUP\u00a0mDNSResponder<\/code><\/pre>\n<p>Unix\/Linux \u7cfb\u7edf\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u5b8c\u6210\u81ea\u52a8\u6dfb\u52a0\u3001\u81ea\u52a8\u5237\u65b0\uff0c\u4e00\u952e\u542f\u52a8\u4e0e\u4f7f\u7528\u3002<\/p>\n<pre><code>sed\u00a0-i\u00a0&quot;\/#\u00a0fetch-github-hosts\u00a0begin\/Q&quot;\u00a0\/etc\/hosts\u00a0&amp;&amp;\u00a0curl\u00a0https:\/\/hosts.gitcdn.top\/hosts.txt\u00a0&gt;&gt;\u00a0\/etc\/hosts<\/code><\/pre>\n<p>\u56fe\u5f62\u754c\u9762\u7684\u4f7f\u7528\u8fd8\u662f\u975e\u5e38\u7b80\u5355\u3001\u65b9\u4fbf\u7684\uff0c\u603b\u4f53\u4f7f\u7528\u4e0b\u6765\uff0c\u4e2a\u4eba\u611f\u89c9\u8fd8\u662f\u4e00\u6b3e\u975e\u5e38\u4e0d\u9519\u7684\u8f6f\u4ef6\uff0c\u52a0\u901f\u6548\u679c\u975e\u5e38\u660e\u663e\u3002<\/p>\n<p>\u6709\u5174\u8da3\u7684\u670b\u53cb\u53ef\u4ee5\u4e0b\u8f7d\u4f53\u9a8c\uff0c\u5982\u679c\u4f60\u6709\u66f4\u597d\u7684\u52a0\u901f\u5de5\u5177\uff0c\u4e5f\u6b22\u8fce\u4f60\u5728\u8bc4\u8bba\u533a\u5206\u4eab\u4e00\u4e0b\uff0c\u5927\u5bb6\u4e00\u8d77\u5b66\u4e60\uff0c\u5171\u540c\u8fdb\u6b65\u3002<\/p>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000044135253\">https:\/\/segmentfault.com\/a\/1190000044135253<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5bf9\u4e8e\u6211\u4eec\u4ece\u4e8b IT \u884c\u4e1a\u7684\u6280\u672f\u4eba\u5458\u6765\u8bf4\uff0c\u5bf9\u4e8e Github \u80af\u5b9a\u662f\u975e\u5e38\u719f\u6089\u7684\u3002\u65e5\u5e38\u5de5\u4f5c\u4e2d\u5fc5\u5907\u7684\u5de5\u5177\u4e4b\u4e00\uff0c\u7531\u4e8e\u65f6 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10008127","post","type-post","status-publish","format-standard","hentry","category-share"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10008127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10008127"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10008127\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10008127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10008127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10008127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}