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

Support online port checkers #2160

Open
Measurity opened this issue Aug 9, 2024 · 1 comment
Open

Support online port checkers #2160

Measurity opened this issue Aug 9, 2024 · 1 comment
Labels
Area: setup Related to installing or configuring Nitrox Complexity: easy Suitable for contributors new to Nitrox
Milestone

Comments

@Measurity
Copy link
Collaborator

Measurity commented Aug 9, 2024

Describe the issue

Users want to verify they port forwarded correctly by using port checkers.
Currently, the server doesn't respond to just any UDP message. Update to latest LiteNetLib version so that PacketLayer can be used to intercept messages and send a response.

After implementation, verify by using some port checkers like:

For port checkers to work, use your public IP: https://ipv4.icanhazip.com/

Proof of concept

Following code should show Open status in port checkers for port 11000 UDP.

using UdpClient client = new(new IPEndPoint(IPAddress.Any, 11000));
Console.WriteLine("Ready to receive stuff!");
while (true)
{
    var result = await client.ReceiveAsync();
    Console.WriteLine($"{result.RemoteEndPoint} - {result.Buffer.Length} bytes: {BitConverter.ToString(result.Buffer).Replace('-', '\0')}");
    await client.SendAsync(result.Buffer, result.Buffer.Length, result.RemoteEndPoint);
}
@Measurity Measurity added the Complexity: easy Suitable for contributors new to Nitrox label Aug 9, 2024
@Measurity Measurity added this to the 1.8 milestone Aug 9, 2024
@Measurity Measurity added the Area: setup Related to installing or configuring Nitrox label Aug 9, 2024
@OhmV-IR
Copy link
Contributor

OhmV-IR commented Oct 20, 2024

Currently taking on this issue, but I haven't made a PR yet. Have created a branch in my fork of the nitrox repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: setup Related to installing or configuring Nitrox Complexity: easy Suitable for contributors new to Nitrox
Projects
None yet
Development

No branches or pull requests

2 participants