Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何将搜索到的 ip 使用到 hosts 文件中! #81

Closed
kwx opened this issue Apr 11, 2015 · 4 comments
Closed

如何将搜索到的 ip 使用到 hosts 文件中! #81

kwx opened this issue Apr 11, 2015 · 4 comments

Comments

@kwx
Copy link

kwx commented Apr 11, 2015

你好 , txthinking !
又是我, :)
之前我咨询过你一个问题,我用的是 OSX ,不能跑你的这个代码.
然后我就在 github 上找到了另外一个项目,python 写的,我就运行了代码,找到了一些 ip(假设这些ip有效) . 但是我不知道如何将这些 ip 使用到 hosts 文件中. ip 和 域名在 hosts 文件中应该怎么对应呢 ?
我该如何利用这些 ip ,搞出一份有效的 hosts 文件.
以下是我跑出的 ip 的一部分:
173.194.118.136
173.194.118.144
173.194.118.150
173.194.118.160
173.194.118.180
173.194.118.183
173.194.118.200
173.194.118.215
173.194.118.227
173.194.118.242
173.194.119.3
173.194.119.27
173.194.119.54
173.194.119.62
173.194.121.19
173.194.121.38
173.194.121.39
173.194.121.66
173.194.121.79
...
再次感谢你耐心的阅读啊!

@txthinking
Copy link
Owner

从上面的第一个IP 173.194.118.136 举个例子(还是得用脚本)

  1. 首先需要获得这个IP的详细信息, 你最关心的也就是能给哪个域名用
$ cd scripts
$ ./getssl.sh 173.194.118.136

大概会输出这样的数据(这四列数据说明README有)
173.194.121.39 0% 220 .google.com
然后你就知道了这个IP可作用于
.google.com 这个域名, 并且还速度还可以

  1. 然后使用这个IP
$ cd scripts
$ ./use.sh *.google.com 173.194.121.39
$ ./apply.sh

然后你就可以看到已经将这个IP写入项目根目录下的hosts文件了

On Sat, Apr 11, 2015 at 2:55 PM kwx [email protected] wrote:

你好 , txthinking !
又是我, :)
之前我咨询过你一个问题,我用的是 OSX ,不能跑你的这个代码.
然后我就在 github 上找到了另外一个项目,python 写的,我就运行了代码,找到了一些 ip(假设这些ip有效) . 但是我不知道如何将这些
ip 使用到 hosts 文件中. ip 和 域名在 hosts 文件中应该怎么对应呢 ?
我该如何利用这些 ip ,搞出一份有效的 hosts 文件.
以下是我跑出的 ip 的一部分:
173.194.118.136
173.194.118.144
173.194.118.150
173.194.118.160
173.194.118.180
173.194.118.183
173.194.118.200
173.194.118.215
173.194.118.227
173.194.118.242
173.194.119.3
173.194.119.27
173.194.119.54
173.194.119.62
173.194.121.19
173.194.121.38
173.194.121.39
173.194.121.66
173.194.121.79
...
再次感谢你耐心的阅读啊!


Reply to this email directly or view it on GitHub
#81.

@txthinking
Copy link
Owner

@kwx 顺便说下俺用的也是osx. 俺在上面用vagrant装了个那么好用的linux系统的虚拟机. 😆

@kwx
Copy link
Author

kwx commented Apr 11, 2015

谢谢啊! txthinking .
那我也去装一个 linux 虚拟机, 我就是不怎么懂这些东西. 下班回去琢磨一下.
苦逼啊~ 今天周六还在上班. :(

@txthinking
Copy link
Owner

@kwx 我也在加班 = = ||, 每天只能夜里搞非工作上的事情

On Sat, Apr 11, 2015 at 5:54 PM kwx [email protected] wrote:

谢谢啊! txthinking .
那我也去装一个 linux 虚拟机, 我就是不怎么懂这些东西. 下班回去琢磨一下.
苦逼啊~ 今天周六还在上班. :(


Reply to this email directly or view it on GitHub
#81 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants