Giter Site home page Giter Site logo

chenyfan / clientworker Goto Github PK

View Code? Open in Web Editor NEW
265.0 5.0 61.0 1.52 MB

用规则驱动黑科技 || 一个基于规则的前端路由拦截器 || A simple, globally hijacked, easily customizable, Service Worker-based front-end worker

Home Page: https://clientworker.js.org

License: GNU Lesser General Public License v3.0

HTML 21.28% JavaScript 78.72%

clientworker's Introduction

ClientWorker

文档地址:ClientWorker

↑这也是用ClientWorker搭建的!

它能干什么

  • 绕备,在域名不变动的情况下,其余用户所有请求均可以定向到你的其他服务器或者cdn,而首屏域名无需ICP备案。
  • 降本,你可以用廉价的家宽+公网ipv4/ipv6,即使是80/443被封锁,你也可以在不变动端口的情况下将用户流量引向家宽。
  • 白嫖,可以用免费的公网穿透服务,接近零成本托管你的服务。
  • 加速,将静态资源流量(乃至动态资源)并发到全球cdn,实现前端级负载均衡。
  • 绕禁,通过在前端修改标头的方式,修复被故意篡改的MIME,正常托管网站,绕过各大托管商对于网站部署的限制,可以毫无负担的使用阿里云、腾讯云等对象存储而不用开启网站模式,乃至GithubRaw无限流量(绕过GithubPage 100GB限制)。
  • 愈合:通过并发方式,辅助JSDelivr、Unpkg、cdnjs等大陆几乎不可达请求重定向至其他cdn,从而实现无修改、全球加速。
  • 不宕,即使首屏服务器离线或不可达,已访问过的用户依旧可以正常命中备用服务器。
  • 缓存,颗粒化控制缓存,多种情况不同选择,智能调度缓存和请求,避免有缓存时无返回、缓存无法及时更新问题,确保缓存在客户端工作的更顺畅。
  • 离线,可以迅速支撑普通离线应用,助力快速构建PWA。
  • 兼容,Webp无缝,可以通过判断标头来判断是否支持Webp,并且自动替换图片请求,为网站加速助力。
  • 审核,通过内置的规则可以屏蔽并替换、拦截敏感词汇,实现网站内容安全。
  • 无刷,你不需要刷新就可以激活ClientWorker
  • 热更,即使源站完全宕机,你也可以更新用户手中的ClientWorker与配置,确保网站正常运行。
  • 切片,对于一个请求发起多个切片以提高单文件下载速度
  • 叠速,专门为ClientWorker开发的KFCThursdayVW50引擎能在浏览器端切片并同时并发不同的镜像服务器,对于下载大文件可以带宽叠加的效果。
  • 均衡,对多个镜像并发,选择最优的镜像服务器,保证网站的响应速度,同时达到负载均衡的目的。
  • 高度自定义...更多玩法等你挖掘

License

GPL-3.0-or-later

clientworker's People

Contributors

ah-dark avatar chenyfan avatar ducun avatar gamernotitle avatar xiaoyv404 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  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  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  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

clientworker's Issues

安装失败

网站:kjchmc.cn 为一个静态html页面,css资源为jsDelivr cdn链接。
按照网站的说明下载文件并进行配置后访问404.html下方安装提示全是乱码,最终提示err。
找了帮助手册,但是依然没有帮助。
本人小白,请大佬帮忙看一下,谢谢。
目前网站已删除cw。
代码仓库

JS.ORG CLEANUP

JS.ORG CLEANUP

Hello, it seems a js.org subdomain that was requested to target this repository no longer works.
The subdomain requested was clientworker.js.org and had the target of chenyfan.github.io/ClientWorker.
It produced the following failures when tested as part of the cleanup:

  • HTTP: Failed with status code '404 Not Found'
  • HTTPS: Failed with status code '404 Not Found'

To keep the js.org subdomain you should add a page with reasonable content within a month so the subdomain passes the validation.
Failure to rectify the issues will result in the requested subdomain being removed from JS.ORGs DNS and the list of active subdomains.

If you are wanting to keep the js.org subdomain and have added reasonable content, YOU MUST reply to the main cleanup issue with the response format detailed at the top to keep the requested subdomain.

🤖 Beep boop. I am a robot and performed this action automatically as part of the js.org cleanup process. If you have an issue, please contact the js.org maintainers.

[Feature Request] 支持任意status code以转发API

很多 API 在返回时都会使用状态码标识返回结果,因此可能会出现多种非“正常”但有效的状态码。目前 ClientWorker 在遇到非 200 或手动设置的状态码时会失败,而预期应将“合理”失败的结果(4xx)正确返回给前端。

协议需要明确

package.json 里的协议是 GPL-3.0-or-later,但是 repo 里的 LICENSE 却是 LGPL-3.0,这两个协议是不一样的,需要明确到底是哪个。

ICP绕备、家宽、动态加速,求助

大佬,我使用了文档中的三文件全域安装,部署在vercel上,cw-test-nu.vercel.app
源站地址为1.117.73.17。

然后是直接使用了,您提到的ICP绕备、家宽、动态加速这个例子。配置文件除了ip地址变了,应该和文档中的没有区别
然后也给源站开了ssl,用的zerossl,和你在v2ex上提到的应该是同一家
然后我也加上了Access-Control-Allow-Origin和Access-Control-Allow-Credentials为true
Access-Control-Allow-Origin允许的是cw-test-nu.vercel.app
使用的是宝塔面板部署的

但不知道为什么,cw一直会重试安装好像,然后我也试过关闭nginx防火墙,似乎也没什么用
因为没什么基础,也不清楚是哪里有问题
以下有三张截图:
image
image

G{@5RLODQV8NV%DIS2_R$XT

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.