[GH-ISSUE #5292] [Feature Request] Add Auto Transport Mode with IPv4/IPv6 endpoint probing #4085

Open
opened 2026-05-05 14:35:09 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @ming79486 on GitHub (Apr 25, 2026).
Original GitHub issue: https://github.com/fatedier/frp/issues/5292

Describe the feature request

Add an Auto Transport Mode for frp so that frpc can automatically select the best transport protocol when connecting to frps.

When both sides enable:

transport.protocol = "auto"

frps advertises available transport endpoints, such as:

  • TCP
  • KCP
  • QUIC
  • WebSocket
  • WSS

frpc then probes the available candidates and selects the best working transport automatically.

Expected behavior:

  • frpc starts with a bootstrap connection to frps.
  • frps returns supported transport endpoints and ports.
  • frpc probes candidate protocols.
  • frpc selects the best available protocol.
  • If the current control session fails, frpc can reselect another available transport.
  • If transport.proxyURL is configured, auto mode should only use TCP.

IPv4 / IPv6 probing:

If serverAddr is a domain name, frpc should resolve both A and AAAA records.

For each candidate protocol, frpc should test both IPv4 and IPv6 addresses when available, for example:

  • tcp@IPv4:7000
  • tcp@IPv6:7000
  • quic@IPv4:7002
  • quic@IPv6:7002

The final selection should use the fastest working route.

Example server config:

bindPort = 7000
kcpBindPort = 7000
quicBindPort = 7002

transport.protocol = "auto"
transport.auto.enabled = true
transport.auto.advertiseProtocols = ["tcp", "kcp", "quic", "websocket", "wss"]

Example client config:

serverAddr = "example.com"
serverPort = 7000

transport.protocol = "auto"
transport.auto.enabled = true
transport.auto.candidates = ["quic", "tcp", "wss", "websocket", "kcp"]

This would make frp more adaptive across different networks, especially where UDP, QUIC, IPv4, or IPv6 availability varies by environment.

Describe alternatives you've considered

https://github.com/ming79486/frp

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @ming79486 on GitHub (Apr 25, 2026). Original GitHub issue: https://github.com/fatedier/frp/issues/5292 ### Describe the feature request Add an Auto Transport Mode for frp so that `frpc` can automatically select the best transport protocol when connecting to `frps`. When both sides enable: ```toml transport.protocol = "auto" ``` `frps` advertises available transport endpoints, such as: - TCP - KCP - QUIC - WebSocket - WSS `frpc` then probes the available candidates and selects the best working transport automatically. Expected behavior: - `frpc` starts with a bootstrap connection to `frps`. - `frps` returns supported transport endpoints and ports. - `frpc` probes candidate protocols. - `frpc` selects the best available protocol. - If the current control session fails, `frpc` can reselect another available transport. - If `transport.proxyURL` is configured, auto mode should only use TCP. IPv4 / IPv6 probing: If `serverAddr` is a domain name, `frpc` should resolve both A and AAAA records. For each candidate protocol, `frpc` should test both IPv4 and IPv6 addresses when available, for example: - `tcp@IPv4:7000` - `tcp@IPv6:7000` - `quic@IPv4:7002` - `quic@IPv6:7002` The final selection should use the fastest working route. Example server config: ```toml bindPort = 7000 kcpBindPort = 7000 quicBindPort = 7002 transport.protocol = "auto" transport.auto.enabled = true transport.auto.advertiseProtocols = ["tcp", "kcp", "quic", "websocket", "wss"] ``` Example client config: ```toml serverAddr = "example.com" serverPort = 7000 transport.protocol = "auto" transport.auto.enabled = true transport.auto.candidates = ["quic", "tcp", "wss", "websocket", "kcp"] ``` This would make frp more adaptive across different networks, especially where UDP, QUIC, IPv4, or IPv6 availability varies by environment. ### Describe alternatives you've considered https://github.com/ming79486/frp ### Affected area - [ ] Docs - [ ] Installation - [x] Performance and Scalability - [ ] Security - [x] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror added the
proposal
label 2026-05-05 14:35:09 -06:00
Author
Owner

@ming79486 commented on GitHub (Apr 28, 2026):

I'll submit a pull request.

<!-- gh-comment-id:4332935637 --> @ming79486 commented on GitHub (Apr 28, 2026): [I'll submit a pull request.](https://github.com/fatedier/frp/pull/5299)
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#4085
No description provided.