v2ray-core icon indicating copy to clipboard operation
v2ray-core copied to clipboard

x509: certificate has expired or is not yet valid 同样一份配置文件,有的机器可以有的不行

Open Vargnatt opened this issue 2 years ago • 2 comments

我自己购买域名配置基于h2+nginx配置了,在windows电脑上稳定使用3年。 目前将客户端配置复制到mac上以后,使用V2RayU(core版本3.2)报错,具体为: 2022/05/03 18:35:36 [Info] [4057736577] proxy/socks: TCP Connect request to tcp:www.google.com:443 2022/05/03 18:35:36 [Info] [4057736577] app/dispatcher: default route for tcp:www.google.com:443 2022/05/03 18:35:36 [Info] [4057736577] common/mux: dispatching request to tcp:www.google.com:443 2022/05/03 18:35:36 tcp:127.0.0.1:50596 accepted tcp:www.google.com:443 [proxy] 2022/05/03 18:35:37 [Error] transport/internet/http: failed to dial to myserver.online:443 > x509: certificate has expired or is not yet valid: current time 2022-05-03T18:35:37+08:00 is after 2020-12-27T03:40:14Z 2022/05/03 18:35:37 [Error] transport/internet/http: failed to dial to myserver.online:443 > x509: certificate has expired or is not yet valid: current time 2022-05-03T18:35:37+08:00 is after 2020-12-27T03:40:14Z 2022/05/03 18:35:38 [Error] transport/internet/http: failed to dial to myserver.online:443 > x509: certificate has expired or is not yet valid: current time 2022-05-03T18:35:38+08:00 is after 2020-12-27T03:40:14Z 2022/05/03 18:35:39 [Warning] failed to handler mux client connection > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/internet/http: failed to dial to tcp:myserveronline:443 > Put "https://myserver.online:443/ray": x509: certificate has expired or is not yet valid: current time 2022-05-03T18:35:36+08:00 is after 2020-12-27T03:40:14Z transport/internet/http: failed to dial to tcp:myserver.online:443 > Put "https://myserver.online:443/ray": x509: certificate has expired or is not yet valid: current time 2022-05-03T18:35:37+08:00 is after 2020-12-27T03:40:14Z transport/internet/http: failed to dial to tcp:myserver.online:443 > Put "https://myserver.online:443/ray": x509: certificate has expired or is not yet valid: current time 2022-05-03T18:35:38+08:00 is after 2020-12-27T03:40:14Z] > common/retry: all retry attempts failed 2022/05/03 18:35:39 [Info] common/mux: failed to read metadata > io: read/write on closed pipe 2022/05/03 18:35:40 [Info] [2216922927] app/proxyman/inbound: connection ends > proxy/socks: connection ends > context canceled 我的服务器端配置文件为:

{ "port": 443, "protocol": "vmess", "settings": { "clients": [ { "id": "xxxxxxxx", "alterId": 64 } ] }, "streamSettings": { "network": "h2", "httpSettings": { "path": "/ray" }, "security": "tls", "tlsSettings": { "certificates": [ { "certificateFile": "/etc/v2ray/v2ray.crt", "keyFile": "/etc/v2ray/v2ray.key" } ] } } }

我的mac客户端的配置文件为:

outbounds": [ { "mux": { "enabled": true, "concurrency": 8 }, "protocol": "vmess", "streamSettings": { "tlsSettings": { "allowInsecure": true }, "security": "tls", "httpSettings": { "path": "/ray", "host": [ "" ] }, "network": "h2" }, "tag": "proxy", "settings": { "vnext": [ { "address": "myserver.online", "users": [ { "id": "xxxxxxxx", "alterId": 64, "level": 0, "security": "auto" } ], "port": 443 } ] } },

Vargnatt avatar May 03 '22 11:05 Vargnatt

是的

kingwilliam @.***> 于2022年5月5日周四 07:15写道:

是自签证书吗?

— Reply to this email directly, view it on GitHub https://github.com/v2fly/v2ray-core/issues/1767#issuecomment-1118017571, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQZ7BVLTTNKZDFR7GEBCFTVIMAJ7ANCNFSM5U6S5UUA . You are receiving this because you authored the thread.Message ID: @.***>

Vargnatt avatar May 05 '22 02:05 Vargnatt

  "outbounds": [
    {
      "mux": {
        "enabled": true,
        "concurrency": 8
      },
      "protocol": "vmess",
      "streamSettings": {
        "tlsSettings": {
          "allowInsecure": true
        },
        "security": "tls",
        "httpSettings": {
          "path": "/ray",
          "host": [""]
        },
        "network": "h2"
      },
      "tag": "proxy",
      "settings": {
        "vnext": [
          {
            "address": "myserver.online",
            "users": [
              {
                "id": "xxxxxxxx",
                "alterId": 64,
                "level": 0,
                "security": "auto"
              }
            ],
            "port": 443
          }
        ]
      }
    }
  ]
  1. 试试: 在服务器端和客户端 "httpSettings" 的 "host" 加入您的fqdn 如:"host": ["myserver.online"]
  2. 建议1: h2本身已包含mux功能, 所以 "mux"可以删除
  3. 建议2: outbounds已有TLS, 为何不转用vless

kingwilliam avatar May 10 '22 23:05 kingwilliam

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Sep 09 '22 02:09 github-actions[bot]