Skip to content

Problem in NAT environment #5

Description

@wangyu-

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions