Giter Site home page Giter Site logo

sharefun2068 / hosts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stay-sharp/hosts_for_google_service

0.0 2.0 0.0 1.64 MB

:statue_of_liberty:最新可用的google hosts文件

License: MIT License

QMake 2.13% C++ 32.28% Python 59.74% Shell 2.23% Batchfile 3.61%

hosts's Introduction

更多内容请访问hosts wiki


请注意:下述命令或指导均可能覆盖现有hosts,如现有hosts内容重要的话请备份后再尝试下述方法。 如果不想手动备份的话,请尝试HostsTool一些方便的scripts


Windows

用文本编辑器(如Notepad++|记事本)打开C:\Windows\System32\drivers\etc中的hosts文件, 把 -> hosts <- 全部内容复制到hosts文件中,保存后通过 开始 -> 运行 -> 输入cmd -> 在CMD窗口输入ipconfig /flushdns使其生效。
注意:如果遇到无法保存,请右键hosts->属性->安全,然后选择你登陆的用户名,最后点击编辑,勾选"写入"即可。

Linux

开启终端(快捷键为"Ctrl + Alt + T")输入bash -c 'wget https://raw.githubusercontent.com/racaljk/hosts/master/hosts -qO /tmp/hosts && sudo mv /tmp/hosts /etc/hosts'
最后在终端输入sudo systemctl restart NetworkManager
注意 : 非systemd发行版,终端输入sudo rcnscd restart,如果不清楚请两个都试一次,或者参考#100

Mac OS

可以使用Gas Mask工具修改

或者在/private/etc/目录下新建或修改hosts,然后终端输入sudo killall -HUP mDNSResponder使其生效。

Android

请在/system/etc目录下新建或修改hosts,然后通过开启飞行模式 -> 关闭飞行模式 的方式使其生效。

iOS

请在/etc目录下新建或修改hosts使其生效。

Annoucement

  • Linux、Mac、Android用户请用Notepad++ 转换文本编码和换行符格式,否则hosts可能会无法正常工作。对此你可以参考这个解决方案
  • Android和iOS需要root权限和越狱后才能访问hosts文件。
  • 由于部分App不支持SNI,故不推荐在移动设备上使用
  • 转载和使用过程中请保留hosts文件注释以及任何能体现版权的信息。
  • 衷心感谢每位参与开源hosts的用户Contributors

License

  • Code of this project is licensed under the MIT License
  • Content of this project (including hosts , wiki and Readme) is licensed under CC BY-NC-SA 4.0 img-source-from-https://github.com/docker/dockercraft

hosts's People

Contributors

andytimes avatar aofall avatar cdroad avatar chaosshen avatar cw881014 avatar fluviusmagnus avatar ir1d avatar k-guan avatar lautis0503 avatar lyrictian avatar qiuyuntao avatar rellyvadd avatar smounives avatar timothygu avatar whiteclover avatar y1yang0 avatar yingjie-lyu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.