通过 nginx 搞了一个反代,整合 谷歌学术, V2EX ,知乎等搜索的页面
https://www.v2ex.com/t/217643
通过 nginx 搞了一个反代,整合 谷歌学术, V2EX ,知乎等搜索的页面
arnofeng · 2015-09-01 18:26:48 +08:00 · 9155 次点击 这是一个创建于 615 天前的主题,其中的信息可能已经有所发展或是发生改变。原由
- 由于学校打不开谷歌学术,手机并不想总是开着 SS 之类。
- 方便检索 谷歌学术, V2EX ,知乎,百度网盘, Stackoverflow 等
网址和注意事项
- https://g.adminhost.org/
- 不要直接点击链接,需要复制到网址栏或者加书签(否则会 return 403 )
- 不要宣传的说,希望只是方便使用而已
一些无所谓的说明
1.Use SSL/https to ensure safety;
2.Forbid popular spiders like Google 、 Baidu;
3.Forbid any illegal refer;
4.Forbid any illegal robot;
5.Limit frequency of the same IP at 10 times in 1 second;
6.Can only access this site by typing the domian or using bookmarks;
7.If pages show "403 Forbid",try to delete "cookies" in your browser;
详细介绍点我
可以使用的域名(不要直接点,最后两个是 http )
- g.adminhost.org
- blogfeng.tk
- www.blogfeng.tk
- img.blogfeng.com
- js.blogfeng.com
| 1 2 |
|
| 101 luckykong 2016-01-01 22:31:45 +08:00 @ arnofeng 好像有错误 ··· echo "your google search domain is $DOMAIN2" echo "your google scholar domain is $DOMAIN1" echo -n "Enter any key to continue ... " ··· 这部分, domain2 和 domain1 ,是不是搞混了? |
| 102 arnofeng 2016-01-01 22:37:22 +08:00 @ luckykong 谢谢,我修复下 |
| 103 GPU 2016-01-02 01:04:17 +08:00 @ arnofeng 撒花。 明天部署一个。 么么哒。 |
| 104 sky170 2016-01-02 01:29:41 +08:00 感谢开源 |
| 105 arnofeng 2016-01-02 15:44:00 +08:00 @ GPU 部署哪儿啦 给我看看 @ sky170 应该的 |
| 106 GPU 2016-01-02 17:30:34 +08:00 @ arnofeng 还没有呢 。 今天赶着把路由器搞好。 |
| 107 GPU 2016-01-03 16:06:07 +08:00 @ arnofeng 貌似用不到啊 。 g.iu.vc : ERR_EMPTY_RESPONSE x.iu.vc : 跳回去谷歌域名了 |
| 108 GPU 2016-01-03 16:27:56 +08:00 @ arnofeng 不明真相 。重啓了幾次 nginx 之後 ,現在又正常了 。 配置文件都沒有動過 。 只有把日誌記錄的註釋取消掉 ,現在又加回去又正常了。 |
| 109 arnofeng 2016-01-03 16:32:38 +08:00 @ GPU 更新数次啦,看下这个 issue https://github.com/arnofeng/ngx_google_deployment/issues/1 |
| 110 arnofeng 2016-01-03 18:21:11 +08:00 via Android @ GPU 你的现在还有问题,学术倒是没问题。有没有再装一次? |
| 111 GPU 2016-01-03 19:23:30 +08:00 @ arnofeng 现在应该好了 , g.iu.vc 解析了两个不同 ip |
| 112 arnofeng 2016-01-03 19:37:12 +08:00 @ GPU 你的还是不行,用下面的命令更新下 nginx.conf https://github.com/arnofeng/ngx_google_deployment/issues/1 |
| 113 GPU 2016-01-03 19:40:40 +08:00 @ arnofeng 已更新。 |
| 114 GPU 2016-01-03 19:41:19 +08:00 @ arnofeng 直接打开 x.iu.vc 还是跳 |
| 115 arnofeng 2016-01-03 19:50:27 +08:00 @ GPU 已经根据你的问题测试和分析 原因找到了 是由于你是香港服务器, google 会根据你的地理位置 加.hk 所以很多时间会跳转。 |
| 116 arnofeng 2016-01-03 19:53:39 +08:00 @ GPU 解决方式更新了 https://github.com/arnofeng/ngx_google_deployment/issues/1 |
| 117 GPU 2016-01-03 20:15:01 +08:00 @ arnofeng 明白了. |
| 118 arnofeng 2016-01-03 21:03:01 +08:00 @ GPU 用了 ncr 方式 解决地区服务器问题 可以麻烦你再更新 nginx.conf 吗 |
| 119 GPU 2016-01-03 21:35:48 +08:00 @ arnofeng 已经更新并重启 ,用的是 #116 链接里面的更新方法. |
| 120 arnofeng 2016-01-03 21:38:54 +08:00 @ GPU 那个方式也换了。直接更新 conf 脚本, wget -N --no-check-certificate https://raw.githubusercontent.com/arnofeng/ngx_google_deployment/master/install.sh bash install.sh 选择 "update nginx.conf"。 |
| 121 GPU 2016-01-03 22:19:32 +08:00 @ arnofeng 我是这样子更新的啊 . 你 issues 里面就是这样子. |
| 122 arnofeng 2016-01-03 22:48:10 +08:00 @ GPU 你的还有问题不?我已经用 HK 服务器实测过没问题了 |
| 123 GPU 2016-01-03 23:41:39 +08:00 @ arnofeng 应该没有了 . 学术与 Google 都试过了. |
| 124 arnofeng 2016-01-04 07:57:29 +08:00 via Android @ GPU index.html 更新过了,你可以手动替换 |
| 125 GPU 2016-01-04 08:17:59 +08:00 @ arnofeng 好 der |
| 126 GPU 2016-01-04 08:45:55 +08:00 @ arnofeng 现在的问题是搜索之后跳到 https 了, 但是域名并没有改变。然而我没有开启 https 还有是如果直接打开 g.iu.vc/search 就会跳到 https://encrypted.google.com/webhp |
| 127 arnofeng 2016-01-04 08:54:36 +08:00 @ GPU 是我的问题,我写成了 https 了,已经修复,更新 index.html 即可,全文替换你的域名 |
| 128 GPU 2016-01-04 09:12:03 +08:00 @ arnofeng 我直接写成 goto("//x.iu.vc/scholar?hl=zh-CN&q="+encodeURIComponent(keyword2.value)+"&btnG=&lr=") 这样子应该可以直接支持 https 与 http |
| 129 arnofeng 2016-01-04 09:14:13 +08:00 @ GPU 你这是个好办法 哈哈 |
| 130 GPU 2016-01-04 09:55:12 +08:00 @ arnofeng 刚刚试了试 wenlu 的模块貌似配置你的也是可以 。 有人说 wenlu 的一定要 https 貌似也不是啊。 |
| 131 GPU 2016-01-04 09:56:47 +08:00 @ arnofeng 还有一个问题是 ,直接访问 Google 的话打开的是白色界面没有顶部黑条 。但是反代的就有。不明为什么是这样子。 |
| 132 arnofeng 2016-01-04 10:00:14 +08:00 @ GPU 因为我的都是原装原生的 nginx ,所以自己想干嘛就干嘛。自己的配置最好放到 /etc/nginx/vhost 文件夹下面,方便更新不影响。 wen.lu 的我没用过,不过很多人提了,应该是把配置文件封装成 nginx 的插件了。不过 google 的服务器会调整的,所以我的 nginx.conf 需要相应优化,所以我做了 update 功能。 wen.lu 的貌似跟我的是重复功能,二选一吧。我的配置都是可见的,查看下 nginx.conf ,都有详细注释。 |
| 133 arnofeng 2016-01-04 10:04:19 +08:00 @ GPU 1.直接开 google 是有黑色的,但是黑色上面是 Google+、图片等链接 2.反代没有,是因为根据我的配置,所有的 google.com 的资源都用反代域名替换了,顶部黑条原来使用 js 方式显示链接,我的反代配置会让它消失。 |
134 GPU 2016-01-04 10:16:12 +08:00 我直接打开国际版是没有的,用了 ncr 的。 |
| 135 arnofeng 2016-01-04 10:19:06 +08:00 @ GPU 我有= = ncr |
| 136 GPU 2016-01-04 10:25:29 +08:00 @ arnofeng 可能就像是你说的 , 没有反代哪个白色的东西 。 然后就显示黑色了。 |
| 137 arnofeng 2016-01-07 21:59:09 +08:00 via Android @ GPU 已经修改为你想要的。因为直接通过的是隐私保护谷歌域名,所以不一样。现在走的正常的。 |
| 138 GPU 2016-01-07 22:12:51 +08:00 @ arnofeng 好的好的。 。给力哦。 |
| 139 arnofeng 2016-01-07 22:25:30 +08:00 @ GPU 你的是两个结合 学术那里搜索后 再点击搜索那个图标 就会报错哦。 |
| 140 GPU 2016-01-07 23:28:45 +08:00 @ arnofeng 是哦 。不过我也不想修了。 够用就好了。 |
| 141 wkl17 107 天前 看完描述 第一反应 就想到了应该是用了 refer 判断的方式。 不知道楼主是否有研究过 屏蔽 360 云盾之类的检测的想法? 我之前观察了一下,只要用 360 浏览器访问过, 接着就会看到至少 2 个 IP 的来访,而且 UserAgent 跟普通用户无异, 不像 spider 的 UserAgent 。所以无法通过判断 UserAgent 的方式屏蔽。 可有什么好的方法屏蔽它的抓取、检测? 我之前想到的方式是,默认访问时 弹出一个确认框,让用户手动点提交,然后生成 cookie 或 session ,接下来以它作为凭证。但还未去实践过。看到此帖,抛出来探讨一下。 |
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
