mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #3786] UDP Packets over 1500 bytes are clipped #3010
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#3010
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @half2me on GitHub (Nov 20, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3786
Bug Description
When proxying UDP packets over 1500 bytes, only the first 1500 bytes of the payload are received, the rest is lost.
This behaviour seems to be the same regardless of the protocol used to connect to frps. I've tried
tcp,quicandkcp, they all produce the same result.frpc Version
0.52.3
frps Version
0.52.3
System Architecture
server: linux_arm64, client: darwin_arm64
Configurations
Server:
Client:
Logs
No response
Steps to reproduce
The server console should show:
Got 5000 bytes from clientNow send the same UDP packet over frp. Start frpc, and rerun the script, but change the
IPADDRfrom127.0.0.1to the public IP where frps is listening.The console of the python server now shows:
Got 1500 bytes from clientThis is the wrong size, as its only the first part of the packet.
Affected area
@half2me commented on GitHub (Nov 20, 2023):
I've tried to send
1501bytes of payload, and that fails the same. It seems like1500is the hard limit for UDP payload.@half2me commented on GitHub (Nov 20, 2023):
Update, I've found the
UDPPacketSizeparameter that is configurable. If I increase this, it works. Maybe this could be added to the documentation?@xqzr commented on GitHub (Nov 20, 2023):
https://gofrp.org/zh-cn/docs/reference/client-configures/#clientcommonconfig
@fatedier commented on GitHub (Nov 21, 2023):
https://github.com/fatedier/frp#configuration-files
@half2me It is difficult for us to describe the configuration of all functions one by one. Here, it is mentioned that you can find more capabilities in the full example configuration that are not mentioned in the documentation.
@half2me commented on GitHub (Nov 21, 2023):
@fatedier Yes, I understand. But I spent at least a few hours debugging this issue yesterday thinking it was something wrong in my application. I didn't expect frp to be modifying my data as a "default" behaviour. Is there any reason that the max udp packet size is set to 1500 instead of a higher value? What is the purpose of limiting it? Is it for memory saving?
@xqzr commented on GitHub (Nov 21, 2023):
1500 是标准的 以太网 MTU 值