StunCaddsies/stunnel.sh

20 lines
302 B
Bash

#! /bin/bash
# requireCert = yes
# verifyChain = yes | no
# CAfile = path
# cert = path
#client=no
config='
foreground=yes
cert=/etc/server.crt
key=/etc/server.key
[default]
accept=2018
connect=2015
'
echo "$config" > /stunnel.conf
stunnel /stunnel.conf -p $(find / -name "*.pem" | tr '\n' ',')