ge0rg / samsung-nx-emailservice

HTTP service replacement for Samsung NX cameras
10 stars 0 forks source link

dns settings #1

Closed winhex closed 9 months ago

winhex commented 10 months ago

Why not change the local DNS settings on the router instead of editing the hosts file in the camera? In this case, any nx camera should work with your service, right?

ge0rg commented 10 months ago

That's an excellent point! Yes, you can change the settings on the local DNS server, however not every router provides a method to override some specific hostnames, and this is especially cumbersome with smartphone hotspots.

I was thinking of running a public DNS server for this use case, one that would redirect the listed host names to a VPS running an email gateway, but running a public DNS is a huge security (DDoS) nightmare, and I don't have the capacity for it.

That said, I only tested this code with NX500, it might work as-is with other camera models, or might require more patches / custom handling.

ge0rg commented 10 months ago

This should probably be added into the README, and feel free to deploy and test it with your own camera model if it's a distinct one :)

ge0rg commented 9 months ago

I've just tested it on the NX mini, and it's not trivial to fix. The camera will request a GET http://gld.samsungosp.com but the response that the server provides makes it think that a captive portal is in place. Even "cheating" the response to "200 OK", as it was when the service was operational (https://op-co.de/blog/posts/hacking_the_nx300/#index3h3) doesn't help.

Unfortunately, I don't have the tools and skills to reverse engineer the NX mini firmware. I'll test again for the NX300, as the 300/30/2000 are then the only remaining cameras that support sending emails.