diff --git a/Dockerfile b/Dockerfile index 6720ad3..b5f0906 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,8 +17,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ ffmpeg \ # VNC & Display dependencies - xvfb \ - x11vnc \ + tigervnc-standalone-server \ + tigervnc-common \ openbox \ # Playwright dependencies libnss3 \ diff --git a/backend/core/playwright_manager.py b/backend/core/playwright_manager.py index 7c7f4a5..0ac2326 100644 --- a/backend/core/playwright_manager.py +++ b/backend/core/playwright_manager.py @@ -12,7 +12,13 @@ import json import os from typing import List, Dict, Optional from playwright.async_api import async_playwright, Response, Browser, BrowserContext -from playwright_stealth import stealth_async + +try: + from playwright_stealth import stealth_async +except ImportError: + print("WARNING: playwright_stealth not found, disabling stealth mode.") + async def stealth_async(page): + pass COOKIES_FILE = "cookies.json" diff --git a/frontend/src/pages/Login.tsx b/frontend/src/pages/Login.tsx index 7207046..b143ebe 100644 --- a/frontend/src/pages/Login.tsx +++ b/frontend/src/pages/Login.tsx @@ -35,8 +35,8 @@ export const Login: React.FC = () => { const getVncUrl = () => { const host = window.location.hostname; - // autoconnect=true, resize=scale to fit, quality=9 for clear text - return `http://${host}:6080/vnc.html?autoconnect=true&resize=scale&quality=9`; + // autoconnect=true, resize=remote (server resizing) for full screen mobile + return `http://${host}:6080/vnc.html?autoconnect=true&resize=remote&quality=9`; }; const handleVncLogin = async () => { diff --git a/supervisord.conf b/supervisord.conf index 258272d..7c252cb 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -4,8 +4,8 @@ logfile=/dev/stdout logfile_maxbytes=0 loglevel=info -[program:xvfb] -command=/usr/bin/Xvfb :99 -screen 0 1920x1080x24 +[program:xvnc] +command=/usr/bin/Xvnc :99 -geometry 1920x1080 -depth 24 -rfbport 5900 -SecurityTypes None -AlwaysShared autorestart=true priority=100 stdout_logfile=/dev/stdout @@ -23,14 +23,6 @@ stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 -[program:x11vnc] -command=x11vnc -display :99 -forever -shared -nopw -listen 0.0.0.0 -xkb -autorestart=true -priority=200 -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 [program:novnc] command=/opt/novnc/utils/novnc_proxy --vnc localhost:5900 --listen 6080