csicar / Ning

Network-Scanner for Android
217 stars 35 forks source link

Allow specifying scan options #2

Closed Atrate closed 3 years ago

Atrate commented 4 years ago

From what I've tested so far, it takes Ning upwards of 5 minutes to scan my /24 network while other apps do it much quicker. Would there be a way to include some options that would speed the scan up?

csicar commented 4 years ago

Yes, there are. The time a scan takes is mostly dictated by

There are only 10 pings active at a time and the delay is set to 5s. Those values could easily be tweaked, but I first wanted to make sure that android is now overwhelmed by too many simultaneous requests

csicar commented 4 years ago

Ning also uses ARP and mdns to quicklyfind good guesses for devices that are up

csicar commented 4 years ago

5 minutes seems quite long even in the worst case, Ning should be able to scan a /24 network in 127s or little more than 2 minutes

Atrate commented 4 years ago

Ning also uses ARP and mdns

Might disablong mDNS functionality cause Ning to slow down?

https://github.com/Magisk-Modules-Repo/disable-mdnsd

csicar commented 4 years ago

I could, yes.

Let's say disable-mdnsd would cause mDNS discovery to take very long. In that case the progressbar would fill up in < 3min, but the spinner would keep spinning for a very long time.

Some info about the internals: When start a scan, Ning performs these tasks in parallel:

The progressbar is controlled by how many devices were already pinged. The spinner is stopped once all of the tasks finished.

csicar commented 3 years ago

Ning now uses a custom mDNS implementation, that is a lot faster, as well as scanning previously available deices first, so performance should be greatly increased