[GH-ISSUE #4730] When forwarding usbipd traffic, the forwarded device can be detected, but the transmitted content appears to be garbled. #3733

Closed
opened 2026-05-05 14:23:35 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @zart2007 on GitHub (Mar 26, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4730

Bug Description

When using frpc to forward the usbipd service running on Windows, garbled characters occur during serial port communication.

I am preparing to use Arduino to create a cloud-based development environment. I use usbipd to directly forward the port to the cloud for burning, serial port communication, and other operations.

Currently, I have tested with two hosts within the local area network. When frp forwarding is not used, everything works fine. However, when using frp to forward the usbipd service, it is impossible to burn the program, and garbled characters also appear during serial port communication.

In principle, there should be no problem with frp forwarding usbip. I suspect that the data after frp forwarding is somewhat different from the original data.

The USB/IP protocol is a network-based USB device sharing mechanism that allows a USB device to be shared from one host to another over a TCP/IP network. The following is a detailed description of the USB/IP protocol.

USB/IP encapsulates the USB protocol into TCP/IP packets and transmits them over the network. Specifically:

Server-side (Server)

  • Captures the I/O operations of the USB device.
  • Encapsulates these operations into network packets and sends them to the client via the TCP/IP protocol.

Client-side (Client)

  • Receives the packets from the server and decapsulates them into operations for the local USB device.
  • The client needs to load the vhci-hcd kernel module to support the virtual USB host controller.

frpc Version

0.61.2

frps Version

0.61.1

System Architecture

linux/amd64

Configurations

frps.toml

bindAddr = "0.0.0.0"
bindPort = 7000

auth.method = ""
auth.token = ""

frpc.toml

serverAddr = ""
serverPort = 7000

auth.method = ""
auth.token = ""

proxies
name = "usbip"
type = "tcp"
localIP = "127.0.0.1"
localPort = 3240
remotePort = 3240

Logs

There is no error message.
The running log is as follows.
D:\frp\frp_0.61.2_windows_amd64\frp_0.61.2_windows_amd64>frpc.exe -c frpc.toml
2025-03-26 18:03:16.917 [I] [sub/root.go:142] start frpc service for config file [frpc.toml]
2025-03-26 18:03:16.932 [I] [client/service.go:295] try to connect to server...
2025-03-26 18:03:17.030 [I] [client/service.go:287] [cb3a817a5b172b0c] login to server success, get run id [cb3a817a5b172b0c]
2025-03-26 18:03:17.031 [I] [proxy/proxy_manager.go:173] [cb3a817a5b172b0c] proxy added: [usbip]
2025-03-26 18:03:17.061 [I] [client/control.go:168] [cb3a817a5b172b0c] [usbip] start proxy success

Steps to reproduce

  1. To enable usbipd on Windows and bind a USB device, you need to download usbipd first.
  2. Forward port 3240.
  3. When running usbip in a Ubuntu virtual machine, you may need to download kernel tools first.
  4. Run the Arduino IDE in Ubuntu, connect the development board, and upload the code.

Image

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @zart2007 on GitHub (Mar 26, 2025). Original GitHub issue: https://github.com/fatedier/frp/issues/4730 ### Bug Description When using frpc to forward the usbipd service running on Windows, garbled characters occur during serial port communication. I am preparing to use Arduino to create a cloud-based development environment. I use usbipd to directly forward the port to the cloud for burning, serial port communication, and other operations. Currently, I have tested with two hosts within the local area network. When frp forwarding is not used, everything works fine. However, when using frp to forward the usbipd service, it is impossible to burn the program, and garbled characters also appear during serial port communication. In principle, there should be no problem with frp forwarding usbip. I suspect that the data after frp forwarding is somewhat different from the original data. The USB/IP protocol is a network-based USB device sharing mechanism that allows a USB device to be shared from one host to another over a TCP/IP network. The following is a detailed description of the USB/IP protocol. USB/IP encapsulates the USB protocol into TCP/IP packets and transmits them over the network. Specifically: **Server-side (Server)** - Captures the I/O operations of the USB device. - Encapsulates these operations into network packets and sends them to the client via the TCP/IP protocol. **Client-side (Client)** - Receives the packets from the server and decapsulates them into operations for the local USB device. - The client needs to load the vhci-hcd kernel module to support the virtual USB host controller. ### frpc Version 0.61.2 ### frps Version 0.61.1 ### System Architecture linux/amd64 ### Configurations ### frps.toml bindAddr = "0.0.0.0" bindPort = 7000 auth.method = "" auth.token = "" ### frpc.toml serverAddr = "" serverPort = 7000 auth.method = "" auth.token = "" [[proxies]] name = "usbip" type = "tcp" localIP = "127.0.0.1" localPort = 3240 remotePort = 3240 ### Logs There is no error message. The running log is as follows. D:\frp\frp_0.61.2_windows_amd64\frp_0.61.2_windows_amd64>frpc.exe -c frpc.toml 2025-03-26 18:03:16.917 [I] [sub/root.go:142] start frpc service for config file [frpc.toml] 2025-03-26 18:03:16.932 [I] [client/service.go:295] try to connect to server... 2025-03-26 18:03:17.030 [I] [client/service.go:287] [cb3a817a5b172b0c] login to server success, get run id [cb3a817a5b172b0c] 2025-03-26 18:03:17.031 [I] [proxy/proxy_manager.go:173] [cb3a817a5b172b0c] proxy added: [usbip] 2025-03-26 18:03:17.061 [I] [client/control.go:168] [cb3a817a5b172b0c] [usbip] start proxy success ### Steps to reproduce 1. To enable usbipd on Windows and bind a USB device, you need to download usbipd first. 2. Forward port 3240. 3. When running usbip in a Ubuntu virtual machine, you may need to download kernel tools first. 4. Run the Arduino IDE in Ubuntu, connect the development board, and upload the code. ![Image](https://github.com/user-attachments/assets/051967d4-bb8a-4158-9086-587daa07972a) ... ### Affected area - [ ] Docs - [ ] Installation - [x] Performance and Scalability - [ ] Security - [ ] User Experience - [x] Test and Release - [x] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [x] Extensions - [ ] Others
gitea-mirror 2026-05-05 14:23:35 -06:00
Author
Owner

@fatedier commented on GitHub (Mar 26, 2025):

This looks like an application-layer issue, and I’m unable to provide effective help.

<!-- gh-comment-id:2753987295 --> @fatedier commented on GitHub (Mar 26, 2025): This looks like an application-layer issue, and I’m unable to provide effective help.
Author
Owner

@github-actions[bot] commented on GitHub (Apr 10, 2025):

Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.

<!-- gh-comment-id:2791265250 --> @github-actions[bot] commented on GitHub (Apr 10, 2025): Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.
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#3733
No description provided.