zizifn / edgetunnel

Running V2ray inside edge/serverless runtime
GNU General Public License v2.0
6.75k stars 21.87k forks source link

Does it look like there is a problem with the code? #235

Open xc0000e9 opened 1 year ago

xc0000e9 commented 1 year ago

Does it look like there is a problem with the code? In nekobox this The error below is displayed. Failed: Get "https://www.google.com/": websocket close 1005 (no status)

zizifn commented 1 year ago

I don't use nekobox, does working in v2rayng?

Monirzadeh commented 1 year ago

i get something like this on v2ray linux that maybe related. it happen just on linux machine

ReadableStream was canceled, due to TypeError: First argument to DataView constructor must be an ArrayBuffer
zizifn commented 1 year ago

please try to make same config in the index page. Maybe you need add ws path?ed=

Monirzadeh commented 1 year ago

wired things is it work fine before but not now. i have ws and /?ed=in my config.

xc0000e9 commented 1 year ago

I don't use nekobox, does working in v2rayng?

With path?ed= the problem is solved. In v2rayng without /path?ed= tls handshake error was displayed. Before this, without /path?ed= configs worked easily.

mata8 commented 1 year ago

wired things is it work fine before but not now. i have ws and /?ed=in my config.

Starting last night Cloudflare seems changing the server side. It closes the connection before TLS handshake finished. Now it must put "/?ed=" in the ws path in order to work.

Also, only VLESS is affected. I ran a Xray server on Codesandbox.io, which use Cloudflare by default, only VLESS connection was dropped, VMESS and Trojan connections worked fine.

Monirzadeh commented 1 year ago

wired things is it work fine before but not now. i have ws and /?ed=in my config.

Starting last night Cloudflare seems changing the server side. It closes the connection before TLS handshake finished. Now it must put "/?ed=" in the ws path in order to work.

Also, only VLESS is affected. I ran a Xray server on Codesandbox.io, which use Cloudflare by default, only VLESS connection was dropped, VMESS and Trojan connections worked fine.

i a little confuse how should i change this part?

      "streamSettings": {
        "network": "ws",
        "quicSettings": {
          "header": {
            "type": "none"
          },
          "key": "/?ed=0000",
          "security": "addresss"
        },
        "security": "tls",
        "tlsSettings": {
          "allowInsecure": false,
          "fingerprint": "randomized",
          "publicKey": "",
          "serverName": "address",
          "shortId": "",
          "show": false,
          "spiderX": ""
        },
        "wsSettings": {
          "headers": {
            "Host": "addresss"
          },
          "path": "/?ed=0000"
        }
      },
      "tag": "proxy"
    },
future13800 commented 1 year ago

请问怎么部署

egg1234 commented 1 year ago

@xc0000e9 假设你用的是nekoray选择sing-box核心(这样软件界面的左上角会显示nekobox),现在必须在EarlyData Length框框填2048或512(实际测速没有区别),EarlyData name框框填Sec-Websocket-Protocol,这是sing-box规定的EarlyData的配置语法

如果是nekoray选择xray核心(这样软件界面的左上角会显示nekoray),现在必须在path后面加?ed=512或?ed=2048,当然这也是xray规定的EarlyData的配置语法

的确之前CF部署这个代码是不需要在客户端写EarlyData参数的,肯定是这几天CF做了变更引起的,当然这个不影响服务端的代码,现在测试看起来和服务端代码没有关系

egg1234 commented 1 year ago

@Monirzadeh 如果是xray的服务器,其实你根本不需要在配置文件里面写任何?ed=的参数(建议你删除),xray在服务器端是自动检测客户端的EarlyData参数行为的(这个你可以到github.com/XTLS/Xray-core项目的issue区搜索作者rprx的论述),其实关键还是你使用什么客户端,不同的客户端对于EarlyData参数的配置语法是完全不一样的,如xray的客户端直接写在path后面,而sing-box的客户端必须分开两个特别的配置参数EarlyData Length及EarlyData name,当然clash系列的也有自己规定的配置写法

Monirzadeh commented 1 year ago

如果是xray的服务器,其实你根本不需要在配置文件里面写任何?ed=的参数(建议你删除),xray在服务器端是自动检测客户端的EarlyData参数行为的(这个你可以到github.com/XTLS/Xray-core项目的issue区搜索作者rprx的论述),其实关键还是你使用什么客户端,不同的客户端对于EarlyData参数的配置语法是完全不一样的,如xray的客户端直接写在path后面,而sing-box的客户端必须分开两个特别的配置参数EarlyData Length及EarlyData name,当然clash系列的也有自己规定的配置写法

i remove that but still not working. so you think it is just a client issue? (maybe i don't get your point) do you have any suggestion?

egg1234 commented 1 year ago

对于以xray-core作为服务器端软件的情况,EarlyData参数的配置完全就是客户端的事情

zizifn commented 1 year ago

@xc0000e9 假设你用的是nekoray选择sing-box核心(这样软件界面的左上角会显示nekobox),现在必须在EarlyData Length框框填2048或512(实际测速没有区别),EarlyData name框框填Sec-Websocket-Protocol,这是sing-box规定的EarlyData的配置语法

如果是nekoray选择xray核心(这样软件界面的左上角会显示nekoray),现在必须在path后面加?ed=512或?ed=2048,当然这也是xray规定的EarlyData的配置语法

的确之前CF部署这个代码是不需要在客户端写EarlyData参数的,肯定是这几天CF做了变更引起的,当然这个不影响服务端的代码,现在测试看起来和服务端代码没有关系

对的感觉是 cf 做了点 runtime 改变,让 code 报错。我找个时间把本地环境升级下,然后 debug 下 fix 下吧。

zengge99 commented 1 year ago

@xc0000e9 假设你用的是nekoray选择sing-box核心(这样软件界面的左上角会显示nekobox),现在必须在EarlyData Length框框填2048或512(实际测速没有区别),EarlyData name框框填Sec-Websocket-Protocol,这是sing-box规定的EarlyData的配置语法 如果是nekoray选择xray核心(这样软件界面的左上角会显示nekoray),现在必须在path后面加?ed=512或?ed=2048,当然这也是xray规定的EarlyData的配置语法 的确之前CF部署这个代码是不需要在客户端写EarlyData参数的,肯定是这几天CF做了变更引起的,当然这个不影响服务端的代码,现在测试看起来和服务端代码没有关系

对的感觉是 cf 做了点 runtime 改变,让 code 报错。我找个时间把本地环境升级下,然后 debug 下 fix 下吧。

这几天时好时坏的,早上7点多的时候必须加?ed=2048才行,现在11点不加也可以了。昨天是一整天都不行。

Monirzadeh commented 1 year ago

somehow it fix today