Giter Site home page Giter Site logo

Comments (9)

panpaul avatar panpaul commented on June 15, 2024 2

我遇到了类似的错误,除了已经提到的不支持 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

self.id = socket_connect_fnc(2, address, port, cert, rcvBufferSize, insist, nil, 1)

from air724ug-forwarder.

hhdebb avatar hhdebb commented on June 15, 2024

@0wQ

from air724ug-forwarder.

0wQ avatar 0wQ commented on June 15, 2024

有试过换 http 吗

from air724ug-forwarder.

naizhao avatar naizhao commented on June 15, 2024

证书没配置好,是不是用了自签名证书或者缺少证书中级根

from air724ug-forwarder.

hhdebb avatar hhdebb commented on June 15, 2024

证书没配置好,是不是用了自签名证书或者缺少证书中级根

域名证书是Letsencrypt,但是我看代码中请求http.request(method, url, nil, headers, body, timeout, callback),证书是忽略的,第三个参数

from air724ug-forwarder.

hhdebb avatar hhdebb commented on June 15, 2024

有试过换 http 吗

https://api.day.app,没问题的。我自己又试了下http倒是可以了请求成功了,看来问题出在证书上面

from air724ug-forwarder.

0wQ avatar 0wQ commented on June 15, 2024

检查一下服务器 TLS 最低版本是不是 TLSv1.3
Air724UG 好像最高支持到 1.2

from air724ug-forwarder.

hhdebb avatar hhdebb commented on June 15, 2024

检查一下服务器 TLS 最低版本是不是 TLSv1.3 Air724UG 好像最高支持到 1.2

检查了也不是1.3,暂时懒得折腾了,http先用着吧。感谢解惑

from air724ug-forwarder.

dumpmemory avatar dumpmemory commented on June 15, 2024

cloudflare 是不是开了 tlsv1.3 关掉就行

from air724ug-forwarder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.