v2ray / v2ray-core

A platform for building proxies to bypass network restrictions.
https://www.v2ray.com/
MIT License
45.29k stars 8.94k forks source link

H2直连无法连接 #1062

Closed lidfgab closed 6 years ago

lidfgab commented 6 years ago

Please skip to the English section below if you don't write Chinese.

中文: 提交 Issue 之前请先阅读 Issue 指引,然后回答下面的问题,谢谢。 除非特殊情况,请完整填写所有问题。不按模板发的 issue 将直接被关闭。

1) 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明) 3.18

2) 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。 访问google,事实上现在访问什么都不通

3) 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等) 访问超时,客户端提示: 2018/04/19 10:36:42 [Warning] failed to handler mux client connection > Proxy|VMess|Outbound: failed to find an available destination > Retry: [Transport|Internet|HTTP: failed to dial to tcp:2.remotehost.org:443 > Put https://XXXX:443/ilgfw/cnus: remote error: tls: internal error] > Retry: all retry attempts failed 服务器提示: Apr 19 02:38:59 2 v2ray[695]: 2018/04/19 02:38:59 http: TLS handshake error from (访问源IP地址):7685: Transport|Internet|TLS: failed to create a new certificate for (访问目的fqdn)

4) 你期待看到的正确表现是怎样的? 能通。。。

5) 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

服务器端配置:

{ "log" : { "access": "/var/log/v2ray/access.log", "error": "/var/log/v2ray/error.log", "loglevel": "debug" }, "inbound": { "port": 443, "protocol": "vmess", "settings": { "clients": [ { "id": "UUID", "alterId": 64 } ] }, "streamSettings": { "network": "h2", "httpSettings":{ "path": "/ilgfw/cnus" }, "security": "tls", "tlsSettings": { "certificates": [ { "certificateFile": "/etc/v2ray/v2ray.cer", "keyFile": "/etc/v2ray/v2ray.key" } ] } } }, "outbound": { "protocol": "freedom", "settings": {} } } // 在这里附上服务器端配置文件


    客户端配置:
{
  "log": {
    "access": "",
    "error": "",
    "loglevel": ""
  },
  "inbound": {
    "port": 1080,
    "listen": "127.0.0.1",
    "protocol": "socks",
    "settings": {
      "auth": "noauth",
      "udp": true,
      "ip": "127.0.0.1",
      "clients": null
    },
    "streamSettings": null
  },
  "outbound": {
    "tag": "agentout",
    "protocol": "vmess",
    "settings": {
      "vnext": [
        {
          "address": "(Server FQDN)",
          "port": 443,
          "users": [
            {
              "id": "UUID",
              "alterId": 64,
              "security": "aes-128-gcm"
            }
          ]
        }
      ],
      "servers": null
    },
    "streamSettings": {
      "network": "h2",
      "security": "tls",
      "tlsSettings": {
        "allowInsecure": true,
        "serverName": null
      },
      "tcpSettings": null,
      "kcpSettings": null,
      "wsSettings": null,
      "httpSettings": {
        "path": "/ilgfw/cnus"
      }
    },
    "mux": {
      "enabled": true
    }
  },
  "inboundDetour": null,
  "outboundDetour": [
    {
      "protocol": "freedom",
      "settings": {
        "response": null
      },
      "tag": "direct"
    },
    {
      "protocol": "blackhole",
      "settings": {
        "response": {
          "type": "http"
        }
      },
      "tag": "blockout"
    }
  ],
  "dns": {
    "servers": [
      "8.8.8.8",
      "8.8.4.4",
      "localhost"
    ]
  },
  "routing": {
    "strategy": "rules",
    "settings": {
      "domainStrategy": "IPIfNonMatch",
      "rules": [
        {
          "type": "field",
          "port": null,
          "outboundTag": "direct",
          "ip": [
            "0.0.0.0/8",
            "10.0.0.0/8",
            "100.64.0.0/10",
            "127.0.0.0/8",
            "169.254.0.0/16",
            "172.16.0.0/12",
            "192.0.0.0/24",
            "192.0.2.0/24",
            "192.168.0.0/16",
            "198.18.0.0/15",
            "198.51.100.0/24",
            "203.0.113.0/24",
            "::1/128",
            "fc00::/7",
            "fe80::/10"
          ],
          "domain": null
        }
      ]
    }
  }
}
    // 在这里附上客户端配置

6) 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。

服务器端错误日志:

服务器没有明显日志 2018/04/18 13:18:01 [Debug] App|Log: Logger started 2018/04/18 13:18:01 [Warning] Core: V2Ray v3.18 started 2018/04/19 01:23:33 [Debug] App|Log: Logger started 2018/04/19 01:23:33 [Warning] Core: V2Ray v3.18 started 2018/04/19 02:50:12 [Debug] App|Log: Logger started 2018/04/19 02:50:12 [Warning] Core: V2Ray v3.18 started 但是systemctl status v2ray有如下输出

