Skip to content

Instantly share code, notes, and snippets.

@Weiyuan-Lane
Created May 11, 2021 02:20
Show Gist options
  • Save Weiyuan-Lane/da6193b5be5b290888cad3c36be72227 to your computer and use it in GitHub Desktop.
Save Weiyuan-Lane/da6193b5be5b290888cad3c36be72227 to your computer and use it in GitHub Desktop.
#!/bin/sh
apk add stunnel redis openssl gcc
# Remember to replace the host and port
cat > /etc/stunnel/redis-cli.conf <<EOF
fips = no
setuid = root
setgid = root
pid = /var/run/stunnel.pid
debug = 7
delay = yes
options = NO_SSLv2
options = NO_SSLv3
[redis-cli]
client = yes
accept = 127.0.0.1:6379
connect = %HOST%%PORT%
EOF
stunnel /etc/stunnel/redis-cli.conf
redis-cli -h localhost -p 6379
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment