Major refactor: unified launcher, paramiko SSH, DirectorService, diagnostics, and map warning banner

- Merge setup and start scripts into unified launcher (launcher.ps1 / start.sh)
  with menu: Start Dashboard, Run Setup, Run Diagnostics, Quit
- Migrate SSHService from subprocess to paramiko for connection reuse
- Extract Director API into dedicated DirectorService class
- Centralize SSH key resolution in app/utils/ssh_key.py
- Add pagination to player list (50 per page)
- Add comprehensive diagnostics with port-forward troubleshooting guide
- Add 17 new tests (43 total, all passing)
- Fix Director page loading (point to local port-forward instead of remote IP)
- Add experimental warning banner to map page with Dune-themed joke
- Remove dead Flask-Talisman dependency, upgrade cryptography to >=42.0.0
- Fix PowerShell launcher parsing errors (Unicode chars, variable delimiters)
- Update start.bat/setup.bat to point to unified launcher
This commit is contained in:
Reditus committed 2026-05-15 14:57:36 +01:00
1 parent 9ddaa5f667
commit 1959a013ab
19 files changed
+2200 -844

No files matched your search

+3 -19
View File
@@ -17,6 +17,8 @@ except ImportError:
from flask import request, session
from flask_socketio import emit
from app.utils.ssh_key import resolve_ssh_key
logger = logging.getLogger(__name__)
shell_processes = {}
@@ -155,25 +157,7 @@ def register_websocket_handlers(socketio, settings):
def _find_ssh_key(settings):
key = settings['server'].get('ssh_key')
if key and os.path.exists(key):
return key
base_dir = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
temp_dir = os.environ.get('TEMP') or os.environ.get('TMPDIR') or ('/tmp' if os.name != 'nt' else 'C:\\Temp')
local_appdata = os.environ.get('LOCALAPPDATA', '')
potential_paths = [
os.path.join(temp_dir, 'dune-tunnel-key'),
os.path.join(temp_dir, 'dune-awakening-server-sshKey'),
os.path.join(base_dir, 'internal-scripts', 'ssh', 'sshKey'),
os.path.join(os.path.dirname(base_dir), 'internal-scripts', 'ssh', 'sshKey'),
]
if local_appdata:
potential_paths.insert(2, os.path.join(local_appdata, 'DuneAwakeningServer', 'sshKey'))
for p in potential_paths:
if os.path.exists(p):
return p
return None
return resolve_ssh_key(settings['server'].get('ssh_key'))
def _run_ssh_check(host, user, key, command, timeout=10):