Atlas Cyber Protect

Sign in

Your living network guardian. Sign in to see what Protect is doing for you.

Atlas Cyber Protect

Guardian live
Protected by Atlas v—
—
pulse

Starting…

Network protected

Shields

Live processes

Guardian feed

Recent activity

    /* ——— Atlas Remote live view (in-house remote desktop, no RustDesk) ——— */ (function(){ const OV=document.createElement('div'); OV.id='remoteOverlay'; OV.style.cssText='display:none;position:fixed;inset:0;z-index:99999;background:#05090f;flex-direction:column;'; OV.innerHTML=`
    Atlas Remote connecting… click = click · drag = move · wheel = scroll · type = keyboard
    live view
    Connecting to the PC…
    `; document.body.appendChild(OV); const img=$('rvImg'), msg=$('rvMsg'), title=$('rvTitle'), status=$('rvStatus'); let agentId='', timer=null, cur={w:1,h:1,rw:1920,rh:1080}, sending=false, lastSend=0; let pending=[]; function q(evs){pending.push(...evs);flush();} function flush(){ if(!pending.length||sending)return; const batch=pending.splice(0,50); sending=true; fetch(`/api/companion/remote/input/${encodeURIComponent(agentId)}`,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(batch)}) .then(r=>r.json()).catch(()=>{}).finally(()=>{sending=false; if(pending.length)flush();}); } function openView(aid){ agentId=aid; title.textContent='Atlas Remote · '+aid; OV.style.display='flex'; msg.style.display='flex'; status.textContent='connecting…'; fetchFrame(); timer=setInterval(fetchFrame,900); } function fetchFrame(){ if(!agentId)return; const t=new Date().getTime(); fetch(`/api/companion/remote/frame/${encodeURIComponent(agentId)}?t=${t}`) .then(async r=>{ if(r.status===404){status.textContent='PC offline — agent not streaming yet';return;} if(!r.ok)throw new Error('frame '+r.status); cur.w=parseInt(r.headers.get('X-Frame-Size')?.split('x')[0]||'1',10); cur.h=parseInt(r.headers.get('X-Frame-Size')?.split('x')[1]||'1',10); cur.rw=parseInt(r.headers.get('X-Remote-Size')?.split('x')[0]||cur.w,10); cur.rh=parseInt(r.headers.get('X-Remote-Size')?.split('x')[1]||cur.h,10); const blob=await r.blob(); const url=URL.createObjectURL(blob); img.onload=()=>{ URL.revokeObjectURL(img.src); sizeImg(); }; img.src=url; msg.style.display='none'; status.textContent='live'; status.style.color='#7fd7a0'; }).catch(()=>{status.textContent='no signal'; }); } function sizeImg(){ const box=OV.querySelector('div[style*="flex:1;position:relative"]'); const bw=box.clientWidth, bh=box.clientHeight; const s=Math.min(bw/cur.w, bh/cur.h); img.style.width=Math.floor(cur.w*s)+'px'; img.style.height=Math.floor(cur.h*s)+'px'; img.style.left=Math.floor((bw-cur.w*s)/2)+'px'; img.style.top=Math.floor((bh-cur.h*s)/2)+'px'; } function toRemote(clientX,clientY){ const box=img.getBoundingClientRect(); const rx=(clientX-box.left)/box.width, ry=(clientY-box.top)/box.height; return [Math.round(rx*cur.rw), Math.round(ry*cur.rh)]; } OV.addEventListener('mousemove',ev=>{ const [x,y]=toRemote(ev.clientX,ev.clientY); const now=Date.now(); if(now-lastSend<80)return; lastSend=now; q([{type:'move',x,y,sw:cur.rw,sh:cur.rh}]); }); OV.addEventListener('mousedown',ev=>{ const [x,y]=toRemote(ev.clientX,ev.clientY); q([{type:'click',x,y,sw:cur.rw,sh:cur.rh,button:ev.button===2?'right':(ev.button===1?'middle':'left')}]); }); OV.addEventListener('wheel',ev=>{ ev.preventDefault(); q([{type:'wheel',delta:ev.deltaY>0?-120:120}]); },{passive:false}); OV.addEventListener('keydown',ev=>{ const k=ev.key.toLowerCase(); if(['shift','ctrl','alt'].includes(k))q([{type:'key',key:k,down:true}]); else if(k.length===1)q([{type:'text',text:ev.key}]); else q([{type:'key',key:k,down:true}]); ev.preventDefault(); }); OV.addEventListener('keyup',ev=>{ const k=ev.key.toLowerCase(); if(['shift','ctrl','alt'].includes(k))q([{type:'key',key:k,down:false}]); }); window.addEventListener('resize',sizeImg); $('rvClose').onclick=()=>{ closeView(); }; function closeView(){ if(timer)clearInterval(timer); timer=null; agentId=''; OV.style.display='none'; } window.__openAtlasRemote=openView; window.__closeAtlasRemote=closeView; })();