marcosdiez / shareviahttp

Share Via Http - Android
Other
175 stars 37 forks source link

Prefer IPv4 addresses on wlan* interfaces #57

Closed jpolnetpl closed 3 years ago

jpolnetpl commented 5 years ago

This, rather naive, implementation focuses on feature requested in issue #55 - application should now prefer IPv4 addresses on "wlan*" interfaces.

It uses four ArrayLists for different types of addresses that are merged together in order of preference (IPv4 on wlan, other non-local IPv4, IPv6 and local).

Unfortunately I don't have a working Android development environment, but I've tried my best to test the algorithm on an isolated Java class and merge it with your code without any typos.