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

Local ip check update #729

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

foxmcloud555
Copy link

We need to establish a websocket connection between two devices connected to the same mobile hotspot.

This means we can't reliably get a valid DNS entry for the isLocal check.

I have just added extension that will return true if a supplied IP is within the Private ranges.

…ues.

This is because we require websocket functionality on mobile hotspots, and can't rely on DNS entries.
@kijz
Copy link

kijz commented Jun 21, 2023

tested this today and also saved me a lot of trouble, while trying to connect via iOS on a local network (no internet).

var name = System.Net.Dns.GetHostName ();
var addrs = System.Net.Dns.GetHostAddresses (name);

would never return the ip address in the local network, which you can view via Wifi (i) icon.
Worked on android though.

@MerijnHendriks
Copy link

Thanks for the commit, it really helped me out! You probably do want to update the pull request to use the same styling as the rest of the codebase.

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

Successfully merging this pull request may close these issues.

4 participants