From 2867c2bb0a226e49ec4ede7dade29c03c26acb35 Mon Sep 17 00:00:00 2001 From: Leopere Date: Mon, 9 Feb 2026 14:41:50 -0500 Subject: [PATCH] Add test stack and ignore compiled binaries docker-compose.test.yml spins up an nginx + tunnel-client pointing at testrst.nixc.us with basicauth test:test for end-to-end validation. Co-authored-by: Cursor --- .gitignore | 2 ++ docker-compose.test.yml | 27 +++++++++++++++++++++++++++ test-index.html | 29 +++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 docker-compose.test.yml create mode 100644 test-index.html diff --git a/.gitignore b/.gitignore index 484d883..9100277 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ # Binaries (root level only) /tunnel-server /tunnel-client +/server +/client # Keys (never commit secrets) keys/ diff --git a/docker-compose.test.yml b/docker-compose.test.yml new file mode 100644 index 0000000..0b3ec11 --- /dev/null +++ b/docker-compose.test.yml @@ -0,0 +1,27 @@ +# Test stack: nginx HTTP server + tunnel client exposing it at testrst.nixc.us +# Usage: docker compose -f docker-compose.test.yml up --build +services: + test-http: + image: nginx:alpine + volumes: + - ./test-index.html:/usr/share/nginx/html/index.html:ro + expose: + - "80" + + test-tunnel-client: + build: + context: . + target: client + environment: + TUNNEL_SERVER: "ingress.nixc.us:2222" + TUNNEL_DOMAIN: "testrst.nixc.us" + TUNNEL_PORT: "80" + TUNNEL_KEY: "/keys/client_key" + TUNNEL_AUTH_USER: "test" + TUNNEL_AUTH_PASS: "test" + volumes: + - ~/.ssh/ca-userkey:/keys/client_key:ro + depends_on: + - test-http + # Share network namespace with test-http so 127.0.0.1:80 reaches nginx + network_mode: "service:test-http" diff --git a/test-index.html b/test-index.html new file mode 100644 index 0000000..46cd016 --- /dev/null +++ b/test-index.html @@ -0,0 +1,29 @@ + + + + + + Tunnel Test + + + +
+

Reverse SSH Tunnel Test

+

If you can see this, the tunnel to testrst.nixc.us is working.

+
Tunnel active — served via nginx
+
+ +