[feat] add application-layer trusted device authentication

This commit is contained in:
dijunkun
2026-11-01 23:26:48 +08:00
parent b999a01e66
commit e15e2c33bd
16 changed files with 699 additions and 18 deletions
+3 -1
View File
@@ -180,7 +180,9 @@ std::shared_ptr<PeerEventHandler> GuiRuntime::ControllerEvents(
}
int GuiRuntime::WithController(
const std::string& id,
const std::function<int(PeerPtr*, const std::string&)>& operation) {
const std::function<int(PeerPtr*, const std::string&)>& operation,
bool require_trusted) {
if (require_trusted && !TrustedControllerAllowed(id)) return -1;
std::shared_lock lock(remote_sessions_mutex_);
auto it = lan_controllers_.find(id);
auto events = it == lan_controllers_.end() ? peer_events_ : it->second.events;