diff --git a/README.md b/README.md index 6a79397..be2b185 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ AnyVM includes a built-in, premium VNC Web UI that allows you to access the VM's - **Fullscreen**: Toggle fullscreen mode for an immersive experience. - **Stats**: Real-time FPS and latency monitoring. - **Accessibility**: Available at `http://localhost:6080` by default. If the port is occupied, AnyVM will automatically try the next available port (e.g., 6081, 6082). -- **Remote Access**: Use `--remote-vnc` to automatically create a public, secure tunnel (via Cloudflare, Localhost.run, or Pinggy) to access your VM's display from anywhere in the world. (In Google Cloud Shell, this is enabled by default; use `--remote-vnc no` to disable). +- **Remote Access**: Use `--remote-vnc` to automatically create a public, secure tunnel (via Cloudflare, Localhost.run, Pinggy, or Serveo) to access your VM's display from anywhere in the world. (In Google Cloud Shell, this is enabled by default; use `--remote-vnc no` to disable). ## 9. CLI options (with examples) @@ -237,9 +237,9 @@ All examples below use `python3 anyvm.py ...`. You can also run `python3 anyvm.p - **VNC Web UI**: Enabled by default starting at port `6080` (auto-increments if busy). Use `--vnc off` to disable. - Example: `python3 anyvm.py --os freebsd --vnc 0` -- `--remote-vnc`: Create a public tunnel for the VNC Web UI using Cloudflare, Localhost.run, or Pinggy. +- `--remote-vnc`: Create a public tunnel for the VNC Web UI using Cloudflare, Localhost.run, Pinggy, or Serveo. - Example: `python3 anyvm.py --os freebsd --remote-vnc` - - Advanced: Use `cf`, `lhr`, or `pinggy` to specify a service: `python3 anyvm.py --os freebsd --remote-vnc cf` + - Advanced: Use `cf`, `lhr`, `pinggy`, or `serveo` to specify a service: `python3 anyvm.py --os freebsd --remote-vnc cf` - Disable: Use `no` to disable (e.g., in Google Cloud Shell where it's default): `python3 anyvm.py --os freebsd --remote-vnc no` - `--mon `: Expose the QEMU monitor via telnet on localhost. diff --git a/anyvm.py b/anyvm.py index 0c9fe79..b2e2268 100644 --- a/anyvm.py +++ b/anyvm.py @@ -2155,15 +2155,21 @@ def tunnel_manager(): }, { 'name': 'Localhost.run', - 'cmd': lambda: ["ssh", "-o", "StrictHostKeyChecking=no", "-o", "BatchMode=yes", "-o", "ExitOnForwardFailure=yes", "-o", "ConnectTimeout=10", "-R", "80:localhost:{}".format(web_port), "lx@localhost.run"], + 'cmd': lambda: ["ssh", "-F", "/dev/null" if sys_name != "windows" else "NUL", "-T", "-o", "StrictHostKeyChecking=no", "-o", "IdentitiesOnly=yes", "-o", "BatchMode=yes", "-o", "ExitOnForwardFailure=yes", "-o", "ConnectTimeout=10", "-R", "80:localhost:{}".format(web_port), "lx@localhost.run"], 'regex': r"https?://[a-z0-9.-]+\.lhr\.(?:life|proxy\.localhost\.run|localhost\.run)", 'msg': "Open this link to access WebVNC (via Localhost.run): {}" }, { 'name': 'Pinggy', - 'cmd': lambda: ["ssh", "-o", "StrictHostKeyChecking=no", "-o", "BatchMode=yes", "-o", "ExitOnForwardFailure=yes", "-o", "ConnectTimeout=10", "-p", "443", "-R", "80:localhost:{}".format(web_port), "a.pinggy.io"], + 'cmd': lambda: ["ssh", "-F", "/dev/null" if sys_name != "windows" else "NUL", "-T", "-o", "StrictHostKeyChecking=no", "-o", "IdentitiesOnly=yes", "-o", "BatchMode=yes", "-o", "ExitOnForwardFailure=yes", "-o", "ConnectTimeout=10", "-p", "443", "-R", "80:localhost:{}".format(web_port), "a.pinggy.io"], 'regex': r"https?://[a-z0-9.-]+\.pinggy\.link", 'msg': "Open this link to access WebVNC (via Pinggy): {}" + }, + { + 'name': 'Serveo', + 'cmd': lambda: ["ssh", "-o", "StrictHostKeyChecking=no", "-o", "ExitOnForwardFailure=yes", "-o", "ConnectTimeout=10", "-R", "80:localhost:{}".format(web_port), "serveo.net"], + 'regex': r"https?://[a-z0-9.-]+\.(?:serveo\.net|serveousercontent\.com)", + 'msg': "Open this link to access WebVNC (via Serveo): {}" } ] @@ -2176,6 +2182,8 @@ def tunnel_manager(): strategies = [s for s in strategies if s['name'] == 'Localhost.run'] elif "pinggy" in req: strategies = [s for s in strategies if s['name'] == 'Pinggy'] + elif "serveo" in req: + strategies = [s for s in strategies if s['name'] == 'Serveo'] for strat in strategies: cmd = strat['cmd']() @@ -2392,8 +2400,8 @@ def print_usage(): --vnc Enable VNC on specified display (e.g., 0 for :0). Default: enabled (display 0). Web UI starts at 6080 (increments if busy). Use "--vnc off" to disable. - --remote-vnc Create a public URL for the VNC Web UI using Cloudflare, Localhost.run, or Pinggy. - Usage: --remote-vnc (auto), --remote-vnc cf, --remote-vnc lhr, --remote-vnc pinggy. + --remote-vnc Create a public URL for the VNC Web UI using Cloudflare, Localhost.run, Pinggy, or Serveo. + Usage: --remote-vnc (auto), --remote-vnc cf, --remote-vnc lhr, --remote-vnc pinggy, --remote-vnc serveo. Enabled by default if no local browser is detected (e.g., in Cloud Shell). Use "--remote-vnc no" to disable. --remote-vnc-link-file Specify a file to write the remote VNC link to (instead of the default .remote file).