2020年3月6日星期五

kubesail heroku V2Ray +Cloudflare Worker 反代

kubesail容器
https://kubesail.com/template/bclswl0827/v2ray

heroku容器
https://github.com/bclswl0827/v2ray-heroku

看这里还有其他部署脚本。

套Cloudflare反代的话参考下面:

登陆Cloudflare ,新建worker,粘贴下面的代码进去,红字改成你V2Ray服务器地址。
deploy,完工!


  1. addEventListener(
  2.   "fetch",event => {
  3.      let url=new URL(event.request.url);
  4.      url.hostname="需要反代的 V2Ray ws 服务器域名";
  5.      let request=new Request(url,event.request);
  6.      event. respondWith(
  7.        fetch(request)
  8.      )
  9.   }
  10. )


部署后等个1到2分钟后台才生效,用最新的Cloudflare域名+443+tls替代原先V2Ray域名使用就好。path还是原先参数。

速度取决于cf。晚高峰肯定慢些,但打开Google页面还是挺快。

参考:
https://www.hostloc.com/thread-585159-1-1.html








没有评论:

发表评论

openwrt在线编译 插件名字查找

openwrt在线编译 https://firmware-selector.staging.immortalwrt.org/ 插件名字查找 https://downloads.staging.immortalwrt.org/releases/23.05.1/packages/x8...