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
Describe the feature request
Add an Auto Transport Mode for frp so that
frpccan automatically select the best transport protocol when connecting tofrps.When both sides enable:
frpsadvertises available transport endpoints, such as:frpcthen probes the available candidates and selects the best working transport automatically.Expected behavior:
frpcstarts with a bootstrap connection tofrps.frpsreturns supported transport endpoints and ports.frpcprobes candidate protocols.frpcselects the best available protocol.frpccan reselect another available transport.transport.proxyURLis configured, auto mode should only use TCP.IPv4 / IPv6 probing:
If
serverAddris a domain name,frpcshould resolve both A and AAAA records.For each candidate protocol,
frpcshould test both IPv4 and IPv6 addresses when available, for example:tcp@IPv4:7000tcp@IPv6:7000quic@IPv4:7002quic@IPv6:7002The final selection should use the fastest working route.
Example server config:
Example client config:
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