mirror of
https://github.com/vndangkhoa/purestream.git
synced 2026-04-05 01:17:58 +07:00
Migrate to TigerVNC and enable Remote Resizing
This commit is contained in:
parent
a89b261fa2
commit
1f9f34fe5c
4 changed files with 13 additions and 15 deletions
|
|
@ -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 \
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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 () => {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue