Giter Site home page Giter Site logo

zizifn / edgetunnel Goto Github PK

View Code? Open in Web Editor NEW
5.1K 61.0 14.6K 8.78 MB

Running V2ray inside edge/serverless runtime

License: GNU General Public License v2.0

JavaScript 100.00%
cloudflare-workers v2ray edgefunctions v2ray-deno v2ray-serverless v2ray-edge v2ray-js v2ray-worker v2ray-nodejs v2ray-cloudflare

edgetunnel's Introduction


edgetunnel's People

Contributors

cuteist avatar emo-damage avatar etfans avatar github-actions[bot] avatar github-neo avatar klipsis avatar wy580477 avatar ybjj avatar zizifn 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  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

edgetunnel's Issues

目前因为cloudflare workers没法用了,这个方法应该不行了

前不久优选IP开始没法用了,所以导致现在heroku只能直连很慢,查了下好像是cloudflare被薅秃了,开始不给普通用户使用ip了,有新的解决方案,使用cloudflare argo就可以了,得到的域名是trycloudflare.com,所以现在的镜像需要修改内容来支持了。

https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64

./cloudflared-linux-amd64 tunnel --url http://localhost:8888 --no-autoupdate>argo.log 2>&1 &

cloudflare tunnel连接不上

使用***.herokuapp.com可以连接,但是用cloudflare tunnel的域名就是连接不上,两个域名都能返回Bad Request

账户被停用了

Hello,

This is a notice to inform you that your Heroku account ************.com has been suspended.

Reason for suspension: violation of the Heroku Acceptable Use Policy.

If you believe this account has been suspended in error, please email [email protected].

The Heroku Team

这个账户才开始用一两天就被停用了
请问下开发者有没有加密 或者能不能考虑加一个伪装页面

503 Service Unavailable

503 Service Unavailable
The requested deployment is currently suspended.

code: DEPLOYMENT_SUSPENDED

新的方式 https://github.com/zizifn/edgetunnel 秽土转生。。

新坑 https://github.com/zizifn/edgetunnel 前期POC 已经写完,自动选择最近节点。速度不错。

免费限制,
100,000 requests per day
100 GiB data transfer per month

足够日常使用。。近期会开一个repo。。就把这个repo, 改个名字把。。。。 如果有人想前期试验,可以联系我。

本项目违反 deno deploy 协议,请大家酌情使用,这个项目是为了最后的cloudflare worker准备的。deno deploy仅仅是前期验证。

貌似现在部署会有概率停掉,可能是因为使用太多?删除应用,重建一个好用,酌情使用吧。

算了,等我写一个 nodejs 版本的,撸其他支持 websocket 平台的吧。

我之所以选择 deno deploy 是我很喜欢 server less ,而且感觉 server less 特别适合 v2ray。

电报:
https://t.me/zizifn

Deploy on koyeb.com

Hi. thank you. finally this project worked for me.
I want to run it on 'koyeb.com' but I couldn't.
Please add koyeb deploy if it is possible.

加上heroku的自动切换功能吧

我得想法是这样的:
原因
heroku每个账号550h/月,只能用20多天;
功能描述
hreoku免费实例自动切换;
实现
方法1
每天凌晨利用action功能自动stop,早上自动start;
缺点
不一定哪天凌晨会使用,或者晚上因为不能访问Google而耗电增加;

方法2
两个heroku账号,上半个月和下半个月切换。或者白天晚上切换。
缺点
实现起来可能比较复杂,如果要客户端无感切用cf的话,需要action操作cf

关于封号的事

就是走大流量的被封了,我很多项目都被封了,只要涉及下载、上传,而且自heroku出事后这个限制很严格,好像长时间(几分钟都算)跑1-2M/S以上都会被封。除非你就浏览网页,不看高清视频

5月9日早晨节点突然无法用了!【建议直接使用heroku的URL】

5月8日上午按方案部署成功,今天早晨突然无法使用了,是被封了吗?

以下内容是repo owner的回复。。

