https://github.com/gabriel-pinheiro/docker-stunnel-client
A Docker container with STunnel running in client mode. Expose remote TLS ports locally without TLS.
https://github.com/gabriel-pinheiro/docker-stunnel-client
docker mqtt redis ssl stunnel tls
Last synced: about 1 year ago
JSON representation
A Docker container with STunnel running in client mode. Expose remote TLS ports locally without TLS.
- Host: GitHub
- URL: https://github.com/gabriel-pinheiro/docker-stunnel-client
- Owner: gabriel-pinheiro
- Created: 2020-09-21T17:06:16.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-05T12:57:12.000Z (almost 5 years ago)
- Last Synced: 2025-03-31T21:27:49.039Z (over 1 year ago)
- Topics: docker, mqtt, redis, ssl, stunnel, tls
- Language: Shell
- Homepage:
- Size: 1000 Bytes
- Stars: 8
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker-stunnel-client
A Docker container with STunnel running in client mode. Expose remote TLS ports locally without it.
Commonly used to connect to services that are exposed with TLS from an application that doesn't. Like some clients for Redis, MQTT, etc.
If you're using kubernetes, check the sidecar pattern.
## Usage
Let's say you have a service with TLS running on IP 192.0.2.1, on port 6379. This is how you expose it locally in the port 5000:
```shell
docker run -d -e HOST=192.0.2.1 -e REMOTE_PORT=6379 -e LOCAL_PORT=5000 --network host --name stunnel-client gabrielctpinheiro/stunnel-client
```
Here is the meaning of each parameter:
- `-d`: run in detached mode.
- `-e HOST`: the host to connect to.
- `-e REMOTE_PORT`: the port to connect to.
- `-e LOCAL_PORT`: the port to expose in the container.
- `--network host`: use your computer's network interfaces instead of creating a bridge. This is useful if you want to connect to a service through a VPN. You could use `-p 5000:5000` instead, for most cases.
- `--name stunnel-client`: name of the container.
- `gabrielctpinheiro/stunnel-client`: the image to use.