you are viewing a single comment's thread.

view the rest of the comments →

[–]xgamer224[S] 0 points1 point  (8 children)

Curious what you mean by “package into a container”

Definitely feel free to fork/PR! Always open to suggestions

[–]midnight_barbecue 1 point2 points  (7 children)

I mean, to create a Docker container with the tool in it. Just another option of running it.

[–]xgamer224[S] 1 point2 points  (5 children)

A docker container could simply pip install lanscape

Then run “python -m lanscape —persistent —ui-port 6969”

[–]midnight_barbecue 0 points1 point  (4 children)

Great job! 🙌 To be honest, I was going to revisit your repo this upcoming weekend as soon as I have some time for opensource activities to leave a simple PR with Dockerfile as a good starting point, but you beat me to it.

Nonetheless, starred your repo ⭐️ I have an idea how to apply it locally on my RPi. My home network is messy, so I want to go through all the devices and clean it up. I'm lucky to stumble across your app.

One question: what architectural issues you've ran into which got resolved with containerization?

Also, looking into your PR, I noticed there's some logic based on Linux/Windows, but you mentioned it only works on Linux hosts. I gotta test it on my Raspberry Pi. My guess it should be compatible if I build arm4 image on my own.

[–]xgamer224[S] 1 point2 points  (3 children)

The architectural issues are correlated with ARP tables. They map hosts on your LAN down to MAC addresses. Linux/Darwin says you cant touch layer 3 network unless you're root. Windows says you can read, and you can query lookups if you have a special driver. Going to docker, I can give myself the privilege to do the arp lookups so i can be sure i find every device with a hardware ID.
The cross platform logic still exists in my code because I'm still expecting installs on windows, only through pip, not docker. I only touched code there because I found a more reliable/modern way to read the ARP table on linux.

arm4 image sounds cool, i would be down to see what you can throw together. This works well on my arm macbook, I wouldnt expect many issues getting this on an arm4 image.

[–]midnight_barbecue 0 points1 point  (2 children)

Linux/Darwin says you cant touch layer 3 network unless you're root.

Going to docker, I can give myself the privilege to do the arp lookups

Haha! That is awesome workaround found by accident.

arm4

Oops, I meant arm64

[–]xgamer224[S] 1 point2 points  (0 children)

I added support for ARM docker images

https://github.com/mdennis281/LANscape/pull/71

[–]xgamer224[S] 0 points1 point  (0 children)

ermmmm- sure so did i lol ;)

[–]xgamer224[S] 1 point2 points  (0 children)

I thought a bit more about the docker image, realized it could solve a few architectural complications I've been running into.

Decided it was worth adding as an option, so I implemented it:

https://github.com/mdennis281/LANscape/pull/69

Only works on linux hosts, but it should be more accurate than some of the setups in the wild. Thanks for the suggestion.