This scenario happened to me today:
Imagine you have two Fritz!Boxes, of which both claim the hostname fritz.box.
If we do this crappy reverse DNS stuff and the hostname later resolves to a different IP, then
it is possible, that we accidentally update a different box.
Instead we should let the user decide, whether to connect with hostname or IP.
If a box really needs the user to log in via hostname and connecting is only possible via IP, then we anyway would have to change fritzbox_api_php to send the hostname in http headers.
This scenario happened to me today: Imagine you have two Fritz!Boxes, of which both claim the hostname
fritz.box
. If we do this crappy reverse DNS stuff and the hostname later resolves to a different IP, then it is possible, that we accidentally update a different box.Instead we should let the user decide, whether to connect with hostname or IP.
If a box really needs the user to log in via hostname and connecting is only possible via IP, then we anyway would have to change
fritzbox_api_php
to send the hostname in http headers.