我在向website发送请求时遇到问题。我正在使用“hentai”库在Python上使用nhentai API制作一个有用的电报机器人(请不要判断)。为什么我在Linux(Ubuntu)上会出现这个错误
:~$ curl -v https://nhentai.net
* Expire in 0 ms for 6 (transfer 0x55c3a8516530)
...
* Expire in 9 ms for 1 (transfer 0x55c3a8516530)
* Trying 104.27.195.88...
* TCP_NODELAY set
* Expire in 149985 ms for 3 (transfer 0x55c3a8516530)
* Expire in 200 ms for 4 (transfer 0x55c3a8516530)
* Connected to nhentai.net (104.27.195.88) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to nhentai.net:443
* Closing connection 0
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to nhentai.net:443
我在您提到的站点上尝试了curl和python的请求库,并提取了所需的内容。确保linux机器上的curl工作正常。如果需要,可以尝试下面的简单代码
您看到的是DPI解决方案的典型情况,该解决方案允许初始TCP连接,但一旦检测到您要连接的域名(包含在TLS握手客户端中),就会导致连接关闭
相关问题 更多 >
编程相关推荐