gemini.sh: add alternative using socat - randomcrap - random crap programs of varying quality
(HTM) git clone git://git.codemadness.org/randomcrap
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 21a7d24b3f466b0d738d48a4349e9c8325a26f7d
(DIR) parent c736b3eb411f3db9e862e067fd437d2a18387844
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 26 Aug 2023 12:31:07 +0200
gemini.sh: add alternative using socat
Diffstat:
M gemini.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/gemini.sh b/gemini.sh
@@ -19,4 +19,8 @@ test x"$port" = x"" && port="1965"
#echo "port: $port"
#echo "path: $path"
-printf '%s\r\n' "$1" | nc -c "$host" "$port"
+# OpenBSD netcat with (-c TLS connect) option.
+#printf '%s\r\n' "$1" | nc -c "$host" "$port"
+
+# use socat with OpenSSL protocol, !!!no peer verification!!!
+printf '%s\r\n' "$1" | socat - "OPENSSL:$host:$port,verify=0"