Giter Site home page Giter Site logo

google-hosts's Introduction

google-hosts

为什么有这个项目

因为我每天都要访问Google, 以及我的朋友们也会访问Google.
然而朋友们对其他更复杂的代理未做深入研究, 最简单方法便是帮他们修改 hosts.
网上其他 hosts 项目有时未能及时更新, 为了朋友们方便, 所以便弄了这个项目.
此项目参考了smarthosts, ipv6-hosts.

IP不总是可用的, 因素可能是GFW封锁, Google IP变动.
另外Google的好多服务都已经不挂在北京的IP上了
你可以用此脚本自己去寻找可用IP.


脚本如何使用

直接使用DNS解析获取所有域名的IP(这个只能跳过DNS污染, 并不能保证IP是否被封锁)

$ cd google-hosts/scripts
$ make #结果会输出到google-hosts/hosts文件

查询某段IP详细信息(如:192.168.1.x)(这个可检测IP是否被封锁, 443端口是否被封锁)

$ cd google-hosts/scripts
$ ./getssl.sh 192.168.1

查询某段IP详细信息(如:192.168.x.x)

$ cd google-hosts/scripts
$ ./find.sh 192.168

输出的四个字段含义

IP LOSS TIME SSL
此IP 丢包率 PING值 可用ssl域名

另外获取Google IP段可供参考

$ nslookup -q=TXT _netblocks.google.com 8.8.8.8

下面的两个程序是用来将此项目内的hosts文件替换你系统hosts. 尤其是你的不懂程序的Windows朋友
注意: 如果此项目下hosts文件内的IP失效, 就需要你自己用脚本查询了(如果你查到好的IP不妨pull一下 :D)

Windows 用户如何使用

*nix 用户如何使用

  • 下载此脚本 updateHosts.py
  • 执行 $ sudo python updateHosts.py
  • 此程序不会覆盖你原有的 hosts

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.