more universal IP detection solution