Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed To Decrypt Length > cipher: message authentication failed(ios和win链接没问题) #16

Closed
hellolvs opened this issue Aug 3, 2022 · 8 comments

Comments

@hellolvs
Copy link

hellolvs commented Aug 3, 2022

  1. 你正在使用哪个版本的 V2RayX,你的 macOS 系统版本?
    1.5.3, 12.5

  2. 如果 V2RayX 一切正常,但网络依然不如你所预料,请首先把 log level 切换到 debug,再次访问你想访问的网站。然后点击 V2RayX 的 view current config.json,将弹出的浏览器内的配置文件粘贴到下面指定的地方,但是隐藏掉ip/端口/id等信息。

{
"routing": {
"name": "all_to_main",
"domainStrategy": "AsIs",
"rules": [
{
"type": "field",
"outboundTag": "xray server",
"port": "0-65535"
}
]
},
"inbounds": [
{
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"ip": "127.0.0.1",
"auth": "noauth",
"udp": true
},
"tag": "socksinbound",
"port": 10808
},
{
"listen": "127.0.0.1",
"protocol": "http",
"settings": {
"timeout": 0
},
"tag": "httpinbound",
"port": 10809
}
],
"dns": {
"servers": [
"localhost"
]
},
"log": {
"error": "/var/folders/h2/7yd89htd0vs6r3h0mdd7345c0000gn/T/cenmrev.v2rayx.log/error.log",
"loglevel": "info",
"access": "/var/folders/h2/7yd89htd0vs6r3h0mdd7345c0000gn/T/cenmrev.v2rayx.log/access.log"
},
"outbounds": [
{
"sendThrough": "0.0.0.0",
"mux": {
"enabled": false,
"concurrency": 8
},
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "xxxx",
"users": [
{
"id": "xxxx",
"alterId": 0,
"security": "none",
"level": 0,
"encryption": "none"
}
],
"port": 9443
}
]
},
"tag": "xray server",
"streamSettings": {
"wsSettings": {
"path": "",
"headers": { }
},
"quicSettings": {
"key": "",
"security": "none",
"header": {
"type": "none"
}
},
"tlsSettings": {
"allowInsecure": true,
"alpn": [
"http/1.1"
],
"serverName": "xxxx",
"allowInsecureCiphers": true
},
"httpSettings": {
"path": ""
},
"kcpSettings": {
"header": {
"type": "none"
},
"mtu": 1350,
"congestion": false,
"tti": 20,
"uplinkCapacity": 5,
"writeBufferSize": 1,
"readBufferSize": 1,
"downlinkCapacity": 20
},
"tcpSettings": {
"header": {
"type": "none"
}
},
"security": "tls",
"network": "tcp"
}
}
]
}

然后点击 V2RayX 的view log,把 error.log 中的输出贴到下方:


2022/08/03 12:08:37 [Info] [849299284] app/proxyman/inbound: connection ends > proxy/socks: connection ends > context canceled
2022/08/03 12:08:37 [Info] [849299284] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: connection ends > context canceled
2022/08/03 12:08:41 [Info] [1862251504] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: connection ends > proxy/vmess/outbound: failed to read header > common/drain: common/drain: drained connection > proxy/vmess/encoding: Failed To Decrypt Length > cipher: message authentication failed
2022/08/03 12:08:41 [Info] [1862251504] app/proxyman/inbound: connection ends > proxy/socks: connection ends > proxy/socks: failed to transport all TCP response > io: read/write on closed pipe
  1. 其他你认为可以帮助开发者和你一起解决问题的信息:
    服务端是vless+xtls, win系统和ios都是没问题的
@hellolvs
Copy link
Author

hellolvs commented Aug 3, 2022

gui似乎没法手动修改protocol,默认是vmess。 我用导入json的方式改为vless后,报错变了

2022/08/03 13:21:36 [Info] [1606431311] app/proxyman/outbound: failed to process outbound traffic > proxy/vless/outbound: connection ends > proxy/vless/outbound: failed to decode response header > proxy/vless/encoding: unexpected response version. Expecting 0 but actually 72
2022/08/03 13:21:36 [Info] [1606431311] app/proxyman/inbound: connection ends > proxy/socks: connection ends > proxy/socks: failed to transport all TCP response > io: read/write on closed pipe

