-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support to maintain udp conn state #493
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jschwinger233
previously approved these changes
Apr 8, 2024
Could we also fix the linting error? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧪 Since the PR has been fully tested, please consider merging it.
523cd1d
76c9c8f
to
20401ae
Compare
In my simple test, for DNS traffic it works as expected. |
jschwinger233
approved these changes
Apr 8, 2024
sumire88
approved these changes
Apr 8, 2024
3 tasks
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
In the past, the eBPF program did not track UDP connections, which resulted in us needing to explicitly add the UDP listen port to the whitelist in routing, which was inelegant.
In this PR, we introduced bpf_timer to maintain the connection state of UDP to solve this problem.
By default, the UDP connection timeout is 300s.
Notice: Kernel version
>= 5.15
is required to use bpf_timer, thus the requirement for wan proxy is increased.Checklist
Full Changelogs
Issue Reference
Closes #475
Test Result