谢谢各位等我反馈和信息。
看起来是 cloudflare worker 挂了,不是heroku的问题,另外请用不同运营商网络确认是否是某个运营商的问题。

  1. 如果是 cloudflare worker, 我也是没有办法的,如果大家手里有域名,请切换到更好的cloudflare tunnel
    https://github.com/zizifn/v2ray-heroku#%E5%BB%BA%E7%AB%8B-cloudflare-tunnel-%E5%8F%AF%E9%80%89
    或者
    https://owo.misaka.rest/cf-workers-ban-solution/
  2. 如果直接访问***.herokuapp.com, 仍然不好用
    1. 重新部署
    2. 如果重新部署失败,建议登录heroku 账户看下。是否登录上去? 建议绑定MFA。。 如果能登录上去,重新生成API key,HEROKU_API_KEY 并更新到github action中。
    3. 如果 重新部署不好用,删除app,换个名字,重新建立一个
    4. 如果重建不好用,建议切换到 欧洲eu

另外, herokuapp 是build 在AWS上, ip 不可能被墙完的。

项目无法使用

用了一段时间突然连不上了,检查不出问题,
重新部署出现警告
image

安卓端无法使用,请问如何排错

PC端使用v2rayN一切正常,同样的节点和配置在安卓上使用v2rayNG时app均无法使用,在手机浏览器上指定socks端口代理则正常,不知道什么原因。DNS策略均设置为ASIS

请教如何进行排错?

使用 vless 下的 main.ts 部署无法使用

使用 apps/deno-vless/src/main.ts 部署后,访问 deno 的项目地址,报以下错误:

request isn't trying to upgrade to websocket.

并且查看 deno 的日志发现报下面的错误:

