3 # This script is called by autossl.so.
4 # See variables in autossl.so and in autossl wrapper script's docs.
8 if [ ! $AUTOSSL_SILENT ]
18 for pair
in $AUTOSSL_TLS_PORT_MAP
26 tls_port
=${tls_ports[$plaintext_port]}
30 unset AUTOSSL_UPGRADE_PORTS
31 exec nc
-v "$ip" "$plaintext_port"
33 diag
"autossl: opening TLS channel to $ip:$tls_port"
35 if [ "$AUTOSSL_BACKEND" = stunnel
]
37 diag
"autossl: run: stunnel -f -c -r $ip:$tls_port $STUNNEL_EXTRA_ARGS"
38 exec stunnel
-f -c -r "$ip:$tls_port" $STUNNEL_EXTRA_ARGS
40 diag
"autossl: run: openssl s_client -connect $ip:$tls_port $OPENSSL_EXTRA_ARGS"
41 exec /usr
/local
/opt
/openssl_1.1
.1h
/bin
/openssl s_client
-connect "$ip:$tls_port" -quiet $OPENSSL_EXTRA_ARGS