Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
txthinking committed Apr 3, 2015
1 parent 4a653cc commit 4a6c7c9
Showing 1 changed file with 17 additions and 38 deletions.
55 changes: 17 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,101 +3,80 @@ google-hosts

[**What**](#what) | [**How**](#how) | [**Must**](#must) | [**Contributing**](#contributing) | [**License**](#license) | [**Donate**](#donate)

**Notice**: *每天2:00-3:00点自动更新(建议有条件的同学自己跑脚本)*

What
---

此项目能有助于你访问Google服务
This projects can help you visit google service. (Only for research and study)

How
---

### 使用当前的[hosts][hosts]

> 程序不会覆盖你原有的hosts<br/>
> 首次更新时会向hosts文件写入一行`#TX-HOSTS`, 请不要删除它
**Windows 用户**

0. 请先退出所有杀毒软件
1. Windows XP 以上请使用管理员身份运行或赋予hosts文件可写权限
2. 使用及更新: [fuckGFW-64.exe][fuckGFW-64.exe](64位) / [fuckGFW-32.exe][fuckGFW-32.exe](32位)双击运行

**\*nix/OSX 用户**

0. 打开终端
1. 使用及更新: `$ curl -s https://freedom.txthinking.com/fuckGFW.py | sudo python`
2. 输入当前用户密码并回车

### 自己查找hosts

**`find.sh`查询某段IP详细信息**
**`find.sh` find ip detail from CIDR**

```
$ cd google-hosts/scripts
# 查询 192.168.1.1/24
# find ip from 192.168.1.1/24
$ ./find.sh 192.168.1.1/24
```

**`filter.sh`从output目录(由find.sh生成)过滤域名**
**`filter.sh`filter IP from output directory(generate by find.sh)for some domain**

```
$ cd google-hosts/scripts
# 过滤可用于*.google.com的域名
# filter IP for *.google.com
$ ./filter.sh *.google.com
# 过滤可用于mail.google.com的域名
# filter IP for mail.google.com
$ ./filter.sh mail.google.com
```

**`use.sh`使用过滤出的某个IP并更新hosts.all文件**
**`use.sh` use IP for some domain and update hosts.all**

```
$ cd google-hosts/scripts
# 使用可用于*.google.com 的IP 192.168.1.1
# use 192.168.1.1 for *.google.com
$ ./use.sh *.google.com 192.168.1.1
# 使用可用于mail.google.com 的IP 192.168.1.1
# use 192.168.1.1 for mail.google.com
$ ./use.sh mail.google.com 192.168.1.1
```

**`select.sh`结合了filter.sh, use.sh,自动选择最佳IP写入hosts.all文件, 并做了些特殊域名处理**
**`select.sh` run filter.sh, use.sh, use the best IP for domains in hosts.all**

```
$ cd google-hosts/scripts
$ ./select.sh
```

**`apply.sh`使用hosts.all文件更新../hosts文件**
**`apply.sh` use hosts.all to update ../hosts**

```
$ cd google-hosts/scripts
$ ./apply.sh
```

**`auto.sh`结合了find.sh, select.sh, apply.sh自动查询后选择最佳IP写入../hosts文件**
**`auto.sh` find CIDR and run find.sh, select.sh, apply.sh**

```
$ cd google-hosts/scripts
$ ./auto.sh
```

输出的四个字段含义
Explanation for output

| IP | LOSS | TIME | SSL |
| --- | --- | --- | --- |
| 此IP | 丢包率| PING值 | 可用ssl域名 |
| IP | packet loss | ping time | ssl domain |

Must
---

* 请使用境外DNS. 建议google dns + opendns一起用
* 请使用国际版google. 防止google本地化重定向: 访问一下<https://www.google.com/ncr>
* 请使用`https`替代`http`访问.
* Uuse regular DNS. e.g: google dns + opendns
* Use international google. Make google no country redirect: <https://www.google.com/ncr>
* Use `https`

Contributing
---
Expand Down

0 comments on commit 4a6c7c9

Please sign in to comment.