Closed BayLee4 closed 2 years ago
This last commit implement API 31 compatibility, which fix #125, #129 and #134.
It also update dependencies, drop the outdated JCIFS
library (last update : 2012!) in favor of NetBIOSResolver.java from Angry IP Scanner, and fix the CI to accomodate all of these changes. There is also a few other minor improvements, like not showing .local
suffixes if they exist.
Thanks so much for this! Sorry I have not been responsive, I have not had the time to focus on this project.
Thanks for your work on this. I'll merge it in with some clean ups I am currently working on and hopefully get a release out in the next few days :)
Hi 👋
In this pull request I ported the mDNS hostname resolution from Angry IP Scanner (also GPL licensed) and fixed the NetBIOS hostname resolution which wasn't working for workstations.
Few modification from upstream MDNSResolver, first uncommenting
socket.joinGroup(mdnsIP);
which is working on Android and catch more hosts (was disabled because of macOS I guess) :https://github.com/aaronjwood/PortAuthority/blob/4debcfa25a680e2e0e183bca9b95061ccc9a7a99/app/src/main/java/com/aaronjwood/portauthority/utils/MDNSResolver.java#L19-L20
And modify hostnames parsing accordingly, which change slightly :
https://github.com/aaronjwood/PortAuthority/blob/4debcfa25a680e2e0e183bca9b95061ccc9a7a99/app/src/main/java/com/aaronjwood/portauthority/utils/MDNSResolver.java#L73
Regarding the changes to the NetBIOS hostname resolution, it now catches theNETBIOS_WORKSTATION
name. The default behaviour isn't changed at all, as theNETBIOS_FILE_SERVER
name is still used in priority if present.Both the NetBIOS and mDNS hostname resolution now respects the Lan Socket Timeout setting, which is helpful on slow networks.
The changes in .xml strings are for Android Studio, which refuse to compile without these minor modifications. The rest of the code is commented, but feel free to ask any question!