[GH-ISSUE #4128] 关于“proxy [proxies]: subdomain and custom domains should not be both empty”的问题 #3256

Closed
opened 2026-05-05 14:06:08 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @RongxuanLai on GitHub (Apr 4, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4128

Bug Description

问题描述

在配置外网访问内网本地web服务时,出现“proxy [proxies]: subdomain and custom domains should not be both empty”的报错。请问这个是什么原因?怎么解决?

frpc Version

0.56.0

frps Version

0.56.0

System Architecture

ubuntu 18.04 / amd64

Configurations

服务端配置frps.toml

[common]
bindPort = 7000
vhostHTTPPort = 8080
vhostHTTPSPort = 10443

auth.token = xxx
maxPoolCount = 50

webServer.addr = 0.0.0.0
webServer.port = 7500
webServer.user = "admin"
webServer.password = "admin"

log.to = "./frps.log"
log.level = info
log.maxDays = 3
log.disablePrintColor = false

服务端运行情况

lighthouse@VM-20-15-ubuntu:/usr/local/bin$ sudo systemctl status frps.service 
● frps.service - frp server
     Loaded: loaded (/lib/systemd/system/frps.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2024-04-04 23:01:32 CST; 1s ago
   Main PID: 198085 (frps)
      Tasks: 6 (limit: 3943)
     Memory: 8.7M
        CPU: 83ms
     CGroup: /system.slice/frps.service
             └─198085 /usr/local/bin/frps -c /usr/local/bin/frps.toml

Apr 04 23:01:32 VM-20-15-ubuntu systemd[1]: Started frp server.
Apr 04 23:01:32 VM-20-15-ubuntu frps[198085]: WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead!
Apr 04 23:01:32 VM-20-15-ubuntu frps[198085]: 2024-04-04 23:01:32.148 [I] [frps/root.go:105] frps uses config file: /usr/local/bin/frps.toml
Apr 04 23:01:32 VM-20-15-ubuntu frps[198085]: 2024-04-04 23:01:32.223 [I] [server/service.go:237] frps tcp listen on 0.0.0.0:7000
Apr 04 23:01:32 VM-20-15-ubuntu frps[198085]: 2024-04-04 23:01:32.223 [I] [frps/root.go:114] frps started successfully

客户端配置frpc.toml

[common]
serverAddr = xxx.xxx.xxx.xxx
serverPort = 7000
auth.token = xxx

log.to = "./frpc.log"
log.level = info
log.maxDays = 3
log.disablePrintColor = false

webServer.addr = 127.0.0.1
webServer.port = 7400
webServer.user = admin
webServer.password = admin


[[proxies]]
name = ssh1
type = tcp
localIP = 127.0.0.1
localPort = 22
remotePort = 1100

[[proxies]]
name = ssh2
type = tcp
localIP = 127.0.0.1
localPort = 22
remotePort = 1101


[[proxies]]
name = bisheng-webui
type = http
localIP = 127.0.0.1
localPort = 8080
customDomains = ["xxx.xxx.xxx.xxx"]

客户端运行情况(报错)

(llm-chat) ai@ai:/usr/local/bin$ sudo systemctl status frpc_bisheng.service 
× frpc_bisheng.service - frp server
     Loaded: loaded (/lib/systemd/system/frpc_bisheng.service; disabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2024-04-04 22:43:18 CST; 9min ago
    Process: 2808586 ExecStart=/usr/local/bin/frpc -c /usr/local/bin/frpc_bisheng.toml (code=exited, status=1/FAILURE)
   Main PID: 2808586 (code=exited, status=1/FAILURE)
        CPU: 13ms

4月 04 22:43:18 ai systemd[1]: Started frp server.
4月 04 22:43:18 ai frpc[2808586]: WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead!
4月 04 22:43:18 ai frpc[2808586]: **proxy [proxies]: subdomain and custom domains should not be both empty**
4月 04 22:43:18 ai systemd[1]: frpc_bisheng.service: Main process exited, code=exited, status=1/FAILURE
4月 04 22:43:18 ai systemd[1]: frpc_bisheng.service: Failed with result 'exit-code'.

Logs

none

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 @RongxuanLai on GitHub (Apr 4, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4128 ### Bug Description #### 问题描述 在配置外网访问内网本地web服务时,出现“proxy [proxies]: subdomain and custom domains should not be both empty”的报错。请问这个是什么原因?怎么解决? ### frpc Version 0.56.0 ### frps Version 0.56.0 ### System Architecture ubuntu 18.04 / amd64 ### Configurations #### 服务端配置`frps.toml` ``` [common] bindPort = 7000 vhostHTTPPort = 8080 vhostHTTPSPort = 10443 auth.token = xxx maxPoolCount = 50 webServer.addr = 0.0.0.0 webServer.port = 7500 webServer.user = "admin" webServer.password = "admin" log.to = "./frps.log" log.level = info log.maxDays = 3 log.disablePrintColor = false ``` #### 服务端运行情况 ``` lighthouse@VM-20-15-ubuntu:/usr/local/bin$ sudo systemctl status frps.service ● frps.service - frp server Loaded: loaded (/lib/systemd/system/frps.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2024-04-04 23:01:32 CST; 1s ago Main PID: 198085 (frps) Tasks: 6 (limit: 3943) Memory: 8.7M CPU: 83ms CGroup: /system.slice/frps.service └─198085 /usr/local/bin/frps -c /usr/local/bin/frps.toml Apr 04 23:01:32 VM-20-15-ubuntu systemd[1]: Started frp server. Apr 04 23:01:32 VM-20-15-ubuntu frps[198085]: WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead! Apr 04 23:01:32 VM-20-15-ubuntu frps[198085]: 2024-04-04 23:01:32.148 [I] [frps/root.go:105] frps uses config file: /usr/local/bin/frps.toml Apr 04 23:01:32 VM-20-15-ubuntu frps[198085]: 2024-04-04 23:01:32.223 [I] [server/service.go:237] frps tcp listen on 0.0.0.0:7000 Apr 04 23:01:32 VM-20-15-ubuntu frps[198085]: 2024-04-04 23:01:32.223 [I] [frps/root.go:114] frps started successfully ``` #### 客户端配置`frpc.toml` ``` [common] serverAddr = xxx.xxx.xxx.xxx serverPort = 7000 auth.token = xxx log.to = "./frpc.log" log.level = info log.maxDays = 3 log.disablePrintColor = false webServer.addr = 127.0.0.1 webServer.port = 7400 webServer.user = admin webServer.password = admin [[proxies]] name = ssh1 type = tcp localIP = 127.0.0.1 localPort = 22 remotePort = 1100 [[proxies]] name = ssh2 type = tcp localIP = 127.0.0.1 localPort = 22 remotePort = 1101 [[proxies]] name = bisheng-webui type = http localIP = 127.0.0.1 localPort = 8080 customDomains = ["xxx.xxx.xxx.xxx"] ``` #### 客户端运行情况(报错) ``` (llm-chat) ai@ai:/usr/local/bin$ sudo systemctl status frpc_bisheng.service × frpc_bisheng.service - frp server Loaded: loaded (/lib/systemd/system/frpc_bisheng.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2024-04-04 22:43:18 CST; 9min ago Process: 2808586 ExecStart=/usr/local/bin/frpc -c /usr/local/bin/frpc_bisheng.toml (code=exited, status=1/FAILURE) Main PID: 2808586 (code=exited, status=1/FAILURE) CPU: 13ms 4月 04 22:43:18 ai systemd[1]: Started frp server. 4月 04 22:43:18 ai frpc[2808586]: WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead! 4月 04 22:43:18 ai frpc[2808586]: **proxy [proxies]: subdomain and custom domains should not be both empty** 4月 04 22:43:18 ai systemd[1]: frpc_bisheng.service: Main process exited, code=exited, status=1/FAILURE 4月 04 22:43:18 ai systemd[1]: frpc_bisheng.service: Failed with result 'exit-code'. ``` ### Logs none ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@xqzr commented on GitHub (Apr 6, 2024):

[common]

<!-- gh-comment-id:2041029228 --> @xqzr commented on GitHub (Apr 6, 2024): ~`[common]`~
Author
Owner

@hixuanyu commented on GitHub (Jul 12, 2024):

查到了兄弟,http代理的话要添加域名,客户端的配置文件中加入:
custom_domains = 云服务器公网IP
后面的可以是域名也可以是随便打的字,但必须要有这句不然会报错
customDomains = ["xxx.xxx.xxx.xxx"] 这一句是错的去了

<!-- gh-comment-id:2225229096 --> @hixuanyu commented on GitHub (Jul 12, 2024): 查到了兄弟,http代理的话要添加域名,客户端的配置文件中加入: custom_domains = 云服务器公网IP 后面的可以是域名也可以是随便打的字,但必须要有这句不然会报错 customDomains = ["xxx.xxx.xxx.xxx"] 这一句是错的去了
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#3256
No description provided.