Hi guys,
I recently used sfml-network for a custom project :
What forAs my ISP does not provide me a static public ip address and because i was not entirely satisfied with dyndns.org or no-ip solutions, i designed my own "dynamic dns client/server" using sfml-network for client/server communications / thread management and Gandi XmlRpc API for updating my domain.
How it works1. A client sends periodically an UDP packet to the server, telling which subdomain to update.
2. The server calls GANDI xmlRpc API to check if the ip has changed and updates the subdomain if needed.
3. I can now send a dns lookup to retrieve my public IP...
4. ... And enjoy accessing my private network, even if my public ip has changed over time.
Why SFMLit proved itself quite easy to cross compile for my router and to use it for that purpose, so i guess it wasn't a bad choice.
SecurityIn order to deny the update of a subdomain from unwanted clients, i've implemented a basic password based SHA-256 security.
ImprovmentsCurrently, the hash, for a given subdomain, client and password stays the same as long as the client ip stays the same, i should add a seed of some sort to make it changes over time, making it harder to find.The password is the same for all clients and thus for all subdomains. I should add some configuration to allow a password for each subdomain.Unit tests...
Sourceshttps://github.com/dwarfman78/heartbeat-clienthttps://github.com/dwarfman78/heartbeat-server