systemctl status v2ray

Apr 19 02:52:04 2 v2ray[745]: 2018/04/19 02:52:04 http: TLS handshake error from (源IP地址):7758: Transport|Internet|TLS: failed to create a new certificate for (目的FQDN) Apr 19 02:52:05 2 v2ray[745]: 2018/04/19 02:52:05 http: TLS handshake error from (源IP地址):7759: Transport|Internet|TLS: failed to create a new certificate for (目的FQDN) Apr 19 02:52:06 2 v2ray[745]: 2018/04/19 02:52:06 http: TLS handshake error from (源IP地址):7760: Transport|Internet|TLS: failed to create a new certificate for (目的FQDN) Apr 19 02:52:06 2 v2ray[745]: 2018/04/19 02:52:06 http: TLS handshake error from (源IP地址):7761: Transport|Internet|TLS: failed to create a new certificate for (目的FQDN) Apr 19 02:52:07 2 v2ray[745]: 2018/04/19 02:52:07 http: TLS handshake error from (源IP地址):7762: Transport|Internet|TLS: failed to create a new certificate for (目的FQDN) Apr 19 02:52:11 2 v2ray[745]: 2018/04/19 02:52:11 http: TLS handshake error from (源IP地址):7763: Transport|Internet|TLS: failed to create a new certificate for (目的FQDN) Apr 19 02:52:12 2 v2ray[745]: 2018/04/19 02:52:12 http: TLS handshake error from (源IP地址):7764: Transport|Internet|TLS: failed to create a new certificate for (目的FQDN) Apr 19 02:52:12 2 v2ray[745]: 2018/04/19 02:52:12 http: TLS handshake error from (源IP地址):7765: Transport|Internet|TLS: failed to create a new certificate for (目的FQDN) Apr 19 02:52:13 2 v2ray[745]: 2018/04/19 02:52:13 http: TLS handshake error from (源IP地址):7766: Transport|Internet|TLS: failed to create a new certificate for (目的FQDN) Apr 19 02:52:14 2 v2ray[745]: 2018/04/19 02:52:14 http: TLS handshake error from (源IP地址):7767: Transport|Internet|TLS: failed to create a new certificate for (目的FQDN)

客户端错误日志:
2018/04/19 10:51:53 [Warning] failed to handler mux client connection > Proxy|VMess|Outbound: failed to find an available destination > Retry: [Transport|Internet|HTTP: failed to dial to tcp:2.remotehost.org:443 > Put https://(目的FQDN):443/ilgfw/cnus: remote error: tls: internal error] > Retry: all retry attempts failed
2018/04/19 10:51:56 [Warning] failed to handler mux client connection > Proxy|VMess|Outbound: failed to find an available destination > Retry: [Transport|Internet|HTTP: failed to dial to tcp:2.remotehost.org:443 > Put https://(目的FQDN):443/ilgfw/cnus: remote error: tls: internal error] > Retry: all retry attempts failed
2018/04/19 10:52:03 [Warning] failed to handler mux client connection > Proxy|VMess|Outbound: failed to find an available destination > Retry: [Transport|Internet|HTTP: failed to dial to tcp:2.remotehost.org:443 > Put https://(目的FQDN):443/ilgfw/cnus: remote error: tls: internal error] > Retry: all retry attempts failed

7) 请附上访问日志。在 Linux 中,日志通常在 /var/log/v2ray/access.log 文件中。

  无日志

8) 其它相关的配置文件(如 Nginx)和相关日志。 无Nginx

9) 如果 V2Ray 无法启动,请附上 --test 输出。

通常的命令为 /usr/bin/v2ray/v2ray --test --config /etc/v2ray/config.json。请按实际情况修改。

10) 如果 V2Ray 服务运行不正常,请附上 journal 日志。

通常的命令为 journalctl -u v2ray

请预览一下你填的内容再提交。

如果你已经填完上面的问卷,请把下面的英文部份删除,再提交 Issue。

chenxuan5858 commented 6 years ago

同样问题,直连无法连通

lidfgab commented 6 years ago

必须通过caddy转一次?

DarienRaymond commented 6 years ago

升到 3.18.1 或者等 3.19 。

lidfgab commented 6 years ago

我现在的版本是V2Ray v3.18 (die Commanderin) 20180413,不是最新版么?

lidfgab commented 6 years ago

core升级为3.18.2,使用v2rayN 1.25版,仍然是一样的错误现象 2018/04/19 16:30:02 [Warning] failed to handler mux client connection > Proxy|VMess|Outbound: failed to find an available destination > Retry: [Transport|Internet|HTTP: failed to dial to tcp:2.remotehost.org:443 > Put https://(Server FQDN):443/: remote error: tls: internal error] > Retry: all retry attempts failed

lidfgab commented 6 years ago

感谢,Server和Client都升级到3.18.2,问题解决