移动端 | 加入收藏 | 设为首页 | 最新ss | 赞助本站 | RSS
 

freefq.comfree——免费、自由fq——翻墙

困在墙内,请发邮件到freefqcom#gmail.com获得最新免费翻墙方法!
您当前的位置:首页 > 网络翻墙技巧

通用的全站镜像反向代理zmirror

时间:2016-10-07  来源:  作者: 条评论


 Cuz免费翻墙网

zmirror

zmirror version zmirror Build Status zmirror unittest coverage zmirror Dependency Status
zmirror PRs Welcome zmirror Gitter 
an http reverse proxy designed to automatically and completely mirror a website (such as google), support cache and CDN
一个Python反向HTTP代理程序, 用于快速、简单地创建别的网站的镜像, 自带本地文件缓存、CDN支持
比如国内可以访问的Google镜像/中文维基镜像 
自带了几个配置文件: 比如 Google镜像(含学术/其他/中文维基) twitter镜像 Youtube镜像 instagram镜像 Facebook镜像
完整列表请看zmirror自带镜像配置文件 
请在遵守当地相关法律法规的前提下使用本项目
本人拒绝为任何商业或非法目的提供任何技术支持
本项目仅为科研人员更方便地查询知识而创建, 请勿大范围传播
 

Demo

Screenshot

zmirror-screenshot-youtube-mirror--1080P
More screenshots are here: wiki-screenshots 
 

一键部署脚本

https://github.com/aploium/zmirror-onekey 
 

builtin configs

Together with the program, provided several (almost) out-of-box configs 
 

Google镜像 (整合中文维基镜像)

  • Gmail支持! (请访问 /gmail 并选择基础html视图)
  • 同时支持PC/手机
  • Google搜索与中文维基百科无缝结合
  • 大部分功能完全正常: 网页搜索/学术/图片/地图/新闻/图书/视频(搜索)/财经/APP搜索/翻译/网页快照/...
  • 目前暂时无法做到完美的登陆, 登录才可使用的功能部分无效
  • 不会被Google Ban掉
    传统的Nginx反代Google方案, 时间长了会被Google Ban掉, 或者弹图片验证码,
    这是由于Nginx反代镜像非常简陋, 用户的许多请求无法被正确发回到Google服务器,
    Google就会把真实的访问者当成是机器人.
    而zmirror比较完善, 用户的请求能全部发回到Google服务器, 不会被当成机器人

Twitter镜像

  • 支持PC站/手机 (两者需要以不同的域名部署, 详见配置)
  • 几乎所有功能完整可用, 大部分视频可以播放

Instagram镜像

  • 所有功能完整可用, 包括视频

Youtube镜像

  • 支持PC站/手机 (两者需要以不同的域名部署, 详见配置)
  • 视频播放、高清支持
  • 登陆支持、字幕支持
  • 小视频上传支持

Facebook镜像

  • 绝大部分功能可用, 但是不完整

自带其他的镜像配置文件

  • archive.org镜像
  • duckduckgo镜像
  • Dropbox镜像
  • Tumblr镜像
  • Economist(经济学人)镜像
  • thepiratebay(海盗湾)镜像
  • For more information, please see more_configs/readme.md

Requirements Install and Usage

Dependencies

Required

Optional

Theoretically, any environment that can run Python3.4+, can also run zmirror
Nginx was not officially tested, but it should work pretty well. 
However, due to my limited time, zmirror was only fully tested in: 
 
Ubuntu14.04-x86_64 Apache2.4 wsgi python3.4 Ubuntu16.04-x86_64 Apache2.4 wsgi python3.5 windows10-x64 Apache2.4 wsgi python3.5-x64  Ubuntu14.04-x86_64 directly run (I mean, just execute python3 wsgi.py) windows10-x64 directly run  

Installation and helloworld

