refactor get_selected_target in engine, add device in get_proxy_rights if available