Giter VIP home page Giter VIP logo

hosts's Introduction

欢迎使用hosts!祝各位新年快乐!


请注意:下述使用指导均可能覆盖现有hosts,如现有hosts内容重要的话请备份
如果不想手动备份的话,请尝试Host Tools/Hozz


Windows

用文本编辑器(如记事本等)打开文件:

C:\Windows\System32\drivers\etc\hosts

并将我们的hosts文件中的内容全部内容复制到该文件中并保存。

然后请重置网络以便让更改生效。

注意:如果遇到无法保存,请右键文件hosts并找到“属性” -> “安全”,然后选择你登陆的用户名,最后点击编辑,勾选“写入”即可。

Mac OS

请 新建/修改 /private/etc/hosts 文件,并将我们的hosts文件中的内容全部内容复制到该文件中并保存。

然后请重置网络以便让更改生效。

也可以使用Gas Mask工具。

Android

请 新建/修改 /system/etc/hosts 文件,并将我们的hosts文件中的内容全部内容复制到该文件中并保存。

然后请重置网络以便让更改生效。

iOS

请 新建/修改 /etc/hosts 文件,并将我们的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'

并重置网络以便让更改生效。

Annoucement

  • 重置网络方法:断网/开启飞行模式(如果有的话) 并重新连接。
  • Linux、Mac、Android用户请用Notepad++ 转换文本编码和换行符格式,否则hosts可能会无法正常工作。对此你可以参考这个解决方案
  • Android和iOS需要root权限和越狱后才能访问hosts文件。
  • 由于部分App不支持SNI,故不推荐在移动设备上使用

任何疑问请确认在wiki无法找到解决方案后再Create A New Issue

License

  • 本项目的所有代码按照 MIT License 发布。
  • 本项目的hosts,README.MD,wiki等资源基于CC BY-NC-SA 4.0 这意味着你可以拷贝、并再发行本项目的内容,但是你将必须同样提供原作者信息以及协议声明。同时你也不能将本项目用于商业用途,按照我们狭义的理解(增加附属条款),凡是任何盈利的活动皆属于商业用途。若你无法遵守上述的责任和义务,请不要拷贝、并再发行本项目。 img-source-from-https://github.com/docker/dockercraft

hosts's People

Contributors

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

Watchers

 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.