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
+
+ +