Skip to content

WDYIE/hosts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

更多内容请访问hosts wiki

Windows

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

Linux

Linux 系统终端下命令:
使用wget或curl,以wget为例:
开启终端(快捷键为"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,如果不清楚请两个都试一次。

Mac OS

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

Android

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

iOS

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

注意事项!

  • Linux、Mac、Android用户请用Notepad++ 转换文本编码和换行符格式,否则hosts可能会无法正常工作。对此你可以参考这个解决方案
  • Android和iOS需要root权限和越狱后才能访问hosts文件。
  • 由于部分App不支持SNI,故不推荐在移动设备上使用

其它

License

  • Code of this project is licensed under the MIT license.
  • Content of this project (including hosts , wiki and Readme) is licensed under CC4.0 BY-NC-SA

About

🗽最新可用的google hosts文件

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 61.5%
  • C++ 30.9%
  • Batchfile 3.5%
  • Shell 2.1%
  • QMake 2.0%
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy