[GH-ISSUE #1449] tcp配置proxy_protocol_version导致https失效 #1141

Closed
opened 2026-05-05 12:43:58 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @lostmaniac on GitHub (Sep 28, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1449

0.29版本
centos7

使用阿里云穿透到内网
由于frp不支持certbot

所以使用tcp方式穿透到nginx的443端口

看到文档上支持proxy_protocol_version = v2
但是tcp端口设置这个选项后,会导致https服务不能访问。

配置文件如下
[web_https]
type = tcp
local_ip = 127.0.0.1
local_port = 443
remote_port = 443
health_check_type = tcp
health_check_timeout_s = 3
health_check_max_failed = 3
health_check_interval_s = 10
proxy_protocol_version = v2

火狐浏览器链接报错如下

建立安全连接失败

连接到 cloud.maniac.vip 时发生错误。SSL 接收到一个超出最大准许长度的记录。 错误代码:SSL_ERROR_RX_RECORD_TOO_LONG

由于不能验证所收到的数据是否可信,无法显示您想要查看的页面。
建议向此网站的管理员反馈这个问题。
Originally created by @lostmaniac on GitHub (Sep 28, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1449 0.29版本 centos7 使用阿里云穿透到内网 由于frp不支持certbot 所以使用tcp方式穿透到nginx的443端口 看到文档上支持proxy_protocol_version = v2 但是tcp端口设置这个选项后,会导致https服务不能访问。 配置文件如下 [web_https] type = tcp local_ip = 127.0.0.1 local_port = 443 remote_port = 443 health_check_type = tcp health_check_timeout_s = 3 health_check_max_failed = 3 health_check_interval_s = 10 proxy_protocol_version = v2 火狐浏览器链接报错如下 建立安全连接失败 连接到 cloud.maniac.vip 时发生错误。SSL 接收到一个超出最大准许长度的记录。 错误代码:SSL_ERROR_RX_RECORD_TOO_LONG 由于不能验证所收到的数据是否可信,无法显示您想要查看的页面。 建议向此网站的管理员反馈这个问题。
Author
Owner

@fatedier commented on GitHub (Sep 28, 2019):

nginx 需要特殊配置支持解析这个协议。

<!-- gh-comment-id:536181412 --> @fatedier commented on GitHub (Sep 28, 2019): nginx 需要特殊配置支持解析这个协议。
Author
Owner

@lostmaniac commented on GitHub (Oct 1, 2019):

nginx 需要特殊配置支持解析这个协议。

X-Real-IP这个参数已经开启了

<!-- gh-comment-id:536915280 --> @lostmaniac commented on GitHub (Oct 1, 2019): > nginx 需要特殊配置支持解析这个协议。 X-Real-IP这个参数已经开启了
Author
Owner

@fatedier commented on GitHub (Oct 29, 2019):

nginx 要配置能够解析 proxy_protocol 协议。

<!-- gh-comment-id:547319743 --> @fatedier commented on GitHub (Oct 29, 2019): nginx 要配置能够解析 proxy_protocol 协议。
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#1141
No description provided.