[GH-ISSUE #4068] xtcp能否支持批量端口 #3216

Closed
opened 2026-05-05 14:04:44 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @yz-qc on GitHub (Mar 15, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4068

Describe the feature request

目前xtcp的配置只能是单个端口的穿透,比如以下配置:

`服务端:
proxies
name = "p2p_xxx"
type = "xtcp"
secretKey = "xxx"
localIP = "192.168.2.7"
localPort = 77

客户端
visitors
name = "p2p_xxx_visitor"
type = "xtcp"
serverName = "p2p_xxx"
secretKey = "xxx"
bindAddr = "127.0.0.1"
bindPort = 77
keepTunnelOpen = true
`
但是我想要绑定穿透的时候,同时绑定N个端口 就需要建立N个proxies与visitors,无法进行批量的绑定,我希望能实现批量的端口绑定,以支持一台机器有多个服务的时候可以直接穿透多个端口

Describe alternatives you've considered

如,可以配置:
`服务端:
proxies
name = "p2p_xxx"
type = "xtcp"
secretKey = "xxx"
localIP = "192.168.2.7"
localPort = 77,88,99,10000-10020

客户端
visitors
name = "p2p_xxx_visitor"
type = "xtcp"
serverName = "p2p_xxx"
secretKey = "xxx"
bindAddr = "127.0.0.1"
bindPort = 77,88,99,10000-10020
keepTunnelOpen = true
`
可以同时77,88,99与10000-10020之间端口到对应的端口进行穿透,bindPort 应当与localPort 两两对应的
如果能够支持:customDomains = ["frp.j1900.top"] 这样的域名全端口穿透就更好了
或者直接通过 bindaddr = "127.0.0.2" 这样的进行指定ip全端口穿透

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @yz-qc on GitHub (Mar 15, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4068 ### Describe the feature request 目前xtcp的配置只能是单个端口的穿透,比如以下配置: `服务端: [[proxies]] name = "p2p_xxx" type = "xtcp" secretKey = "xxx" localIP = "192.168.2.7" localPort = 77 客户端 [[visitors]] name = "p2p_xxx_visitor" type = "xtcp" serverName = "p2p_xxx" secretKey = "xxx" bindAddr = "127.0.0.1" bindPort = 77 keepTunnelOpen = true ` 但是我想要绑定穿透的时候,同时绑定N个端口 就需要建立N个proxies与visitors,无法进行批量的绑定,我希望能实现批量的端口绑定,以支持一台机器有多个服务的时候可以直接穿透多个端口 ### Describe alternatives you've considered 如,可以配置: `服务端: [[proxies]] name = "p2p_xxx" type = "xtcp" secretKey = "xxx" localIP = "192.168.2.7" localPort = 77,88,99,10000-10020 客户端 [[visitors]] name = "p2p_xxx_visitor" type = "xtcp" serverName = "p2p_xxx" secretKey = "xxx" bindAddr = "127.0.0.1" bindPort = 77,88,99,10000-10020 keepTunnelOpen = true ` 可以同时77,88,99与10000-10020之间端口到对应的端口进行穿透,bindPort 应当与localPort 两两对应的 如果能够支持:customDomains = ["frp.j1900.top"] 这样的域名全端口穿透就更好了 或者直接通过 bindaddr = "127.0.0.2" 这样的进行指定ip全端口穿透 ### Affected area - [ ] Docs - [ ] Installation - [X] Performance and Scalability - [ ] Security - [X] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [X] Client Plugin - [X] Server Plugin - [X] Extensions - [ ] Others
Author
Owner

@fatedier commented on GitHub (Mar 18, 2024):

不支持,这个场景建议 VPN。

<!-- gh-comment-id:2002828452 --> @fatedier commented on GitHub (Mar 18, 2024): 不支持,这个场景建议 VPN。
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#3216
No description provided.