From 82c331af18281ea748ca51741e06f3d3564f0a7a Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 31 Aug 2025 22:49:57 -0400 Subject: [PATCH] test-connect.sh: initial commit --- test-connect.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test-connect.sh diff --git a/test-connect.sh b/test-connect.sh new file mode 100644 index 0000000..bc52347 --- /dev/null +++ b/test-connect.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +SOCAT_PID= + +cleanup_socat() { + if test ! -z "$SOCAT_PID"; then + kill "$SOCAT_PID" + fi +} + +ENCLAVE_CID=$(nitro-cli describe-enclaves | jq -r ".[0].EnclaveCID") +socat TCP4-LISTEN:3000,reuseaddr,fork VSOCK-CONNECT:$ENCLAVE_CID:3000 & +SOCAT_PID="$!" + +curl -k https://localhost:3000; echo + +trap cleanup_socat EXIT