12 lines
548 B
Bash
12 lines
548 B
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
# netvm-cdp.sh <profile> — show how to reach a profile's CDP endpoint.
|
||
|
|
set -euo pipefail
|
||
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||
|
|
. "$SCRIPT_DIR/netvm-names.sh"
|
||
|
|
netvm_names "${1:?usage: netvm-cdp.sh <profile>}"
|
||
|
|
TAIL_IP=$(tailscale ip -4 2>/dev/null | head -1)
|
||
|
|
echo "profile: $NODE"
|
||
|
|
echo "cdp: http://$PEER_IP:$CDP_PORT/json/list (from this host)"
|
||
|
|
echo "remote: ssh -L $CDP_PORT:$PEER_IP:$CDP_PORT super@${TAIL_IP:-<tail-ip-of-this-host>}"
|
||
|
|
echo "launch: netvm-chrome.sh $NODE [--headless] (CDP on by default)"
|