[GH-ISSUE #2874] TCP转发支持HTTPS #2292

Closed
opened 2026-05-05 13:28:43 -06:00 by gitea-mirror · 8 comments
Owner

Originally created by @zyppe on GitHub (Mar 28, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2874

Describe the feature request

我不确定这个功能是否支持。有两个地方希望能直接使用HTTPS。我现在域名已经完成了HTTPS签名了,但是FRP管理页面以及使用TCP转发的页面都无法使用HTTPS。

Describe alternatives you've considered

举个例子:虽然管理页面运行在7500端口,但因为我的域名已经进行签名了,按道理可以用https://域名:7500 访问页面的,实际上报错。我也尝试过配置,以失败告终。另外,比如我需要将本地运行在8888端口的网页暴露在公网上,运行在40000端口,实际上用TCP配置就行,http://域名:40000端口 是可以访问,但是不能使用 https://域名:40000 。还请告诉我这个是没有实现还是我配置有问题。
如果可以支持,主要的优势是密码等传输可以在TLS下。另外只需要一个子域名有证书就可以反复复用他的证书。

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @zyppe on GitHub (Mar 28, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/2874 ### Describe the feature request 我不确定这个功能是否支持。有两个地方希望能直接使用HTTPS。我现在域名已经完成了HTTPS签名了,但是FRP管理页面以及使用TCP转发的页面都无法使用HTTPS。 ### Describe alternatives you've considered 举个例子:虽然管理页面运行在7500端口,但因为我的域名已经进行签名了,按道理可以用https://域名:7500 访问页面的,实际上报错。我也尝试过配置,以失败告终。另外,比如我需要将本地运行在8888端口的网页暴露在公网上,运行在40000端口,实际上用TCP配置就行,http://域名:40000端口 是可以访问,但是不能使用 https://域名:40000 。还请告诉我这个是没有实现还是我配置有问题。 如果可以支持,主要的优势是密码等传输可以在TLS下。另外只需要一个子域名有证书就可以反复复用他的证书。 ### Affected area - [X] Docs - [ ] Installation - [ ] Performance and Scalability - [X] Security - [X] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [X] Client Plugin - [X] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:28:43 -06:00
Author
Owner

@Becods commented on GitHub (Mar 29, 2022):

dashboard暂时不支持https (应该)
https请本地反代后使用tcp映射出去

<!-- gh-comment-id:1081781784 --> @Becods commented on GitHub (Mar 29, 2022): dashboard暂时不支持https (应该) https请本地反代后使用tcp映射出去
Author
Owner

@zyppe commented on GitHub (Mar 30, 2022):

后者我不是需要本地的https,而是使用服务器已经有的https

<!-- gh-comment-id:1082545361 --> @zyppe commented on GitHub (Mar 30, 2022): 后者我不是需要本地的https,而是使用服务器已经有的https
Author
Owner

@Becods commented on GitHub (Mar 30, 2022):

frpc only forwards requests to local TCP or UDP ports by default.

frp的tcp转发目前只支持纯转发,https请自行解决
或者使用http2https插件

<!-- gh-comment-id:1083012720 --> @Becods commented on GitHub (Mar 30, 2022): > frpc only forwards requests to local TCP or UDP ports by default. frp的tcp转发目前只支持**纯转发**,https请自行解决 或者使用http2https插件
Author
Owner

@MMMMMoris commented on GitHub (Apr 24, 2022):

我的理解是,你的https请求需要本地服务进行解密,而你的web的请求要么是通过nginx要么是apache来解密,你访问https://域名:7500 的请求用什么解密?如果没有的话当然会出错。你可以尝试在nginx里面进行转发服务器设置,也由nginx解密https请求,然后将请求转发到7500端口。以上个人实践成功后的意见。

<!-- gh-comment-id:1107891325 --> @MMMMMoris commented on GitHub (Apr 24, 2022): 我的理解是,你的https请求需要本地服务进行解密,而你的web的请求要么是通过nginx要么是apache来解密,你访问https://域名:7500 的请求用什么解密?如果没有的话当然会出错。你可以尝试在nginx里面进行转发服务器设置,也由nginx解密https请求,然后将请求转发到7500端口。以上个人实践成功后的意见。
Author
Owner

@MMMMMoris commented on GitHub (Apr 24, 2022):

我的理解是,你的https请求需要本地服务进行解密,而你的web的请求要么是通过nginx要么是apache来解密,你访问https://域名:7500 的请求用什么解密?如果没有的话当然会出错。你可以尝试在nginx里面进行转发服务器设置,也由nginx解密https请求,然后将请求转发到7500端口。以上个人实践成功后的意见。

请注意,你的DNS解析服务还必须支持对7500端口的https解析才能够成功访问,例如clodflare的https解析服务只支持443、8443等端口

<!-- gh-comment-id:1107895060 --> @MMMMMoris commented on GitHub (Apr 24, 2022): > 我的理解是,你的https请求需要本地服务进行解密,而你的web的请求要么是通过nginx要么是apache来解密,你访问[https://域名:7500](https://%E5%9F%9F%E5%90%8D:7500) 的请求用什么解密?如果没有的话当然会出错。你可以尝试在nginx里面进行转发服务器设置,也由nginx解密https请求,然后将请求转发到7500端口。以上个人实践成功后的意见。 请注意,你的DNS解析服务还必须支持对7500端口的https解析才能够成功访问,例如clodflare的https解析服务只支持443、8443等端口
Author
Owner

@github-actions[bot] commented on GitHub (May 25, 2022):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:1136563084 --> @github-actions[bot] commented on GitHub (May 25, 2022): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Author
Owner

@liov commented on GitHub (May 30, 2022):

我的理解是,你的https请求需要本地服务进行解密,而你的web的请求要么是通过nginx要么是apache来解密,你访问https://域名:7500 的请求用什么解密?如果没有的话当然会出错。你可以尝试在nginx里面进行转发服务器设置,也由nginx解密https请求,然后将请求转发到7500端口。以上个人实践成功后的意见。

他的意思所有流量直接转发到本地解密,不需要中间解密

<!-- gh-comment-id:1141042271 --> @liov commented on GitHub (May 30, 2022): > 我的理解是,你的https请求需要本地服务进行解密,而你的web的请求要么是通过nginx要么是apache来解密,你访问https://域名:7500 的请求用什么解密?如果没有的话当然会出错。你可以尝试在nginx里面进行转发服务器设置,也由nginx解密https请求,然后将请求转发到7500端口。以上个人实践成功后的意见。 他的意思所有流量直接转发到本地解密,不需要中间解密
Author
Owner

@github-actions[bot] commented on GitHub (Jul 1, 2022):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:1171801382 --> @github-actions[bot] commented on GitHub (Jul 1, 2022): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
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#2292
No description provided.