[:0] request hadler has error TypeError: Stringified UUID is invalid
    at stringify (https://jspm.dev/npm:[email protected]:51:11)
    at WebSocket.socket.onmessage (file:///src/apps/deno-vless/src/main.ts:39:21)
    at WebSocket.wrappedHandler (deno:ext/web/02_event.js:1362:14)
    at innerInvokeEventListeners (deno:ext/web/02_event.js:755:9)
    at invokeEventListeners (deno:ext/web/02_event.js:795:7)
    at dispatch (deno:ext/web/02_event.js:664:11)
    at WebSocket.dispatchEvent (deno:ext/web/02_event.js:1043:14)
    at WebSocket.[[[eventLoop]]] (deno:ext/websocket/01_websocket.js:444:18)

提示要账号和密码!

我这里部署完成后!点击view后,跳转到网址,然后提示要账号和密码,但是我没有找到账号和密码在哪里?请大佬帮忙看看!第一次玩,谢谢大佬!

【调研】cloudfalre grpc

cloudfalre 目前只能 proxy grpc。暂时还不能拦截grpc.....即使可以,也需要相关人开发 grpc worker 版本。。

iOS能科学上网,电脑却不行

目前出现两个问题:
1.iOS小火箭配置好后可以科学上网,但今天经常有时候能连上,有时候就连不上,请问 有什么方法解决一下?
2.手机上配置能科学上网,但Windows电脑按照页面上v2RAY N的配置方法 配置 cloudflare worker 里dev的地址等 仍然无法连上,连接测延时提示timeout ( 有自己的域名)
麻烦大佬看看,谢谢!

cloudflare tunnel

HI
in my region heroku address its not accessible(blocked by gov)
i tried with Zerotrust tunnel but receive same result the page doesnt load
revers proxy on "Workers.dev" seems work only without TLS
what i can do to make it work

很棒的项目,给大佬点赞,不过有几个疑问

1 youtube 打不开 ,打开是白屏
deno debug 日志:
deno debug 日志

2 我看到官方doc里还讲到了有tw 和 hk 地区,是自动分配吗,可以自己指定吗?然后就很尴尬,宽带是sg,就很快,然后流量就变成us区了,不知道官方的分配是怎么样的
地区

小小的建议:其实大佬你可以像其他协议(比如 navie 或者 hysteria )一样写一个内核如何借助v2rayn来分流的,不需要用js来实现vless,这样只能支持更好一点

Heroku error

Heroku says We couldn't deploy your app because the source code violates the Salesforce Acceptable Use and External-Facing Services Policy.

CloudFlare Workers 被墙解决方案

https://owo.misaka.rest/cf-workers-ban-solution/
教程地址
在昨晚上,某个你们熟悉的玩意把CloudFlare Workers的玉米(workers.dev)给全线屏蔽了。这下对于我们有使用Heroku的单双号Workers脚本有很大的不便。今天的这篇教程就来和大家一起解决这个问题

准备材料
一枚域名
一个目前运行状态正常的Worker
部署步骤
登录至你的CloudFlare账号,选择你自己的域名
进入DNS选项,按照下图解析CMANE你的域名到Workers,打开小云朵
47c8df79f81a8735de5c981b5a44ff02_20220509182528

然后转到Workers,配置Workers路由

59c2fb75cb8e3a21c7bc5e8b4e185281_20220509182629

按照下图配置

6b16ee99b8339a3e308090894af7d6b6_20220509182713

Workers转发就设置完成了
接下来去一个字母叫V开头的软件,把Workers.dev域名换成你自己的域名
2a1db5ad8d1b48b702630e606938a1eb_20220509182750

见证奇迹的时刻发生了
建议开发者置顶

该项目(之前已部署完成),但现在提示 Cloudflare tunnel 需要更细,请作者指点一下(如何对已部署的项目进行组件更新)。

heroku 项目/ More/ View logs/

摘取部分log到下方
WRN Your version 2022.5.0 is outdated. We recommend upgrading it to 2022.5.1

请作者指点一下如何使用,已部署的该项目自带的网页控制台 (heroku 项目/ More/ Run console),使用命令进行更新组件。

谢谢作者能给予帮助,再次谢谢!

cloudflare tunnel连接不上

使用***.herokuapp.com可以连接,但是用cloudflare tunnel的域名就是连接不上,两个域名都能返回Bad Request

部署失败

fork完并修改了一些配置如下:

  • app.json文件

    {
      "name": "V2Ray",
      "description": "Deploy V2ray on Heroku.",
      "keywords": [
          "V2Ray"
      ],
      "env": {
          "UUID": {
              "description": "V2Ray UUID",
              "value": "ce7ea10b-5b27-49ab-a93d-6b184df9cce9"
          },
          "AID": {
              "description": "V2Ray AlterID",
              "value": 0
          }
      },
      "website": "https://github.com/zizifn/v2ray-heroku",
      "repository": "https://github.com/zizifn/v2ray-heroku",
      "stack": "container"
    }
  • startup.sh文件

    "inbounds": [
          {
              "port": $PORT,
              "protocol": "vmess",
              "settings": {
                  "clients": [
                      {
                          "id": "$UUID",
                          "level": 0,
                          "alterId": $AID
                      }
                  ],
                   "decryption": "none"
              },
              "streamSettings": {
                  "network": "ws",
                  "allowInsecure": false,
                  "wsSettings": {
                      "path": "/$UUID-vmess"
                  }
              }
          }
      ]
  • main.yml文件
    更新了版本 akhileshns/[email protected]

建立 Environments部署时报的错

image

CLIENT TO PROXY ERROR

使用代理的过程中,报一下错误,但代理还是能正常访问:

CLIENT TO PROXY ERROR
TypeError: terminated
    at Fetch.onAborted (C:\snapshot\edgetunnel\node_modules\undici\lib\fetch\index.js:1911:49)
    at Fetch.emit (node:events:537:28)
    at Fetch.terminate (C:\snapshot\edgetunnel\node_modules\undici\lib\fetch\index.js:94:10)
    at Object.onError (C:\snapshot\edgetunnel\node_modules\undici\lib\fetch\index.js:2052:34)
    at Request.onError (C:\snapshot\edgetunnel\node_modules\undici\lib\core\request.js:265:27)
    at errorRequest (C:\snapshot\edgetunnel\node_modules\undici\lib\client.js:1739:13)
    at TLSSocket.onSocketClose (C:\snapshot\edgetunnel\node_modules\undici\lib\client.js:998:5)
    at TLSSocket.emit (node:events:549:35)
    at node:net:747:14
    at TCP.done (node:_tls_wrap:582:7) {
  [cause]: SocketError: other side closed
      at TLSSocket.onSocketEnd (C:\snapshot\edgetunnel\node_modules\undici\lib\client.js:966:22)
      at TLSSocket.emit (node:events:549:35)
      at endReadableNT (node:internal/streams/readable:1359:12)
      at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
    code: 'UND_ERR_SOCKET',
    socket: {
      localAddress: 'x.x.x.x', // 这里IP我隐藏了
      localPort: 2607,
      remoteAddress: 'x.x.x.x', // 这里IP我隐藏了
      remotePort: 443,
      remoteFamily: 'IPv4',
      timeout: undefined,
      bytesWritten: 17695,
      bytesRead: 519872
    }
  }
}

我看了下自己本地是没有这个路径的,估计是项目有些文件引用没有弄好吧?

Error: Flag --app expects a value 小白请教,谢谢

start报错,请问怎么改?谢谢!
Run echo action is start
echo action is start
if [[ start == 'stop' ]]; then heroku ps:scale web=0 -a && echo "stop"; fi
if [[ start == 'start' ]]; then heroku ps:scale web=1 -a && echo "start"; fi
heroku ps -a
shell: /usr/bin/bash -e {0}
action is start
› Warning: heroku update available from 7.59.2 to 7.60.0.
› Error: Flag --app expects a value
› Warning: heroku update available from 7.59.2 to 7.60.0.
› Error: Flag --app expects a value
Error: Process completed with exit code 2.

部署到heroku后尝试ping部署的地址 超时

按着教程部署后,填入地址等信息 协议选的ws uuid自己生成并且改了heroku的环境变量
但是配置v2ray后,尝试使用 发现无法使用
ping了一下地址也是超时的,请问咋办
因为ping是timeout所以后面的cloudflare也没有弄了

加载一些比较大的文件容易断开连接

比如下载一个大约10m的文件,大概下载到3m左右断开.
日志如下:

[objects.githubusercontent.com:443] socket errored: ErrorEvent {
  bubbles: false,
  cancelable: false,
  composed: false,
  currentTarget: WebSocket {
  url: undefined,
  readyState: 3,
  extensions: undefined,
  protocol: null,
  binaryType: undefined,
  bufferedAmount: NaN
},
  defaultPrevented: false,
  eventPhase: 2,
  srcElement: null,
  target: WebSocket {
  url: undefined,
  readyState: 3,
  extensions: undefined,
  protocol: null,
  binaryType: undefined,
  bufferedAmount: NaN
},
  returnValue: true,
  timeStamp: 1672751750328,
  type: "error",
  message: "WebSocket protocol error: Connection reset without closing handshake",
  filename: "",
  lineno: 0,
  colno: 0,
  error: undefined
}

从vless转到vmess后无法使用

{ "inbounds": [ { "port": $PORT, "listen": "localhost", "protocol": "vmess", "settings": { "clients": [ { "id": "$UUID", "alterId": 0 } ] }, "streamSettings": { "network": "ws", "wsSettings": { "path": "/" } } } ], "outbounds": [ { "protocol": "freedom", "settings": {} } ] }

最近还是想切换会vmess,就尝试在improve-tunnel分支下仅修改了startup.sh的配置文件为vmess,如上所示,部署成功了,但是访问heroku的链接后总是Application error。换了我其它vps上的配置文件都不行,不知道是哪里还需要操作?

i get an error,how to fix it?

failed to handler mux client connection > Proxy|VMess|Outbound: failed to find an available destination > Retry: [Transport|Internet|WebSocket: failed to dial WebSocket > Transport|Internet|WebSocket: failed to dial to (wss://141.101.121.13/): > remote error: tls: handshake failure] > Retry: all retry attempts failed

两个域名

冒昧的问一下,有两个域名那个是hostname?

现在actions好像部署不了,在deploy这一步失败

报错如下:

Run akhileshns/[email protected]
Created and wrote to ~/.netrc
› Warning: Our terms of service have changed:
https://dashboard.heroku.com/terms-of-service
WARNING! Your password will be stored unencrypted in /home/runner/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Successfully logged into heroku
› Error: You do not have access to the app ***.

› Error ID: forbidden
Creating ***... !
▸ Name *** is already taken
Error: Error: Command failed: heroku create *** --region us
Creating ***... !
▸ Name *** is already taken

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.