[GH-ISSUE #3552] 泛域名证书 #2831

Closed
opened 2026-05-05 13:49:54 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @DavidTai780 on GitHub (Jul 25, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3552

Bug Description

若使用相同顶级域名的泛域名证书,将照成短时间内连续访问domain1与domain2,domain2会出现domain1的网站。(必须是使用同一张泛域名证书, 不使用SSL或使用各别域名颁发的证书则不会出现此问题)。

本人由于近期域名搬迁(有.ml至xyz),由原来的http letsencrypt证书签发改为cloudflare dns签发泛域名,才出现此状况。

已初步尝试由泛域名修改回使用各别子域名单独签发后不会再出现此问题,使用的配置相同。

frpc Version

0.51.2

frps Version

0.51.1

System Architecture

linux/arm64

Configurations

[common]
token = xxxxx
server_addr = frp.xxx.xxx
server_port = 7000
dns_server = 8.8.8.8

[TestHttp]
type = http
local_ip = 127.0.0.1
local_port = 33002
use_encryption = true
use_compression = true
custom_domains = test1.mysite.xyz

[TestHttps]
type = https
local_ip = 127.0.0.1
local_port = 33003
use_encryption = true
use_compression = true
custom_domains = test1.mysite.xyz
proxy_protocol_version = v2

[Test2Http]
type = http
local_ip = 127.0.0.1
local_port = 2000
use_encryption = true
use_compression = true
custom_domains = test2.mysite.xyz

[Test2Https]
type = https
local_ip = 127.0.0.1
local_port = 2110
use_encryption = true
use_compression = true
custom_domains = test2.mysite.xyz
proxy_protocol_version = v2

Logs

No response

Steps to reproduce

  1. 配置两个子域名网站(相同主要域名)
  2. 为两个子域名网站配置泛域名证书
  3. 使用FRP穿透两个子域名到相同的frps服务器
  4. 多次访问以上两个子域名网站,将会发现域名与原定内容错乱,domain1 的网站出现在domain2,domain2的网站出现在domain1。
  5. 该情况只会出现在短时间连续访问两个由相同frps服务器,相同泛域名证书的子域名。
    ...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @DavidTai780 on GitHub (Jul 25, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3552 ### Bug Description 若使用相同顶级域名的泛域名证书,将照成短时间内连续访问domain1与domain2,domain2会出现domain1的网站。(必须是使用同一张泛域名证书, 不使用SSL或使用各别域名颁发的证书则不会出现此问题)。 本人由于近期域名搬迁(有.ml至xyz),由原来的http letsencrypt证书签发改为cloudflare dns签发泛域名,才出现此状况。 已初步尝试由泛域名修改回使用各别子域名单独签发后不会再出现此问题,使用的配置相同。 ### frpc Version 0.51.2 ### frps Version 0.51.1 ### System Architecture linux/arm64 ### Configurations [common] token = xxxxx server_addr = frp.xxx.xxx server_port = 7000 dns_server = 8.8.8.8 [TestHttp] type = http local_ip = 127.0.0.1 local_port = 33002 use_encryption = true use_compression = true custom_domains = test1.mysite.xyz [TestHttps] type = https local_ip = 127.0.0.1 local_port = 33003 use_encryption = true use_compression = true custom_domains = test1.mysite.xyz proxy_protocol_version = v2 [Test2Http] type = http local_ip = 127.0.0.1 local_port = 2000 use_encryption = true use_compression = true custom_domains = test2.mysite.xyz [Test2Https] type = https local_ip = 127.0.0.1 local_port = 2110 use_encryption = true use_compression = true custom_domains = test2.mysite.xyz proxy_protocol_version = v2 ### Logs _No response_ ### Steps to reproduce 1. 配置两个子域名网站(相同主要域名) 2. 为两个子域名网站配置泛域名证书 3. 使用FRP穿透两个子域名到相同的frps服务器 4. 多次访问以上两个子域名网站,将会发现域名与原定内容错乱,domain1 的网站出现在domain2,domain2的网站出现在domain1。 5. 该情况只会出现在短时间连续访问两个由相同frps服务器,相同泛域名证书的子域名。 ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [X] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@fatedier commented on GitHub (Jul 25, 2023):

https://github.com/fatedier/frp/issues/628#issuecomment-473147400

之前 issue 有提到,看上去是一个通用的问题,简单来说就是这种情况不要使用泛域名证书。

<!-- gh-comment-id:1650119117 --> @fatedier commented on GitHub (Jul 25, 2023): https://github.com/fatedier/frp/issues/628#issuecomment-473147400 之前 issue 有提到,看上去是一个通用的问题,简单来说就是这种情况不要使用泛域名证书。
Author
Owner

@fatedier commented on GitHub (Jul 25, 2023):

frp 目前的 https,实际上是一个 sni proxy 的机制,不是请求级别的路由,所以一旦连接建立,后续的请求都在这个连接上。

<!-- gh-comment-id:1650122016 --> @fatedier commented on GitHub (Jul 25, 2023): frp 目前的 https,实际上是一个 sni proxy 的机制,不是请求级别的路由,所以一旦连接建立,后续的请求都在这个连接上。
Author
Owner

@DavidTai780 commented on GitHub (Jul 25, 2023):

好的明白。谢谢。

<!-- gh-comment-id:1650134184 --> @DavidTai780 commented on GitHub (Jul 25, 2023): 好的明白。谢谢。
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#2831
No description provided.