-
Notifications
You must be signed in to change notification settings - Fork 67
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
Implement UDP command. #12
Conversation
Signed-off-by: yuguorui <yuguorui96@gmail.com>
Signed-off-by: yuguorui <yuguorui96@gmail.com>
Although most SOCKS5 clients (such as chrome, curl) don't care about the address in the reply, setting the address will help subsequent UDP ASSOCIATE implementations to include the correct value in the corresponding reply. Signed-off-by: yuguorui <yuguorui96@gmail.com>
Signed-off-by: yuguorui <yuguorui96@gmail.com>
Signed-off-by: yuguorui <yuguorui96@gmail.com>
Signed-off-by: yuguorui <yuguorui96@gmail.com>
BTW, you could run |
Hi @yuguorui, Thank you for your PR. |
} | ||
TargetAddr::Domain(ref domain, port) => { | ||
debug!("TargetAddr::Domain"); | ||
if domain.len() > u8::max_value() as usize { |
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.
u8::max_value()
is deprecated, could you replace it with MAX?
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.
Sure, I will fix that.
It looks really good, thank you! |
Could you also update the README.md? |
Would it be possible to add a flag on the server::Config to toggle UDPAssociate support? (in order to disallow it) |
I've merged that PR, you can submit new changed onto a new one 🙏 Thank you. |
Of course, it's my pleasure. |
Yes, I also think it's a good idea to avoid code bloat, I'll do it asap. |
Thank you @yuguorui |
Hi, I have been using fast-socks5 for quite a while, and it works great.
It's just a pity that UDP support is missing, I've done some work here, could you please write some comments?