Closed hhdebb closed 1 year ago
@0wQ
有试过换 http 吗
证书没配置好,是不是用了自签名证书或者缺少证书中级根
证书没配置好,是不是用了自签名证书或者缺少证书中级根
域名证书是Letsencrypt,但是我看代码中请求http.request(method, url, nil, headers, body, timeout, callback),证书是忽略的,第三个参数
有试过换 http 吗
用https://api.day.app,没问题的。我自己又试了下http倒是可以了请求成功了,看来问题出在证书上面
检查一下服务器 TLS 最低版本是不是 TLSv1.3 Air724UG 好像最高支持到 1.2
检查一下服务器 TLS 最低版本是不是 TLSv1.3 Air724UG 好像最高支持到 1.2
检查了也不是1.3,暂时懒得折腾了,http先用着吧。感谢解惑
cloudflare 是不是开了 tlsv1.3 关掉就行
我遇到了类似的错误,除了已经提到的不支持 TLSv1.3
外,还有一点是:LuatTools
下载时不要勾选 添加默认lib
,而是手动导入作者提供的所有脚本
合宙提供的脚本(截至 2024.01.03)在请求 HTTPS
时如果没有配置客户端证书,则在 TLS
握手时不会发送 server_name
扩展,目前绝大多数开启 strictSni
的服务器会直接断开连接。如果需要使用新版本的官方脚本,需要手动修改 hostNameFlag
参数:
--- socket4G.lua
+++ socket4G.lua
@@ -161,7 +161,7 @@
elseif self.protocol == 'TCPSSL' then
local cert = {hostName = address}
local insist = 1
- local hostNameFlag = 0
+ local hostNameFlag = 1
if self.cert then
if self.cert.caCert then
if self.cert.caCert:sub(1, 1) ~= "/" then self.cert.caCert = "/lua/" .. self.cert.caCert end
或者像作者一样直接将 socket_connect_fnc
的最后一个参数固定为 1
请求部分日志如下: