tcpproxy/README.md

16 lines
900 B
Markdown
Raw Permalink Normal View History

2023-12-08 14:48:12 +00:00
# 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`