command
module
Version:
v0.0.0-...-6127d8e
Opens a new window with list of versions in this module.
Published: Jul 17, 2018
License: Apache-2.0
Opens a new window with license information.
Imports: 18
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Hosts
自动生成 Hosts 文件,科学上网
图题《取经》(作者:@青红造了个白 ,侵删!)
特别声明
本项目仅作技术学习之用,不鼓励、不支持也不赞成任何互联网违法违规行为,任何不当使用的行为概与本项目无关!!!
特点
- 自动生成 Hosts 文件
- 超快的响应速度
- 支持 Windows 和 Linux 系统
更新日志
- 2018.02.18
- 添加配置文件
- 支持 Windows 和 Linux
- 2018.02.10
目前可访问网站
本项目只能解决 DNS 被污染情况,并不能解除 IP 封印,所以并不是对所有网站都适用。欢迎大家提交 issue ,告知其它网站访问情况,以便更新。
使用方法
直接下载可执行文件
根据平台直接下载各版本运行文件: releases
从源码编译本项目
go get -u github.com/henson/hosts
程序运行
修改同目录下配置文件 config.yaml,添加相应的目标网站,以“ | ”符号分隔
# 目标网站
hosts: "www.instagram.com|www.tumblr.com|www.flickr.com|www.medium.com|www.pinterest.com"
使用前,先备份系统中的 hosts 文件
Windows 系统下文件路径:
C:\Windows\System32\drivers\etc\hosts
Linux 系统下文件路径:
/etc/hosts
然后运行主程序
go run hosts.go
或
go build
./hosts
日常使用
在浏览器中使用 Https 来访问目标网站,为免 IP 修改或 DNS 被污染,建议每个月运行一下程序。如果本项目能给您工作和学习带来便利,请不吝 Star,谢谢!
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.