mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #2180] Multiple tunnels per instance #1735
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#1735
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @thesocialproxy on GitHub (Jan 6, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2180
The solution you want
I have reviewed the docs extensively, but I could not find a way to open several tunnels via 1 instance of frp, I would like to add support to make that possible, so frps will look something like that:
[common1]
bind_port = 7000
[common2]
bind_port = 8000
Alternatives considered
I am pretty sure there are some VPNs that support that, or just running multiple instances of frp, but it becomes hard to manage.
How to implement this function
No idea to be honest. Looking for advice on how to implement this.
Application scenarios of this function
I am working on a system where an IoT device will need to have 24/7 internet connectivity, so we are packing it with 5 different 4G network interfaces, all of which don't support port forwarding. This feature will make it possible to access all 5 interfaces independently of one another.
@fatedier commented on GitHub (Jan 6, 2021):
You can deploy multiple tunnels like example configures https://github.com/fatedier/frp/blob/dev/conf/frpc_full.ini
@thesocialproxy commented on GitHub (Jan 6, 2021):
Thanks! @fatedier correct me if I am wrong, but in this example all the traffic will still go through the 1 tunnel created between frpc and frps, right?
So for example, if frps looks like this:
and frpc looks like this:
Then there will be 2 local ports (1001,1002) and 2 listening ports on frps (2001,2002), but all the traffic will still get routed from the main interface of frpc, on 1 tunnel on port 7000.
I am looking for a way to create multiple "bind_ports" tunnels, each one for a different interface, is that possible and I am missing somthing?
@fatedier commented on GitHub (Jan 7, 2021):
Yes, you should deploy 2 frps if you want to bind different net interfaces. You can configure it by
bind_addrinfrps.ini.However, i'm not sure why you need to do that. You can bind
0.0.0.0on all net interfaces and configure it infrpc.iniserver_addrto choose which one to use.@github-actions[bot] commented on GitHub (Feb 22, 2021):
Issues go stale after 45d of inactivity. Stale issues rot after an additional 10d of inactivity and eventually close.