[GH-ISSUE #3256] [BUG]子域名判断有问题吗 #2610

Closed
opened 2026-05-05 13:40:57 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @tgNotHouse on GitHub (Jan 16, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3256

Bug Description

比如服务器的配置image这里SubDomainHost字段子域名是test.frp.com,

然后客户端申请了一个http隧道,子域名是 1.test.frp.com,写在客户端的配置的这里
image

启动之后,客户端就会收到下面的错误
start error: proxy [8bccb21a898d5958.http] domain conf check error: custom domain [1.test.frp.com] should not belong to subdomain_host [test.frp.com]

是不是这里的判断有问题,是不是我写错了
image

frpc Version

0.46.1

frps Version

0.46.1

System Architecture

linux/amd64

Configurations

[http]
privilege_mode = true
type = http
local_ip = 127.0.0.1
local_port = 80
custom_domains = 1.test.frp.com
use_encryption = true
use_compression = true

Logs

start error: proxy [8bccb21a898d5958.http] domain conf check error: custom domain [1.test.frp.com] should not belong to subdomain_host [test.frp.com]

Steps to reproduce

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @tgNotHouse on GitHub (Jan 16, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3256 ### Bug Description 比如服务器的配置![image](https://user-images.githubusercontent.com/19563977/212664383-c47c6524-41f0-4b61-a810-2811486470ab.png)这里`SubDomainHost`字段子域名是test.frp.com, 然后客户端申请了一个http隧道,子域名是 `1.test.frp.com`,写在客户端的配置的这里 ![image](https://user-images.githubusercontent.com/19563977/212664577-af233efe-5d28-4611-a612-e30247016203.png) 启动之后,客户端就会收到下面的错误 `start error: proxy [8bccb21a898d5958.http] domain conf check error: custom domain [1.test.frp.com] should not belong to subdomain_host [test.frp.com]`。 是不是这里的判断有问题,是不是我写错了 ![image](https://user-images.githubusercontent.com/19563977/212665518-d33c3ed6-ff6c-46d8-9f43-b9f3104881e0.png) ### frpc Version 0.46.1 ### frps Version 0.46.1 ### System Architecture linux/amd64 ### Configurations ``` [http] privilege_mode = true type = http local_ip = 127.0.0.1 local_port = 80 custom_domains = 1.test.frp.com use_encryption = true use_compression = true ``` ### Logs start error: proxy [8bccb21a898d5958.http] domain conf check error: custom domain [1.test.frp.com] should not belong to subdomain_host [test.frp.com] ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [X] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:40:57 -06:00
Author
Owner

@xingtongsf commented on GitHub (Jan 17, 2023):

你填错位置了。subdomain才是子域名字段,custom_domains 是客户自有域名字段。比如客户可填自己1.aaa.com,才填到custom_domains 。你这种subdomain = 1 就可以了。test.frp.com在服务器填写。subdomain_host = test.frp.com。仔细看frpsfull.ini里面方法挺详尽。

<!-- gh-comment-id:1385001463 --> @xingtongsf commented on GitHub (Jan 17, 2023): 你填错位置了。subdomain才是子域名字段,custom_domains 是客户自有域名字段。比如客户可填自己1.aaa.com,才填到custom_domains 。你这种subdomain = 1 就可以了。test.frp.com在服务器填写。subdomain_host = test.frp.com。仔细看frpsfull.ini里面方法挺详尽。
Author
Owner

@tgNotHouse commented on GitHub (Jan 17, 2023):

@xingtongsf 好像还是不对,如果客户端subdomain字段只写1,subdomain = frpqwj 这样,提示就是
image

<!-- gh-comment-id:1385015289 --> @tgNotHouse commented on GitHub (Jan 17, 2023): @xingtongsf 好像还是不对,如果客户端subdomain字段只写1,`subdomain = frpqwj` 这样,提示就是 ![image](https://user-images.githubusercontent.com/19563977/212846818-79957eae-0257-409a-be55-9d1c8a6feed9.png)
Author
Owner

@superzjg commented on GitHub (Jan 18, 2023):

@xingtongsf 好像还是不对,如果客户端subdomain字段只写1,subdomain = frpqwj 这样,提示就是 image

域名解析了吗?

<!-- gh-comment-id:1386386388 --> @superzjg commented on GitHub (Jan 18, 2023): > @xingtongsf 好像还是不对,如果客户端subdomain字段只写1,`subdomain = frpqwj` 这样,提示就是 ![image](https://user-images.githubusercontent.com/19563977/212846818-79957eae-0257-409a-be55-9d1c8a6feed9.png) 域名解析了吗?
Author
Owner

@tgNotHouse commented on GitHub (Jan 18, 2023):

@superzjg 是的,子域名和服务器上的是一样的,都可以解析到同一个ip

<!-- gh-comment-id:1386467411 --> @tgNotHouse commented on GitHub (Jan 18, 2023): @superzjg 是的,子域名和服务器上的是一样的,都可以解析到同一个ip
Author
Owner

@xingtongsf commented on GitHub (Jan 19, 2023):

subdomain_host

服务器subdomain_host设置了没有。还有域名有没有设置泛域名解析

<!-- gh-comment-id:1396311549 --> @xingtongsf commented on GitHub (Jan 19, 2023): > subdomain_host 服务器subdomain_host设置了没有。还有域名有没有设置泛域名解析
Author
Owner

@tgNotHouse commented on GitHub (Jan 19, 2023):

@xingtongsf 我根据我截图的log能看出服务器的这个字段是有设置的,泛域名解析是什么,比如说服务器域名是test.frp.com,那么申请http隧道后会得到一个my.test.frp.com,这个和test.frp.com解析的地址一样的,那么就是设置了*.test.frp.com,泛域名解析。

<!-- gh-comment-id:1396385214 --> @tgNotHouse commented on GitHub (Jan 19, 2023): @xingtongsf 我根据我截图的log能看出服务器的这个字段是有设置的,泛域名解析是什么,比如说服务器域名是test.frp.com,那么申请http隧道后会得到一个my.test.frp.com,这个和test.frp.com解析的地址一样的,那么就是设置了*.test.frp.com,泛域名解析。
Author
Owner

@github-actions[bot] commented on GitHub (Feb 19, 2023):

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

<!-- gh-comment-id:1435801712 --> @github-actions[bot] commented on GitHub (Feb 19, 2023): 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#2610
No description provided.