[GH-ISSUE #702] 希望后续的版本可以支持端口池,且端口池中的端口可以复用 #552

Closed
opened 2026-05-05 12:21:41 -06:00 by gitea-mirror · 10 comments
Owner

Originally created by @baoguo0511 on GitHub (Apr 10, 2018).
Original GitHub issue: https://github.com/fatedier/frp/issues/702

Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)

Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST

What version of frp are you using (./frpc -v or ./frps -v)?

What operating system and processor architecture are you using (go env)?

Configures you used:

Steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

Can you point out what caused this issue (optional)

Originally created by @baoguo0511 on GitHub (Apr 10, 2018). Original GitHub issue: https://github.com/fatedier/frp/issues/702 Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. (为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。) Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST **What version of frp are you using (./frpc -v or ./frps -v)?** **What operating system and processor architecture are you using (`go env`)?** **Configures you used:** **Steps to reproduce the issue:** 1. 2. 3. **Describe the results you received:** **Describe the results you expected:** **Additional information you deem important (e.g. issue happens only occasionally):** **Can you point out what caused this issue (optional)**
Author
Owner

@fatedier commented on GitHub (Apr 10, 2018):

不明所以。

<!-- gh-comment-id:380045443 --> @fatedier commented on GitHub (Apr 10, 2018): 不明所以。
Author
Owner

@baoguo0511 commented on GitHub (Apr 11, 2018):

因为端口数量毕竟有限,每个终端如果必需要指定不同端口的话,早晚要有用光的一天。拓展一下,能否实现端口复用?

<!-- gh-comment-id:380297381 --> @baoguo0511 commented on GitHub (Apr 11, 2018): 因为端口数量毕竟有限,每个终端如果必需要指定不同端口的话,早晚要有用光的一天。拓展一下,能否实现端口复用?
Author
Owner

@fatedier commented on GitHub (Apr 11, 2018):

  1. 你现在遇到端口用光的 case 了吗,具体场景是什么样的?
  2. 请描述下你大致上想到的端口复用的方案。
<!-- gh-comment-id:380303168 --> @fatedier commented on GitHub (Apr 11, 2018): 1. 你现在遇到端口用光的 case 了吗,具体场景是什么样的? 2. 请描述下你大致上想到的端口复用的方案。
Author
Owner

@windybird commented on GitHub (Apr 14, 2018):

@fatedier
因为有些应用服务不能改端口,当有同时运行两个同样的应用时,客户端不能更改端口,如何解决

<!-- gh-comment-id:381305848 --> @windybird commented on GitHub (Apr 14, 2018): @fatedier 因为有些应用服务不能改端口,当有同时运行两个同样的应用时,客户端不能更改端口,如何解决
Author
Owner

@kavid commented on GitHub (Apr 15, 2018):

楼上能说的具体点,什么应用,同时怎么部署的

<!-- gh-comment-id:381384606 --> @kavid commented on GitHub (Apr 15, 2018): 楼上能说的具体点,什么应用,同时怎么部署的
Author
Owner

@windybird commented on GitHub (Apr 17, 2018):

如果有两台服务器上的服务端口相同,端口不可修改,都要经过同一个frp服务端,怎么解决?

<!-- gh-comment-id:381959368 --> @windybird commented on GitHub (Apr 17, 2018): 如果有两台服务器上的服务端口相同,端口不可修改,都要经过同一个frp服务端,怎么解决?
Author
Owner

@kavid commented on GitHub (Apr 17, 2018):

不同域名就行了。

<!-- gh-comment-id:382099258 --> @kavid commented on GitHub (Apr 17, 2018): 不同域名就行了。
Author
Owner

@windybird commented on GitHub (Apr 18, 2018):

type = tcp 可以域名?

<!-- gh-comment-id:382394930 --> @windybird commented on GitHub (Apr 18, 2018): type = tcp 可以域名?
Author
Owner

@kavid commented on GitHub (Apr 18, 2018):

既然不是80端口

frps的6001 端口到服务器的a
frps的6002 端口到服务器的b

frpc.ini 一号的
[range:tcp_port1]
type = tcp
local_ip = 192.168.1.100
local_port = 6001
remote_port = 6001
use_encryption = false
use_compression = false

frpc.ini 二号的
[range:tcp_port2]
type = tcp
local_ip = 192.168.1.101
local_port = 6001
remote_port = 6002
use_encryption = false
use_compression = false

<!-- gh-comment-id:382416553 --> @kavid commented on GitHub (Apr 18, 2018): 既然不是80端口 frps的6001 端口到服务器的a frps的6002 端口到服务器的b frpc.ini 一号的 [range:tcp_port1] type = tcp local_ip = 192.168.1.100 local_port = 6001 remote_port = 6001 use_encryption = false use_compression = false frpc.ini 二号的 [range:tcp_port2] type = tcp local_ip = 192.168.1.101 local_port = 6001 remote_port = 6002 use_encryption = false use_compression = false
Author
Owner

@fatedier commented on GitHub (Apr 19, 2018):

目前支持 http 协议,根据域名路由,tcp 协议,根据端口路由。
端口是无法复用的,除非在特定的协议类型下能够对协议进行特殊处理,例如 http 协议的 host 或 url 做路由。
每一个应用可能都有自己的协议,不可能去适配,或者说从 tcp 层面复用端口不一定能实现,针对每一个应用去实现成本也比较高,这里不考虑这样的非通用的需求。

<!-- gh-comment-id:382752590 --> @fatedier commented on GitHub (Apr 19, 2018): 目前支持 http 协议,根据域名路由,tcp 协议,根据端口路由。 端口是无法复用的,除非在特定的协议类型下能够对协议进行特殊处理,例如 http 协议的 host 或 url 做路由。 每一个应用可能都有自己的协议,不可能去适配,或者说从 tcp 层面复用端口不一定能实现,针对每一个应用去实现成本也比较高,这里不考虑这样的非通用的需求。
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#552
No description provided.