container-openvpn/bin/serveconfig
2013-09-04 14:22:24 -07:00

15 lines
416 B
Bash
Executable File

#!/bin/sh
cd /etc/openvpn
[ -f client.http ] || {
echo "Please run the OpenVPN container at least once in normal mode,"
echo "to generate the client configuration file. Thank you."
exit 1
}
echo "https://$(curl -s http://myip.enix.org/REMOTE_ADDR):8080/"
socat -d -d \
OPENSSL-LISTEN:8080,fork,reuseaddr,key=key.pem,certificate=cert.pem,verify=0 \
EXEC:'cat client.http' \
2>> http8080.log