summaryrefslogtreecommitdiff
path: root/data/stunnel/stunnel3
diff options
context:
space:
mode:
Diffstat (limited to 'data/stunnel/stunnel3')
-rwxr-xr-xdata/stunnel/stunnel355
1 files changed, 55 insertions, 0 deletions
diff --git a/data/stunnel/stunnel3 b/data/stunnel/stunnel3
new file mode 100755
index 000000000..86ed9264d
--- /dev/null
+++ b/data/stunnel/stunnel3
@@ -0,0 +1,55 @@
+#!/bin/bash
+exec stunnel4 <(
+ (while getopts 'cTWfD:O:o:C:p:v:a:A:t:N:u:n:E:R:B:I:d:s:g:P:r:L:l:' OPTKEY; do
+ case $OPTKEY in
+ (c) echo "client = yes";;
+ (T) echo "transparent = yes";;
+ (W) echo "RNDoverwrite = yes";;
+ (f) echo "foreground = yes";;
+ (D) echo "debug = $OPTARG";;
+ (O) echo "socket = $OPTARG";;
+ (o) echo "output = $OPTARG";;
+ (C) echo "ciphers = $OPTARG";;
+ (p) echo "cert = $OPTARG";;
+ (v) echo "verify = $OPTARG";;
+ (a) echo "CApath = $OPTARG";;
+ (A) echo "CAfile = $OPTARG";;
+ (t) echo "session = $OPTARG";;
+ (N) echo "service = $OPTARG";;
+ (u) echo "ident = $OPTARG";;
+ (n) echo "protocol = $OPTARG";;
+ (E) echo "EGD = $OPTARG";;
+ (R) echo "RNDfile = $OPTARG";;
+ (B) echo "RNDbytes = $OPTARG";;
+ (I) echo "local = $OPTARG";;
+
+ (d)
+ echo "accept = $OPTARG"
+ stunnel3=
+ ;;
+
+ (s) echo "setuid = $OPTARG";;
+ (g) echo "setgid = $OPTARG";;
+ (P) echo "pid = $OPTARG";;
+ (r) echo "connect = $OPTARG";;
+
+ (L)
+ echo "pty = yes"
+ echo "exec = $OPTARG"
+ ;;
+
+ (l)
+ echo "exec = $OPTARG"
+ ;;
+ esac
+ done
+
+ if [[ ${stunnel3+@} ]]; then
+ echo "[stunnel3]"
+ fi
+
+ shift $((OPTIND - 1))
+ if [[ $# -ne 0 ]]; then
+ echo "execargs = $@"
+ fi) | tee /proc/self/fd/2
+)