This tutorial is mainly for your localhost demo test
If you want to deploy it to server, please complete the localhost demo first
  1. first, install python3
    Debian/Ubuntu apt-get install python3
    Windows go to python's homepage and download Python3.5 (or newer)
  2. install or upgrade flask and requests python3 -m pip install -U flask requests
  3. git clone https://github.com/aploium/zmirror
  4. copy the config_default.py to config.py 
     
    Warning: You should NEVER EVER modify the config_default.py itself
    Please edit the config.py instead of config_default.py
    Unless your are developer.
    Settings in the config.py would override the default ones
  5. Execute it: python3 wsgi.py
  6. Open your browser and enter http://127.0.0.1/, you will see exactly thewww.kernel.org, and you can click and browse around. everything of the *.kernel.org is withing the mirror.
  7. please see the following Deploy section

Deploy

请使用: 一键部署脚本 
若希望手工部署, 可以看以下教程: 
 
  1. 部署支持HTTPS和HTTP/2的zmirror镜像
  2. 在一台VPS部署多个zmirror镜像
Or, if you are familiar with flask, you can see flask's official deploy tutorial 
 

Upgrade

  • cd YOUR_ZMIRROR_FOLDER and then git pull
     
    警告
    由于 v0.27 有很大的结构改动, 所以 v0.27 以内的 custom_func.py 如果有 from zmirror import 语句
    将无法在 v0.27 以后的版本工作
    解决办法是将 custom_func.py 中的 from zmirror import 修改为
    from zmirror.zmirror import 其他不需要改变
    若使用自带配置文件, 则只有Youtube和Twitter受影响

Feature

  1. Completely mirror, provide some (almost) out-of-box configs
    创建非常完整的镜像, 既支持古老的网站(比如内网网站), 也支持巨型的现代化的网站
    提供几个(几乎)开箱即用的网站镜像配置文件
  2. Mirror ANY website, highly compatible
    非常高的兼容性和通用性, 可以镜像 任意 网站, 而不只是Google/Wiki/twitter/instagram, 而且功能都非常完整
    并且能很好地适应对现代化的、逻辑复杂、功能庞大的网站
    现在还在开发阶段, 虽然所有网站的绝大部分功能都可以开箱即用, 但是某些网站的某些功能仍然不完整, 正在不断改进
  3. (MIME-based) Local statistic file cache support (especially useful if we have low bandwidth or high latency)
    (基于MIME)本地静态文件缓存支持(当镜像服务器与被镜像服务器之间带宽很小或延迟很大时非常有用)
  4. CDN Support, hot statistic resource can serve by CDN, dramatically increase speed
    CDN支持. 让热门静态资源走CDN, 极大提高用户访问速度(特别是使用国内CDN, 而镜像服务器在国外时)
  5. Easy to config and deploy, highly automatic
    非常容易配置和部署, 镜像一个网站只需要添加它的域名即可
  6. Access control(IP, user-agent), visitor verification(question answer, or custom verification function)
    访问控制(IP, user-agent)与用户验证(回答问题, 也支持写自定义的验证函数)
  7. Automatically rewrite JSON/javascript/html/css, even dynamically generated url can ALSO be handled correctly
    自动重写JSON/javascript/html/css中链接, 甚至即使是动态生成的链接, 都能被正确处理
  8. Stream content support (audio/video)
    流媒体支持(视频/音频)
  9. Production ready.
    程序已经经受住了生产环境的考验 
     
    使用的服务器均为 256M OpenVZ VPS Google:       单台服务器     日6kPV, 峰值每小时740PV       峰值时段CPU占用小于10%   Youtube:       1台主服务器+8台视频服务器       日1wPV, 峰值每小时754PV       日发送流量178GB       高峰时段1080P流畅   

Issues Report

非常欢迎发issues, 发issues找我聊天都欢迎.
对于Apache(教程部署的即为Apache), 程序的日志在 /var/log/apache2/你自定义的日志文件名_error.log 中 
(以下只是可选步骤) 
 

Report zmirror Internal Error

当zmirror发生内部错误时(浏览器看到一个Internal Error页面), zmirror会把当前状态的快照保存到zmirror安装目录/error_dump/ 中
可以使用pickle来读取其中的dump文件.
如果存在对应的dump文件, 请在issues中附上 
 

