docker - 在 pptpd vpn 服务器之后运行 docker 容器时的 tls 握手超时
问题描述
如何重现它:
- 创建一个PPTP服务器
- 从您的主机连接 PPTP 服务器
- 在你的主机上运行一个 Debian docker 容器
- 在 Docker 容器中运行此命令: curl --insecure -v -i https://www.google.com
- 得到以下结果:
* Rebuilt URL to: https://google.com/
* Trying 216.58.221.238...
* TCP_NODELAY set
* Connected to google.com (216.58.221.238) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* Unknown SSL protocol error in connection to google.com:443
* Curl_http_done: called premature == 1
* stopped the pause stream!
* Closing connection 0
如果您执行以下任一操作,则不会发生此问题:
- 不要使用 PPTP 服务器,并在 docker 容器中运行 curl
- 不要使用 docker 容器,并在您的主机中运行 curl,该主机位于 pptpd 服务器之后
- 不要连接到https://www.google.com,而是在相同的 VPN 和 docker 条件下连接到https://www.wordpress.com
解决方案
原来是PPTP MTU问题。我必须将 ppp0 的 mtu 设置为较低的值以防止出现此问题。
推荐阅读
- google-analytics - 如何在 AMP 页面中获取用于谷歌分析的锚标记文本?
- postgresql - 如何通过坐标找到最近的父母或孩子?
- php - 联系表格提交无响应
- java - 我可以从静态代码外部“替换”Java 类吗?
- return - 是否可以在处理函数中返回形状(椭圆、矩形等)?
- sql - SELECT FROM DUAL可以有多行吗?
- java - JasperReports 用相同类型的数据填充新页面
- python - Celery - 在 tasks.py 中导入模型
- node.js - 将任何文档、图像、文本文件转换为 PDF
- ios - 要素图层标记未在 Esri ios SDK 中显示