[GH-ISSUE #5281] [Performance] VirtualNet(XTCP) throughput significantly lower than standard XTCP proxy #4080

Open
opened 2026-05-05 14:35:00 -06:00 by gitea-mirror · 0 comments
Owner

Originally created by @kami93 on GitHub (Apr 7, 2026).
Original GitHub issue: https://github.com/fatedier/frp/issues/5281

Bug Description

Description

Hi, I am very interested in the new VirtualNet feature and have already integrated it into my workflow. However, I’ve observed a significant performance discrepancy: the network transfer rate is substantially slower when using VirtualNet compared to a standard Proxy setup, even though both are based on XTCP.

Environment & Methodology

I tested the download and upload rates between two nodes, both located behind distinct NATs. The tests were performed using dd over ssh.

1. VirtualNet (XTCP)

Download: ~450 kB/s
Upload: ~386 kB/s

# Test download rate
$ SIZE=20 && ssh <user>@100.0.0.1 "dd if=/dev/urandom bs=1M count=$SIZE status=progress" | dd of=/dev/null
20971520 bytes (21 MB, 20 MiB) copied, 46.6435 s, 450 kB/s

# Test upload rate
$ SIZE=20 && dd if=/dev/urandom bs=1M count=$SIZE status=progress | ssh <user>@100.0.0.1 "cat > /dev/null"
20971520 bytes (21 MB, 20 MiB) transferred 54.364s, 386 kB/s

2. Standard Proxy (XTCP)

Download: ~2.6 MB/s
Upload: ~1.9 MB/s

# Test download rate
$ SIZE=20 && ssh 127.0.0.1 -p49999 "dd if=/dev/urandom bs=1M count=$SIZE status=progress" | dd of=/dev/null
20971520 bytes (21 MB, 20 MiB) copied, 7.93457 s, 2.6 MB/s

# Test upload rate
$ SIZE=20 && dd if=/dev/urandom bs=1M count=$SIZE status=progress | ssh <user>@127.0.0.1 -p49999 "cat > /dev/null"
20971520 bytes (21 MB, 20 MiB) transferred 11.008s, 1905 kB/s

Observation

The VirtualNet throughput is roughly 5–6x slower than the standard XTCP proxy under the same network conditions. Could you look into whether there is an inherent overhead or a specific bottleneck in the VirtualNet implementation?

Configuration

Below are the frpc configs for both nodes (sensitive information redacted):

node1 (server)

serverAddr = 'FRPS-SERVER'
serverPort = 'FRPS-PORT'
transport.protocol = 'quic'
featureGates = { VirtualNet = true }

virtualNet.address = "100.0.0.1/16"

[[proxies]]
name = 'NAME-VNET'
type = "xtcp"
secretKey = 'SECRET-VNET'
[proxies.plugin]
type = "virtual_net"

[[proxies]]
name = 'NAME-PROXY'
type = "xtcp"
secretKey = 'SECRET-PROXY'
localIP = "127.0.0.1"
localPort = 22

node2 (client)

serverAddr = 'FRPS-SERVER'
serverPort = 'FRPS-PORT'
transport.protocol = 'quic'
featureGates = { VirtualNet = true }

virtualNet.address = "100.0.0.2/16"

[[visitors]]
name = 'NAME-VNET'
type = "xtcp"
serverName = 'NAME-VNET'
secretKey = 'SECRET-VNET'
bindPort = -1
[visitors.plugin]
type = "virtual_net"
destinationIP = "100.30.0.1"

[[visitors]]
name = 'NAME-PROXY'
type = "xtcp"
serverName = 'NAME-PROXY'
secretKey = 'SECRET-PROXY'
bindAddr = "127.0.0.1"
bindPort = 49999

frpc Version

0.68.0

frps Version

0.68.0

System Architecture

linux/amd64 (node1), macos/aarch64 (node2), and linux/amd64 (frps)

Configurations

see Configuration section.

Logs

No response

Steps to reproduce

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @kami93 on GitHub (Apr 7, 2026). Original GitHub issue: https://github.com/fatedier/frp/issues/5281 ### Bug Description ## Description Hi, I am very interested in the new **VirtualNet** feature and have already integrated it into my workflow. However, I’ve observed a significant performance discrepancy: the network transfer rate is substantially slower when using VirtualNet compared to a standard Proxy setup, even though both are based on **XTCP**. ## Environment & Methodology I tested the download and upload rates between two nodes, both located behind distinct NATs. The tests were performed using `dd` over `ssh`. ### 1. VirtualNet (XTCP) **Download**: ~450 kB/s **Upload**: ~386 kB/s ```bash # Test download rate $ SIZE=20 && ssh <user>@100.0.0.1 "dd if=/dev/urandom bs=1M count=$SIZE status=progress" | dd of=/dev/null 20971520 bytes (21 MB, 20 MiB) copied, 46.6435 s, 450 kB/s # Test upload rate $ SIZE=20 && dd if=/dev/urandom bs=1M count=$SIZE status=progress | ssh <user>@100.0.0.1 "cat > /dev/null" 20971520 bytes (21 MB, 20 MiB) transferred 54.364s, 386 kB/s ``` ### 2. Standard Proxy (XTCP) **Download**: ~2.6 MB/s **Upload**: ~1.9 MB/s ```bash # Test download rate $ SIZE=20 && ssh 127.0.0.1 -p49999 "dd if=/dev/urandom bs=1M count=$SIZE status=progress" | dd of=/dev/null 20971520 bytes (21 MB, 20 MiB) copied, 7.93457 s, 2.6 MB/s # Test upload rate $ SIZE=20 && dd if=/dev/urandom bs=1M count=$SIZE status=progress | ssh <user>@127.0.0.1 -p49999 "cat > /dev/null" 20971520 bytes (21 MB, 20 MiB) transferred 11.008s, 1905 kB/s ``` ## Observation The VirtualNet throughput is roughly 5–6x slower than the standard XTCP proxy under the same network conditions. Could you look into whether there is an inherent overhead or a specific bottleneck in the VirtualNet implementation? ## Configuration Below are the `frpc` configs for both nodes (sensitive information redacted): ### node1 (server) ```toml serverAddr = 'FRPS-SERVER' serverPort = 'FRPS-PORT' transport.protocol = 'quic' featureGates = { VirtualNet = true } virtualNet.address = "100.0.0.1/16" [[proxies]] name = 'NAME-VNET' type = "xtcp" secretKey = 'SECRET-VNET' [proxies.plugin] type = "virtual_net" [[proxies]] name = 'NAME-PROXY' type = "xtcp" secretKey = 'SECRET-PROXY' localIP = "127.0.0.1" localPort = 22 ``` ### node2 (client) ```toml serverAddr = 'FRPS-SERVER' serverPort = 'FRPS-PORT' transport.protocol = 'quic' featureGates = { VirtualNet = true } virtualNet.address = "100.0.0.2/16" [[visitors]] name = 'NAME-VNET' type = "xtcp" serverName = 'NAME-VNET' secretKey = 'SECRET-VNET' bindPort = -1 [visitors.plugin] type = "virtual_net" destinationIP = "100.30.0.1" [[visitors]] name = 'NAME-PROXY' type = "xtcp" serverName = 'NAME-PROXY' secretKey = 'SECRET-PROXY' bindAddr = "127.0.0.1" bindPort = 49999 ``` ### frpc Version 0.68.0 ### frps Version 0.68.0 ### System Architecture linux/amd64 (node1), macos/aarch64 (node2), and linux/amd64 (frps) ### Configurations see **Configuration** section. ### Logs _No response_ ### Steps to reproduce _No response_ ### Affected area - [ ] Docs - [ ] Installation - [x] Performance and Scalability - [ ] Security - [x] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [x] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror added the
question
label 2026-05-05 14:35:00 -06:00
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#4080
No description provided.