Add local and remote network detection