[GH-ISSUE #632] [FEATURE REQUEST] multi server #491

Closed
opened 2026-05-05 12:19:12 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @jinyu121 on GitHub (Feb 2, 2018).
Original GitHub issue: https://github.com/fatedier/frp/issues/632

Expected Configures

[common]
server_addr = 1.1.1.1
server_port = 7000
log_level = warn
login_fail_exit = false
user = My-Computer

[ssh-1]    # It connect to 1.1.1.1
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 1022

[ssh-2]    # Notice here, it should connect 2.2.2.2
server_addr = 2.2.2.2
server_port = 7000
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 2022

[ssh-2] should use its own server-addr and server-port.

I mean, if specialized, each connection should use its own config, including server and port, rather than the global server-addr and server-port


If 1.1.1.1 died, I can still connect to my client via 2.2.2.2 -- That's a double insurance.

Originally created by @jinyu121 on GitHub (Feb 2, 2018). Original GitHub issue: https://github.com/fatedier/frp/issues/632 **Expected Configures** ``` [common] server_addr = 1.1.1.1 server_port = 7000 log_level = warn login_fail_exit = false user = My-Computer [ssh-1] # It connect to 1.1.1.1 type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 1022 [ssh-2] # Notice here, it should connect 2.2.2.2 server_addr = 2.2.2.2 server_port = 7000 type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 2022 ``` `[ssh-2]` should use its own `server-addr` and `server-port`. I mean, if specialized, each connection should use its own config, including server and port, rather than the global `server-addr` and `server-port` ---- If 1.1.1.1 died, I can still connect to my client via 2.2.2.2 -- That's a double insurance.
Author
Owner

@BI7PRK commented on GitHub (Feb 20, 2018):

run an new client.

<!-- gh-comment-id:366859702 --> @BI7PRK commented on GitHub (Feb 20, 2018): run an new client.
Author
Owner

@fatedier commented on GitHub (Feb 26, 2018):

It's not necessary.

<!-- gh-comment-id:368529378 --> @fatedier commented on GitHub (Feb 26, 2018): It's not necessary.
Author
Owner

@libracoder commented on GitHub (Apr 20, 2024):

Is there any chance of this getting implemented?

<!-- gh-comment-id:2067710106 --> @libracoder commented on GitHub (Apr 20, 2024): Is there any chance of this getting implemented?
Author
Owner

@fatedier commented on GitHub (Apr 22, 2024):

@libracoder Not in the short-term plan.

<!-- gh-comment-id:2068386546 --> @fatedier commented on GitHub (Apr 22, 2024): @libracoder Not in the short-term plan.
Author
Owner

@silentsiri commented on GitHub (Apr 23, 2024):

run an new client.

yet, can i run multiple client in one machine? for example:

container1

[common]
server_addr = 1.1.1.1
server_port = 7000
log_level = warn
login_fail_exit = false
user = My-Computer

[ssh-1]    # It connect to 1.1.1.1
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 1022

container2

[common]
server_addr = 2.2.2.2
server_port = 7001
log_level = warn
login_fail_exit = false
user = My-Computer

[ssh-1]    # It connect to 2.2.2.2
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 1022

@fatedier

<!-- gh-comment-id:2071396421 --> @silentsiri commented on GitHub (Apr 23, 2024): > run an new client. yet, can i run multiple client in one machine? for example: container1 ```toml [common] server_addr = 1.1.1.1 server_port = 7000 log_level = warn login_fail_exit = false user = My-Computer [ssh-1] # It connect to 1.1.1.1 type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 1022 ``` container2 ```toml [common] server_addr = 2.2.2.2 server_port = 7001 log_level = warn login_fail_exit = false user = My-Computer [ssh-1] # It connect to 2.2.2.2 type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 1022 ``` @fatedier
Author
Owner

@cnnblike commented on GitHub (Nov 22, 2024):

Similar request, but I have a workaround to do this:
on my machine, /etc/systemd/system/frp@.service are like this (that @ is important)

[Unit]
Description = frp service %I
Wants = network-online.target
After = network-online.target

[Service]
Type = simple
ExecStart = /usr/local/bin/frpc -c /etc/%i
     
[Install]
WantedBy = multi-user.target

and then I start two instance through

systemctl enable frp@frpc.toml.service --now && systemctl enable frp@frpc_sakura.toml.service --now

to run two frp with two different config file /etc/frpc.toml and /etc/frpc_sakura.toml

@fatedier you may consider use deployment configuration like this as an alternate to multi host request :D

<!-- gh-comment-id:2492723424 --> @cnnblike commented on GitHub (Nov 22, 2024): Similar request, but I have a workaround to do this: on my machine, /etc/systemd/system/frp@.service are like this (that @ is important) ``` [Unit] Description = frp service %I Wants = network-online.target After = network-online.target [Service] Type = simple ExecStart = /usr/local/bin/frpc -c /etc/%i [Install] WantedBy = multi-user.target ``` and then I start two instance through ``` systemctl enable frp@frpc.toml.service --now && systemctl enable frp@frpc_sakura.toml.service --now ``` to run two frp with two different config file /etc/frpc.toml and /etc/frpc_sakura.toml @fatedier you may consider use deployment configuration like this as an alternate to multi host request :D
Author
Owner

@Zoupers commented on GitHub (Nov 27, 2024):

@cnnblike actually, there is an implement of that kind of file, you can see it here. It's more reliable. And it also include the corresponding frps@.service file.

<!-- gh-comment-id:2503917443 --> @Zoupers commented on GitHub (Nov 27, 2024): @cnnblike actually, there is an implement of that kind of file, you can see it [here](https://aur.archlinux.org/packages/frpc). It's more reliable. And it also include the corresponding `frps@.service` file.
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#491
No description provided.