From 630ff58c166605aeb184c1a749c8eb6c94879c36 Mon Sep 17 00:00:00 2001 From: Hackintosh Five Date: Fri, 8 Dec 2023 14:48:12 +0000 Subject: [PATCH] add readme --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..9b277d5 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# tcpproxy + +tcpproxy proxies a tcp port via openconnect + +## Security + +tcpproxy is probably not secure. Use it only in a containerized environment with non-sensitive data. Don't allow untrusted data to be passed in either direction. Make sure both endpoints are trusted and not attempting exploitation, and that they sanitize inputs. + +## Usage + +1. build the docker container: `podman build .` +2. get a session cookie: `podman run -it $IMAGE authenticate --servercert pin-sha256:4uihYZlNNqOumDmmg9/Nn50TiI5vmPIq2iqmmzgKlxA= --no-system-trust --pfs --protocol=gp remote.vpn.server` +3. start a connection: `podman run -e HOST=example.com -p 1235:1235 -it $IMAGE connect --servercert pin-sha256:4uihYZlNNqOumDmmg9/Nn50TiI5vmPIq2iqmmzgKlxA= --no-system-trust --pfs --protocol=gp remote.vpn.server` +4. send the cookie: `echo 'authcookie=...' | nc -w 1 localhost 1235` +5. use the host: `curl localhost:1234`