DylanPiercey / local-devices

🔮 Find devices connected to the current local network.
MIT License
140 stars 27 forks source link

Config which IP ranges to scan #22

Closed Miosame closed 2 years ago

Miosame commented 4 years ago

Currently it scans all subnets connected to the device, but that might not always be useful and take much more time (20 seconds versus ~2-3) than necessary, it would be nice if you could specify a range or subnet at the very least, with something like: https://www.npmjs.com/package/get-ip-range to combat that lengthy scan.

natterstefan commented 4 years ago

Hi @Miosame, sounds promising and could be of interest for others. Feel free to try to add this to the library yourself. It might take a little until I get to try it.

Miosame commented 4 years ago

@natterstefan the change looks easy (in the .js version), so I will give it a try once I have some free minutes soon'ish, but I never worked with typescript side of things, so hopefully that won't be too much to read on, just for such small change.

Edit: nevermind, I assumed the .ts was the actual source of the .js version, but it's not, so should be a non issue.

Miosame commented 4 years ago

PR done: https://github.com/DylanPiercey/local-devices/pull/24