{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 🎮 reVCDOS Server\n", "\n", "**Powered by:** [GitHub (Lolendor/reVCDOS)](https://github.com/Lolendor/reVCDOS) [Forgejo (Lolendor/reVCDOS)](https://v13.next.forgejo.org/Lolendor/reVCDOS)\n", "\n", "Run the cell below to start the server. You will get a public URL and password." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#@title ▶️ Start Server { display-mode: \"form\" }\n", "import subprocess\n", "import time\n", "import urllib.request\n", "import re\n", "import sys\n", "from IPython.display import clear_output, display, HTML\n", "\n", "PORT = 8000\n", "\n", "# Clone repo\n", "print(\"📥 Cloning repository...\")\n", "subprocess.run([\"git\", \"clone\", \"-q\", \"https://github.com/Lolendor/reVCDOS.git\"], \n", " capture_output=True)\n", "\n", "import os\n", "os.chdir(\"reVCDOS\")\n", "\n", "# Install dependencies\n", "print(\"📦 Installing dependencies...\")\n", "subprocess.run([sys.executable, \"-m\", \"pip\", \"install\", \"-q\", \"-r\", \"requirements.txt\"],\n", " capture_output=True)\n", "\n", "# Install localtunnel\n", "print(\"🌐 Installing localtunnel...\")\n", "subprocess.run([\"npm\", \"install\", \"-g\", \"localtunnel\"], capture_output=True)\n", "\n", "# Get tunnel password from localtunnel's own endpoint\n", "password = urllib.request.urlopen('https://loca.lt/mytunnelpassword').read().decode('utf8').strip()\n", "\n", "# Start server\n", "print(\"🚀 Starting server...\")\n", "server = subprocess.Popen(\n", " [sys.executable, \"server.py\", \"--packed\", \"https://folder.morgen.qzz.io/revcdos.bin\"],\n", " stdout=subprocess.DEVNULL,\n", " stderr=subprocess.DEVNULL\n", ")\n", "time.sleep(3)\n", "\n", "# Start localtunnel and capture URL\n", "print(\"🔗 Creating tunnel...\")\n", "tunnel = subprocess.Popen(\n", " [\"lt\", \"--port\", str(PORT)],\n", " stdout=subprocess.PIPE,\n", " stderr=subprocess.STDOUT,\n", " text=True\n", ")\n", "\n", "# Wait for URL\n", "tunnel_url = None\n", "for _ in range(30):\n", " line = tunnel.stdout.readline()\n", " if line:\n", " match = re.search(r'https://[a-zA-Z0-9-]+\\.loca\\.lt', line)\n", " if match:\n", " tunnel_url = match.group(0)\n", " break\n", " time.sleep(0.5)\n", "\n", "# Clear all output and show only what matters\n", "clear_output(wait=True)\n", "\n", "if tunnel_url:\n", " # Display interactive button that copies password and opens URL\n", " html = f'''\n", "