[GH-ISSUE #2807] Fails to connect multiple clients #2244

Closed
opened 2026-05-05 13:26:36 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @JimBeam2019 on GitHub (Feb 18, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2807

Bug Description

Hi there, I'm having a problem exposing two different localhost clients to the internet with HTTPS protocol through a cloud server.

For example, I have a cloud server running frps (see the frps.ini below) and trying to expose a localhost client A and client B (the configurations are frpc.ini A and frpc.ini B), which are from device A and B respectively. My goal is that if the user type https://www.mydomain.com/test01 in a browser, the cloud server would connect them to client A and vice versa, if it is https://www.mydomain.com/test02, it should link to client B.

With the frps up and running, when I started client A first, the connection with it went through, but then I tried client B and it return the error message [W] [control.go:447] [3d336c85a6d62de2] new proxy [web_test_B] error: router config conflict. The result went the same with the similar error message as I started client B first and then client A second.

I was wondering if it is a bug, so could you try the configurations above to see if it is indeed a bug there. Please any advice will be greatly appreciated. Cheers.

frpc Version

0.39.1

frps Version

0.39.1

System Architecture

linux/arm64

Configurations

frps.ini

[common]
bind_port = 7000
vhost_http_port = 80
vhost_https_port = 443
max_pool_count = 10
dashboard_port = 7500
dashboard_user = admin
dashboard_pwd = admin

frpc.ini A in device A

[common]
server_addr = <SERVER_IP_ADDRESS>
server_port = 7000

[web_test_A]
type = https
local_port = 443
custom_domains = www.mydomain.com
locations = /test01

frpc.ini B in device B

[common]
server_addr = <SERVER_IP_ADDRESS>
server_port = 7000

[web_test_B]
type = https
local_port = 443
custom_domains = www.mydomain.com
locations = /test02

Logs

frps

2022/02/18 16:37:30 [I] [root.go:200] frps uses config file: ./frps.ini
2022/02/18 16:37:30 [I] [service.go:193] frps tcp listen on 0.0.0.0:7000
2022/02/18 16:37:30 [I] [service.go:236] http service listen on 0.0.0.0:80
2022/02/18 16:37:30 [I] [service.go:251] https service listen on 0.0.0.0:443
2022/02/18 16:37:30 [I] [service.go:292] Dashboard listen on 0.0.0.0:7500
2022/02/18 16:37:30 [I] [root.go:209] frps started successfully
2022/02/18 16:37:38 [I] [service.go:449] [69e341f9404978cc] client login info: ip [*.*.*.*:46891] version [0.39.1] hostname [] os [linux] arch [arm64]                                                                           
2022/02/18 16:37:38 [I] [https.go:51] [69e341f9404978cc] [web_test_A] https proxy listen for host [www.mydomain.com]                                                                                                        
2022/02/18 16:37:38 [I] [control.go:451] [69e341f9404978cc] new proxy [web_test_A] success
2022/02/18 16:37:52 [I] [proxy.go:179] [69e341f9404978cc] [web_test_A] get a user connection [*.*.*.*:46907]                                                                                                             
2022/02/18 16:37:57 [I] [proxy.go:179] [69e341f9404978cc] [web_test_A] get a user connection [*.*.*.*:46910]                                                                                                             
2022/02/18 16:37:57 [I] [proxy.go:179] [69e341f9404978cc] [web_test_A] get a user connection [*.*.*.*:46911]                                                                                                             
2022/02/18 16:38:06 [I] [proxy.go:179] [69e341f9404978cc] [web_test_A] get a user connection [*.*.*.*:46924]                                                                                                             
2022/02/18 16:38:07 [I] [proxy.go:179] [69e341f9404978cc] [web_test_A] get a user connection [*.*.*.*:46926]                                                                                                             
2022/02/18 16:38:44 [I] [dashboard_api.go:70] Http request: [/api/serverinfo]
2022/02/18 16:38:44 [I] [dashboard_api.go:63] Http response [/api/serverinfo]: code [200]
2022/02/18 16:42:03 [I] [service.go:449] [3d336c85a6d62de2] client login info: ip [*.*.*.*:47723] version [0.39.1] hostname [] os [linux] arch [arm64]                                                                           
2022/02/18 16:42:03 [I] [proxy.go:88] [3d336c85a6d62de2] [web_test_B] proxy closing
2022/02/18 16:42:03 [W] [control.go:447] [3d336c85a6d62de2] new proxy [web_test_B] error: router config conflict

frpc.ini A in device A

2022/02/18 16:37:38 [I] [service.go:327] [69e341f9404978cc] login to server success, get run id [69e341f9404978cc], server udp port [0]                                                                                                 
2022/02/18 16:37:38 [I] [proxy_manager.go:144] [69e341f9404978cc] proxy added: [web_test_A]
2022/02/18 16:37:38 [I] [control.go:181] [69e341f9404978cc] [web_test_A] start proxy success
...

frpc.ini B in device B

2022/02/18 16:42:03 [I] [service.go:327] [d4adff90b8cfd91d] login to server success, get run id [d4adff90b8cfd91d], server udp port [0]                                                                                                 
2022/02/18 16:42:03 [I] [proxy_manager.go:144] [d4adff90b8cfd91d] proxy added: [web_test_B]
2022/02/18 16:42:03 [W] [control.go:179] [d4adff90b8cfd91d] [web_test_B] start error: router config conflict

Steps to reproduce

  1. Run the frps in a cloud under the server domain.
  2. Run the frpc with a similar config like the frpc A in a PC, using the server domain from step 1.
  3. Run the frpc with a similar config like the frpc B in a different PC, using the server domain from step 1.
    ...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @JimBeam2019 on GitHub (Feb 18, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/2807 ### Bug Description Hi there, I'm having a problem exposing two different localhost clients to the internet with HTTPS protocol through a cloud server. For example, I have a _cloud server_ running frps (see the **frps.ini** below) and trying to expose a localhost _**client A**_ and _**client B**_ (the configurations are **frpc.ini A** and **frpc.ini B**), which are from device A and B respectively. My goal is that if the user type `https://www.mydomain.com/test01` in a browser, the cloud server would connect them to _**client A**_ and vice versa, if it is `https://www.mydomain.com/test02`, it should link to _**client B**_. With the frps up and running, when I started _**client A**_ first, the connection with it went through, but then I tried _**client B**_ and it return the error message `[W] [control.go:447] [3d336c85a6d62de2] new proxy [web_test_B] error: router config conflict`. The result went the same with the similar error message as I started _**client B**_ first and then _**client A**_ second. I was wondering if it is a bug, so could you try the configurations above to see if it is indeed a bug there. Please any advice will be greatly appreciated. Cheers. ### frpc Version 0.39.1 ### frps Version 0.39.1 ### System Architecture linux/arm64 ### Configurations **frps.ini** ```ini [common] bind_port = 7000 vhost_http_port = 80 vhost_https_port = 443 max_pool_count = 10 dashboard_port = 7500 dashboard_user = admin dashboard_pwd = admin ``` **frpc.ini A** in device A ```ini [common] server_addr = <SERVER_IP_ADDRESS> server_port = 7000 [web_test_A] type = https local_port = 443 custom_domains = www.mydomain.com locations = /test01 ``` **frpc.ini B** in device B ```ini [common] server_addr = <SERVER_IP_ADDRESS> server_port = 7000 [web_test_B] type = https local_port = 443 custom_domains = www.mydomain.com locations = /test02 ``` ### Logs **frps** ```sh 2022/02/18 16:37:30 [I] [root.go:200] frps uses config file: ./frps.ini 2022/02/18 16:37:30 [I] [service.go:193] frps tcp listen on 0.0.0.0:7000 2022/02/18 16:37:30 [I] [service.go:236] http service listen on 0.0.0.0:80 2022/02/18 16:37:30 [I] [service.go:251] https service listen on 0.0.0.0:443 2022/02/18 16:37:30 [I] [service.go:292] Dashboard listen on 0.0.0.0:7500 2022/02/18 16:37:30 [I] [root.go:209] frps started successfully 2022/02/18 16:37:38 [I] [service.go:449] [69e341f9404978cc] client login info: ip [*.*.*.*:46891] version [0.39.1] hostname [] os [linux] arch [arm64] 2022/02/18 16:37:38 [I] [https.go:51] [69e341f9404978cc] [web_test_A] https proxy listen for host [www.mydomain.com] 2022/02/18 16:37:38 [I] [control.go:451] [69e341f9404978cc] new proxy [web_test_A] success 2022/02/18 16:37:52 [I] [proxy.go:179] [69e341f9404978cc] [web_test_A] get a user connection [*.*.*.*:46907] 2022/02/18 16:37:57 [I] [proxy.go:179] [69e341f9404978cc] [web_test_A] get a user connection [*.*.*.*:46910] 2022/02/18 16:37:57 [I] [proxy.go:179] [69e341f9404978cc] [web_test_A] get a user connection [*.*.*.*:46911] 2022/02/18 16:38:06 [I] [proxy.go:179] [69e341f9404978cc] [web_test_A] get a user connection [*.*.*.*:46924] 2022/02/18 16:38:07 [I] [proxy.go:179] [69e341f9404978cc] [web_test_A] get a user connection [*.*.*.*:46926] 2022/02/18 16:38:44 [I] [dashboard_api.go:70] Http request: [/api/serverinfo] 2022/02/18 16:38:44 [I] [dashboard_api.go:63] Http response [/api/serverinfo]: code [200] 2022/02/18 16:42:03 [I] [service.go:449] [3d336c85a6d62de2] client login info: ip [*.*.*.*:47723] version [0.39.1] hostname [] os [linux] arch [arm64] 2022/02/18 16:42:03 [I] [proxy.go:88] [3d336c85a6d62de2] [web_test_B] proxy closing 2022/02/18 16:42:03 [W] [control.go:447] [3d336c85a6d62de2] new proxy [web_test_B] error: router config conflict ``` **frpc.ini A** in device A ```sh 2022/02/18 16:37:38 [I] [service.go:327] [69e341f9404978cc] login to server success, get run id [69e341f9404978cc], server udp port [0] 2022/02/18 16:37:38 [I] [proxy_manager.go:144] [69e341f9404978cc] proxy added: [web_test_A] 2022/02/18 16:37:38 [I] [control.go:181] [69e341f9404978cc] [web_test_A] start proxy success ... ``` **frpc.ini B** in device B ```sh 2022/02/18 16:42:03 [I] [service.go:327] [d4adff90b8cfd91d] login to server success, get run id [d4adff90b8cfd91d], server udp port [0] 2022/02/18 16:42:03 [I] [proxy_manager.go:144] [d4adff90b8cfd91d] proxy added: [web_test_B] 2022/02/18 16:42:03 [W] [control.go:179] [d4adff90b8cfd91d] [web_test_B] start error: router config conflict ``` ### Steps to reproduce 1. Run the frps in a cloud under the server domain. 2. Run the frpc with a similar config like the frpc A in a PC, using the server domain from step 1. 3. Run the frpc with a similar config like the frpc B in a different PC, using the server domain from step 1. ... ### Affected area - [X] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [X] User Experience - [ ] Test and Release - [X] Developer Infrastructure - [X] Client Plugin - [X] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:26:36 -06:00
Author
Owner

@fatedier commented on GitHub (Feb 18, 2022):

locations is not supported for https. It only supports http.

For https, frps will not decode your request data, it just forward the connection to your client.

<!-- gh-comment-id:1044271900 --> @fatedier commented on GitHub (Feb 18, 2022): `locations` is not supported for `https`. It only supports `http`. For `https`, frps will not decode your request data, it just forward the connection to your client.
Author
Owner

@ghost commented on GitHub (Feb 18, 2022):

locations is not supported for https. It only supports http.

For https, frps will not decode your request data, it just forward the connection to your client.

so you are saying that if we have 2 HTTPS clients (SSL certificates on client side, not on server side), FRP library is useless? There is no way to connect?
did I get it right ?

<!-- gh-comment-id:1044392411 --> @ghost commented on GitHub (Feb 18, 2022): > `locations` is not supported for `https`. It only supports `http`. > > For `https`, frps will not decode your request data, it just forward the connection to your client. so you are saying that if we have 2 HTTPS clients (SSL certificates on client side, not on server side), FRP library is useless? There is no way to connect? did I get it right ?
Author
Owner

@fatedier commented on GitHub (Feb 19, 2022):

You can use different domains for each HTTPS service.

<!-- gh-comment-id:1045970083 --> @fatedier commented on GitHub (Feb 19, 2022): You can use different domains for each HTTPS service.
Author
Owner

@ghost commented on GitHub (Feb 19, 2022):

You can use different domains for each HTTPS service.

do you mean, use different subdomain for each HTTPS service ?

<!-- gh-comment-id:1045973203 --> @ghost commented on GitHub (Feb 19, 2022): > You can use different domains for each HTTPS service. do you mean, use different subdomain for each HTTPS service ?
Author
Owner

@ghost commented on GitHub (Mar 12, 2022):

Hey @JimBeam2019 I figured out how to do this, here is my config:

frps.ini:

[common]
bind_port = 7000
vhost_http_port = 80
vhost_https_port = 443
dashboard_port = 7001
dashboard_user = username
dashboard_pwd = supersecurepassword

frpc.ini (1st client, in my case it's the main domain):

[common]
server_addr = xxx.xxx.xxx.xxx
server_port = 7000

[http]
type = http
local_ip = 0.0.0.0
local_port = 80
custom_domains = example.com

[https]
type = https
local_ip = 0.0.0.0
local_port = 443
custom_domains = example.com

frpc.ini (2nd client, in my case it's a sub-domain):

[common]
server_addr = xxx.xxx.xxx.xxx
server_port = 7000

[http-sub]
type = http
local_ip = 0.0.0.0
local_port = 80
custom_domains = sub.example.com

[https-sub]
type = https
local_ip = 0.0.0.0
local_port = 443
custom_domains = sub.example.com

Hope this helps

<!-- gh-comment-id:1065964641 --> @ghost commented on GitHub (Mar 12, 2022): Hey @JimBeam2019 I figured out how to do this, here is my config: **frps.ini:** `[common]` `bind_port = 7000` `vhost_http_port = 80` `vhost_https_port = 443` `dashboard_port = 7001` `dashboard_user = username` `dashboard_pwd = supersecurepassword` **frpc.ini (1st client, in my case it's the main domain):** `[common]` `server_addr = xxx.xxx.xxx.xxx` `server_port = 7000` `[http]` `type = http` `local_ip = 0.0.0.0` `local_port = 80` `custom_domains = example.com` `[https]` `type = https` `local_ip = 0.0.0.0` `local_port = 443` `custom_domains = example.com` **frpc.ini (2nd client, in my case it's a sub-domain):** `[common]` `server_addr = xxx.xxx.xxx.xxx` `server_port = 7000` `[http-sub]` `type = http` `local_ip = 0.0.0.0` `local_port = 80` `custom_domains = sub.example.com` `[https-sub]` `type = https` `local_ip = 0.0.0.0` `local_port = 443` `custom_domains = sub.example.com` Hope this helps
Author
Owner

@github-actions[bot] commented on GitHub (Apr 12, 2022):

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

<!-- gh-comment-id:1095737803 --> @github-actions[bot] commented on GitHub (Apr 12, 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#2244
No description provided.