forked from Deuxfleurs/nixcfg
14 lines
236 B
Bash
14 lines
236 B
Bash
|
#!/usr/bin/env bash
|
||
|
UPSTREAM=$1
|
||
|
PROXY_PORT=$2
|
||
|
socat -dd \
|
||
|
"openssl-listen:${PROXY_PORT},\
|
||
|
reuseaddr,\
|
||
|
fork,\
|
||
|
cert=/tmp/tls-tls-proxy/rsa.crt,\
|
||
|
key=/tmp/tls-tls-proxy/rsa.key,\
|
||
|
verify=0,\
|
||
|
bind=0.0.0.0" \
|
||
|
"openssl:${UPSTREAM},\
|
||
|
verify=0"
|