Mirror A Website

本部分需要重写, 写的很乱, 也有点过时了 Mirror a website is very simple. 
Just set the target_domain to it's domain, the external_domains to it's external domain and sub domains such as static resource domains (If it has)
save and run, the program will do the other works! 
All detects and rewrites are completely AUTOMATICALLY 
tips: you can find a website's external domains by using the developer tools of your browser, it will log all network traffics for you 
 

Performance Enhance

Local Cache

Local file cache (along with 304 support) is implanted and enabled by default
If cache hits, you will see an x-zmirror-cache: FileHit in the response header.
Local cache will be deleted and cleaned once program exit. 
 

CDN Support

please see 使用七牛作为zmirror镜像的CDN 
 

Similar Projects

@zxq2233 youtube-php-mirroring
@greatfire website-mirror-by-proxy
@restran web-proxy
@isayme isayme/google
@zjuyxy google200
@cuber ngx_http_google_filter_module
@arnofeng ngx_google_deployment
@imlinhanchao ngx_proxy_wiki
@joymufeng play-google 
Cuz免费翻墙网

 Cuz免费翻墙网

 

来顶一下
返回首页
返回首页
欢迎评论:免登录,输入验证码即可匿名评论 共有条评论
用户名: 密码:
验证码: 匿名发表

推荐资讯

Octohide VPN:快如闪电的免费VPN
Octohide VPN:快如闪
原子网络加速器 - 免费高速VPN 一键链接 方便快捷
原子网络加速器 - 免费
foxovpn绿狐VPN——即连即用、快速、安全
foxovpn绿狐VPN——即
Dubai VPN - Free, Fast & Secure VPN下载
Dubai VPN - Free, Fa
相关文章
栏目更新
栏目热门
墙外新闻
读者文摘

你可以访问真正的互联网了。You can access the real Internet.

管理员精中特别提醒:本网站域名、主机和管理员都在美国,且本站内容仅为非中国大陆网友服务。禁止中国大陆网友浏览本站!若中国大陆网友因错误操作打开本站网页,请立即关闭!中国大陆网友浏览本站存在法律风险,恳请立即关闭本站所有页面!对于您因浏览本站所遭遇的法律问题、安全问题和其他所有问题,本站均无法负责也概不负责。

特别警告:本站推荐各种免费科学上网软件、app和方法,不建议各位网友购买收费账号或服务。若您因付费购买而遭遇骗局,没有得到想要的服务,请把苦水往自己肚子里咽,本站无法承担也概不承担任何责任!

本站严正声明:各位翻墙的网友切勿将本站介绍的翻墙方法运用于违反当地法律法规的活动,本站对网友的遵纪守法行为表示支持,对网友的违法犯罪行为表示反对!

网站管理员定居美国,因此本站所推荐的翻墙软件及翻墙方法都未经测试,发布仅供网友测试和参考,但你懂的——翻墙软件或方法随时有可能失效,因此本站信息具有极强时效性,想要更多有效免费翻墙方法敬请阅读本站最新信息,建议收藏本站!本站为纯粹技术网站,支持科学与民主,支持宗教信仰自由,反对恐怖主义、邪教、伪科学与专制,不支持或反对任何极端主义的政治观点或宗教信仰。有注明出处的信息均为转载文章,转载信息仅供参考,并不表明本站支持其观点或行为。未注明出处的信息为本站原创,转载时也请注明来自本站。

鉴于各种免费翻墙软件甚至是收费翻墙软件可能存在的安全风险及个人隐私泄漏可能,本站提醒各位网友做好各方面的安全防护措施!本站无法对推荐的翻墙软件、应用或服务等进行全面而严格的安全测试,因此无法对其安全性做保证,无法对您因为安全问题或隐私泄漏等问题造成的任何损失承担任何责任!

S. Grand Ave.,Suite 3910,Los Angeles,CA 90071

知识共享许可协议
本作品采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可。