-
Notifications
You must be signed in to change notification settings - Fork 74
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
There is a bug in udp support #32
Comments
Sorry for necro. Yes, the example does not appear to work with UDP even with UDP support enabled in the library. |
I don't know, I use this crate as a lib and don't use the implemented server/client. (I disable the exec of cmd). Only difference from https://github.com/dizda/fast-socks5/blob/master/src/server.rs#L699 is that I return the ip of the binded socket, not the one from the reply_ip (which I always discard) |
Here's a (very) rough patch which makes UDP work for me in the server example. It does some need cleanup and an extra "rand" dependency. I am a developer but not very familiar with intricacies of Rust. Maybe this patch will at least give you an idea on why the current implementation doesn't work. |
Does this works if you try to contact your udp socks5 from another machine @ddscentral ?
|
You mean outside of localhost ? |
Yeah, it is hard to set a There is an API |
And here is the comments about the API.
|
Well setting the reply IP to all zeros (instead of IPv6 localhost) and a random port instead of a zero port seems to work. |
Agreed, but unfortunately RFC 1928 does not have a detailed description for this part. |
Is udp client supported now? See README it's still on the TODO list. |
By "udp client" you mean UDP support in the "client" example ? |
Yeah, It only has TCP client exmaple. |
Does UDP work? Would be nice as most rust based socks5 servers don't support UDP |
With a small modification I've posted before, UDP does work for me, at least with tun2socks as client. |
cargo run -- --listen-addr 0.0.0.0:5000 password -u 111 -p 333
In the code, I have written config.set_udp_support(true);
However, it still cannot support UDP and prompts "invalid reply ip"
The text was updated successfully, but these errors were encountered: