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

NatPunch - Should it work through gateway (firewall) with all clients on same PC? #374

Closed
sondreb opened this issue Jun 2, 2020 · 2 comments

Comments

@sondreb
Copy link

sondreb commented Jun 2, 2020

The sample included in the repo, "HolePunchServerTest", has a demonstration that does everything in one class (server/relay and two clients).

I'm attempting to separate this logic so I can run a gateway/relay and two individual clients.

While the sample runs fine with ":11" (localhost) as the master server endpoint for "SendNatIntroduceRequest", it doesn't appear to work well when I attempt to use my own public IP as the master server.

The firewall is open on the port, so that should be fine.

In the sample, I get the initial "NatIntroductionSuccess", but the c1.Connect(point, ConnectionKey); fails with this: PeerDisconnected: ConnectionFailed

So the question is two parts:

  • Is this suppose to work when running all locally, meaning both the master/gateway/relay and the two clients?

  • Is there other examples of NAT punch usage? I have searched GitHub and found a few, but nothing that appears to help me.

I have debugged this for a few days now and not been able to find a workable solution. My needs are:

Relay/Gateway that Clients connect to and exchange some messages.
Client can initiate UDP punch through to another Client connected to the relay.

Library version:
Latest NuGet and from source

Framework:
.NET Core 3 (acts same on .NET Framework)

OS:
Windows

@RevenantX
Copy link
Owner

This is possibly just duplicate of #366
Also if you really use port number 11 - use higher port than system reserved. https://en.wikipedia.org/wiki/Registered_port

@sondreb
Copy link
Author

sondreb commented Jun 2, 2020

Thanks, was suppose to be "::1", the port is 15050 :-D

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

No branches or pull requests

2 participants