@tzmax
Copy link
Owner

tzmax commented Aug 14, 2022

gui似乎没法手动修改protocol,默认是vmess。 我用导入json的方式改为vless后,报错变了

2022/08/03 13:21:36 [Info] [1606431311] app/proxyman/outbound: failed to process outbound traffic > proxy/vless/outbound: connection ends > proxy/vless/outbound: failed to decode response header > proxy/vless/encoding: unexpected response version. Expecting 0 but actually 72
2022/08/03 13:21:36 [Info] [1606431311] app/proxyman/inbound: connection ends > proxy/socks: connection ends > proxy/socks: failed to transport all TCP response > io: read/write on closed pipe

@hellolvs you can try it with v1.5.4

@hellolvs
Copy link
Author

@tzmax still not work

2022/08/15 06:55:08 [Info] [1112059196] app/proxyman/outbound: failed to process outbound traffic > proxy/vless/outbound: connection ends > proxy/vless/outbound: failed to decode response header > proxy/vless/encoding: unexpected response version. Expecting 0 but actually 72
2022/08/15 06:55:08 [Info] [1112059196] app/proxyman/inbound: connection ends > proxy/socks: connection ends > proxy/socks: failed to transport all TCP response > io: read/write on closed pipe

@tzmax
Copy link
Owner

tzmax commented Aug 15, 2022

@hellolvs Can you export a config.json file available on windows or ios platform and let me know what's going on? Remember to hide information such as ip port and id.

@hellolvs
Copy link
Author

hellolvs commented Aug 18, 2022

@tzmax config.json from windows v2rayN

{
  "log": {
    "access": "Vaccess.log",
    "error": "Verror.log",
    "loglevel": "warning"
  },
  "inbounds": [
    {
      "tag": "socks",
      "port": 10808,
      "listen": "127.0.0.1",
      "protocol": "socks",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      },
      "settings": {
        "auth": "noauth",
        "udp": true,
        "allowTransparent": false
      }
    },
    {
      "tag": "http",
      "port": 10809,
      "listen": "127.0.0.1",
      "protocol": "http",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      },
      "settings": {
        "udp": false,
        "allowTransparent": false
      }
    }
  ],
  "outbounds": [
    {
      "tag": "proxy",
      "protocol": "vless",
      "settings": {
        "vnext": [
          {
            "address": "xxxx",
            "port": 9443,
            "users": [
              {
                "id": "xxx",
                "alterId": 0,
                "email": "t@t.tt",
                "security": "auto",
                "encryption": "none",
                "flow": "xtls-rprx-direct"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "tcp",
        "security": "xtls",
        "xtlsSettings": {
          "allowInsecure": true,
          "serverName": "xxx"
        }
      },
      "mux": {
        "enabled": false,
        "concurrency": -1
      }
    },
    {
      "tag": "direct",
      "protocol": "freedom",
      "settings": {}
    },
    {
      "tag": "block",
      "protocol": "blackhole",
      "settings": {
        "response": {
          "type": "http"
        }
      }
    }
  ],
  "routing": {
    "domainStrategy": "AsIs",
    "rules": [
      {
        "type": "field",
        "inboundTag": [
          "api"
        ],
        "outboundTag": "api"
      },
      {
        "type": "field",
        "outboundTag": "direct",
        "domain": [
          "domain:example-example.com",
          "domain:example-example2.com"
        ]
      },
      {
        "type": "field",
        "outboundTag": "block",
        "domain": [
          "geosite:category-ads-all"
        ]
      },
      {
        "type": "field",
        "outboundTag": "direct",
        "domain": [
          "geosite:cn"
        ]
      },
      {
        "type": "field",
        "outboundTag": "direct",
        "ip": [
          "geoip:private",
          "geoip:cn"
        ]
      },
      {
        "type": "field",
        "port": "0-65535",
        "outboundTag": "proxy"
      }
    ]
  }
}

@tzmax
Copy link
Owner

tzmax commented Aug 20, 2022

@hellolvs Thank you for your help, just now I tried to fix this problem and released the beta4 version, you can download and verify if it is fixed

@hellolvs
Copy link
Author

@tzmax It works! thank you

@mohsentta
Copy link

remove spaces from your nekoray folder and pathes. the core doesn work if there are spaces in it's path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants