Around remaining blockers (Zapier login, live Verae): generate PDF receipts without extra deps; AES-256-GCM object store with tenant isolation and share tokens; scripts/nats-tunnel.sh to NS1; SHA256 Hash Text local Zapier action; scripts/test-offline.sh for the no-login suite. Learned: other-tenant object GET is 403; share token is the mock unwrap path.
16 lines
566 B
Bash
Executable file
16 lines
566 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# SSH tunnel NS1 JetStream (127.0.0.1:4222 on 70.88.205.138) to local 14222.
|
|
set -euo pipefail
|
|
HOST="${NATS_SSH_HOST:-marchon@70.88.205.138}"
|
|
LOCAL_PORT="${NATS_LOCAL_PORT:-14222}"
|
|
REMOTE="127.0.0.1:4222"
|
|
|
|
if nc -z 127.0.0.1 "$LOCAL_PORT" 2>/dev/null; then
|
|
echo "already listening on 127.0.0.1:${LOCAL_PORT}"
|
|
exit 0
|
|
fi
|
|
|
|
ssh -fN -o ExitOnForwardFailure=yes -o ServerAliveInterval=30 \
|
|
-L "${LOCAL_PORT}:${REMOTE}" "$HOST"
|
|
echo "NATS_URL=nats://127.0.0.1:${LOCAL_PORT}"
|
|
echo "export NATS_URL=nats://127.0.0.1:${LOCAL_PORT} NATS_ENABLED=true"
|