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

merge from staltz/non-private-ip #5

Merged
merged 1 commit into from
Jan 25, 2022
Merged

merge from staltz/non-private-ip #5

merged 1 commit into from
Jan 25, 2022

Conversation

staltz
Copy link
Member

@staltz staltz commented Jan 24, 2022

Dominic just transferred this repo to ssbc on my request.

I've been maintaining a fork of this module at https://github.com/staltz/non-private-ip/tree/fork and published it to npm as non-private-ip-android, the reason for that is because when the private() API of this module is used, I would like to get the best available IP address across all network interfaces, and usually the "best" means an IPv4 on WLAN, avoiding some IPv4 such as "rmnet" which (I think) is the Mobile ISP's network address, and that one was always the wrong choice.

So I developed a score system that prioritizes those, but there's others. The ranking order is: WLAN IPv4 > Ethernet IPv4 > WLAN IPv6 > Ethernet IPv6 > VPN IPv4 > VPN IPv6

Apart from that, I also added support for IPv6 scopes, such as %eth0 in fe80::f03c:91ff:fe56:9728%eth0.

Most importantly, I've been running non-private-ip-android in production in Manyverse on Android, iOS, and Desktop, so I am positive that the implementation is good, and that's why I'm making this PR, so we can make it the next official non-private-ip.

@staltz staltz requested a review from arj03 January 24, 2022 12:38
Copy link
Member

@arj03 arj03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see anything wrong with this. Glad that this removes 1 fork in manyverse and simplifies the ecosystem in what packages are used.

@staltz
Copy link
Member Author

staltz commented Jan 24, 2022

By the way, this is a dependency in multiserver-scopes so once updated it should help not just Manyverse but several other apps.

@staltz staltz merged commit ebb0b94 into master Jan 25, 2022
@staltz staltz deleted the merge-fork branch January 25, 2022 07:19
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.

None yet

2 participants