Skip to content
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

Problem in NAT environment #5

Open
wangyu- opened this issue May 19, 2018 · 1 comment
Open

Problem in NAT environment #5

wangyu- opened this issue May 19, 2018 · 1 comment

Comments

@wangyu-
Copy link

wangyu- commented May 19, 2018

Hi, thanks for the amazing tool.

After several tests, I found it requires public IP for both client and server, otherwise the packet loss will be always 100%.

I have checked the code, looks like the reason is:
For receiving packet, the server creates a listening socket ; but for sending packets back, the server tries to establish a "connection" to client use another socket. If there is no public IP for client, the latter procedure will fail.

The solution is easy, just send packets back with the same socket used for receiving. This is the way most other udp programs (such as netcat) do, it only requires public IP for server.

I am not familiar with the code and Python. I cant create a pull request right now. Nowadays NAT is quite common, I really hope this problem can be fixed. Thank you.

@mrahtz
Copy link
Owner

mrahtz commented May 21, 2018

Hi there! Thanks for using it. I'm glad it's useful.

I'm afraid I'm pretty busy with other things at the moment, so I don't think I'll have time to fix this any time soon. If you do end up creating a pull request, though, I'd be very happy to accept it :) So I'll leave the issue open for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants