[GH-ISSUE #2586] Why use user as the prefix of server_name? #2059

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

Originally created by @jat001 on GitHub (Sep 23, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2586

Bug Description

I have multiple frp clients on multiple computers so I use the prefix user to identify them.

frpc adds the prefix to the proxy name. but it also adds the prefix to server_name, which is not what I want.
https://github.com/fatedier/frp/blob/dev/pkg/config/visitor.go#L145

For example: see configurations.

frpc Version

0.37.1

frps Version

0.37.1

System Architecture

linux/amd64

Configurations

I want to connect to the ssh service of client A on client B, and connect to the ssh service of client B on client A.
So these are my configurations.
(Other irrelevant configurations like local_ip, local_port and bind_addr, bind_port have been removed.)

client A:

[common]
user = cli_a

[ssh]
type = stcp

[ssh_visitor_b]
type = stcp
role = visitor
server_name = cli_b.ssh

client B:

[common]
user = cli_b

[ssh]
type = stcp

[ssh_visitor_a]
type = stcp
role = visitor
server_name = cli_a.ssh

Logs

I got the following error because frpc added the prefix cli_a to the server_name cli_b.ssh.

[cli_a.ssh_visitor_b] start new visitor connection error: custom listener for [cli_a.cli_b.ssh] doesn't exist

Steps to reproduce

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @jat001 on GitHub (Sep 23, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2586 ### Bug Description I have multiple frp clients on multiple computers so I use the prefix `user` to identify them. frpc adds the prefix to the proxy name. but it also adds the prefix to `server_name`, which is not what I want. https://github.com/fatedier/frp/blob/dev/pkg/config/visitor.go#L145 For example: see configurations. ### frpc Version 0.37.1 ### frps Version 0.37.1 ### System Architecture linux/amd64 ### Configurations I want to connect to the ssh service of client A on client B, and connect to the ssh service of client B on client A. So these are my configurations. (Other irrelevant configurations like `local_ip`, `local_port` and `bind_addr`, `bind_port` have been removed.) client A: ``` [common] user = cli_a [ssh] type = stcp [ssh_visitor_b] type = stcp role = visitor server_name = cli_b.ssh ``` client B: ``` [common] user = cli_b [ssh] type = stcp [ssh_visitor_a] type = stcp role = visitor server_name = cli_a.ssh ``` ### Logs I got the following error because frpc added the prefix `cli_a` to the server_name `cli_b.ssh`. ``` [cli_a.ssh_visitor_b] start new visitor connection error: custom listener for [cli_a.cli_b.ssh] doesn't exist ``` ### Steps to reproduce _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [X] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:19:39 -06:00
Author
Owner

@fatedier commented on GitHub (Sep 24, 2021):

You can't connect from one user to another now.

<!-- gh-comment-id:926301583 --> @fatedier commented on GitHub (Sep 24, 2021): You can't connect from one user to another now.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 25, 2021):

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

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

@VictoriqueDeBlois commented on GitHub (Sep 21, 2022):

这个连接不同用户的前缀处理能在未来版本实现吗?

<!-- gh-comment-id:1253936137 --> @VictoriqueDeBlois commented on GitHub (Sep 21, 2022): 这个连接不同用户的前缀处理能在未来版本实现吗?
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#2059
No description provided.