Code Monkey home page Code Monkey logo

gohosts's Introduction

GoHosts - Google Hosts

最新可用 hosts

通过修改hosts文件进行科学上网,相当简单!
  • 本hosts仅限用于学术科研等正规用途,禁止传播
  • hosts源虽然在更新,但用的人多了,也就不好用了,因此禁止传播
  • 网站部署在SAE下,流量需要付费,所以还是禁止传播

Qt制作的一键式程序

下载 https://github.com/baidut/GoHosts/releases

image

不想下载?访问在线hosts

  1. 访问在线hosts 复制内容
  2. 替换系统的hosts文件

hosts文件位置

  • Widonws系统 系统盘:\windows\system32\drivers\etc\hosts
  • Linux/MAC系统 /etc/hosts
  • Android系统 同Linux,需要ROOT

【Windows】找系统hosts文件麻烦?

  1. 任意位置新建记事本,将下面的内容复制到记事本中
  2. 把记事本后缀名改为bat
  3. 以后以管理员账户打开该文件即可弹出系统hosts文件
notepad "%SystemRoot%\system32\drivers\etc\hosts"
ipconfig /flushdns
exit

【Windows】右键管理员身份运行比较麻烦?

  1. 创建具有管理员权限的快捷方式,具体方法自行百度
  2. 以后每次双击该快捷方式即可打开

gohosts's People

Contributors

baidut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

helldiablo

gohosts's Issues

hosts更新失败-502 Bad Gateway

<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor=\"white\">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>FetchUrl</center>
</body>
</html>

连接超时 我们向服务器发送请求 由于服务器当前链接太多,导致服务器方面无法给于正常的响应,产生此类报错
需要能够鉴别这种错误的发生然后提示用户重试
参考 502 Bad Gateway 怎么解决?

[hosts.php]Checking your browser..

<title></title><pre><html><body><h2>Checking your browser..<h2><script type="text/javascript" src="/aes.js" ></script><script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),b=toNumbers("98344c2eee86c3994890592585b49f80"),c=toNumbers("f2d344573530cd6ae987ecbee1c0759e");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/";location.href="http://hosts.52zz.gq/download/?ckattempt=1";</script></body></html></pre>

问题原因:
网站防止爬虫抓取,甄别出伪装的浏览器。如CURLOPT_USERAGENT中存在spider字符串,则会返回403 Forbidden-nginx
CURL伪造CURLOPT_USERAGENT:curl_setopt($ch, CURLOPT_USERAGENT, "spider");
由于资源已经停止更新,所以不再采用该方法

Qt获取远程文件

Qt客户端可以直接请求php文件,显示

<pre><html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor=\"white\">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>FetchUrl</center>
</body>
</html>
</pre>

说明php没有成功得到hosts文件内容

意见反馈

请在这里给出意见反馈,谢谢!
如添加 视频去广告hosts 、自定义hosts源、多个hosts源合并、hosts文件编辑、多hosts对比等功能
添加解析hosts利用地址资源提供一些好的服务,如谷歌搜索、专利检索、翻译等应用

IPv6

走IPv6下载百度网盘资源
通过ipv6访问谷歌等网站

科学上网方案整理

hosts方案
翻墙梯
EasyGoAgent项目
ipv6谷歌 速度很快

速度快,但需要自行搭建 chromegae(Chorme+GoAgEnt)http://www.ccav1.com/chromegae

  1. 下载解压,运行程序
  2. 先安装证书,解决私密链接的问题
  3. 然后appid(我的是名字拼音,可以从https://appengine.google.com/ 查看)谷歌账户和密码,然后部署,部署成功后配置软件

稍微有些麻烦,但很有效

公共Appid
ccav1-com-01|ccav1-com-02|ccav1-com-03|ccav1-com-04|ccav1-com-05|ccav1-com-06|ccav1-com-07|ccav1-com-08|ccav1-com-09|ccav1-com-10|ccav1-com-11|ccav1-com-12|ccav1-com-13|ccav1-com-14|ccav1-com-15|ccav1-com-16|ccav1-com-17|ccav1-com-18|ccav1-com-19|ccav1-com-20|ccav1-com-21|ccav1-com-22|ccav1-com-23|ccav1-com-24|ccav1com-1|ccav1com-2|ccav1com-3|ccav1com-4|ccav1com-5|ccav1com-6|ccav1com-7|ccav1com-8|ccav1com-9|ccav1com-10|ccav1com-11|ccav1com-12|ccav1com-13|ccav1com-14|ccav1com-15|ccav1com-16|ccav1com-17|ccav1com-18|ccav1com-19|ccav1com-20|ccav1com-21|ccav1com-22|ccav1com-23|ccav1com-24|maxqq0|maxqq3|ma1xqq1|ma1xyu2|ma1xyu3|ma1xyu4|ma1xyu5|ma1xyu6|ma1xyu7|ma1xyu8|ma1xyu9|ma1xyu10|ma1xyu11|ma1xyu12|ma1xyu13|ma1xyu14|ma1xyu15|ma1xyu16|ma1xyu17|ma1xyu18|ma1xyu19|ma1xyu20|ma1xyu21|ma1xyu22|ma1xyu23|dellqx21|dellqx20|dellqx15|dellqx7|dellqx12|dellqx23|dellqx6|dellqx8|dellqx16|dellqx18|dellqx11|dellqx19|dellqx9|dellqx22|dellqx13|dellqx10|dellqx5-973|dellqx2|dellqx1|dellqx3|rfcdma5414-973|dellqx4

ChromeWJ速度慢,基本上不去

QTextBrowser中的链接通过浏览器打开

QTextBrowser会试图自己打开链接,大部分时候这不是你想要的效果,所以要setOpenLinks(false)。之后捕获anchorClicked信号,然后调用ShellExecute函数用系统默认浏览器打开url。
参考:如何使用系统默认浏览器打开QTextBrowser中的链接

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.