bnetkit

simple networking utilities
git clone git://bvnf.space/bnetkit.git
Log | Files | Refs

gemini (322B)


      1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
#!/bin/sh -e

[ "$#" -lt 1 ] && {
    printf "usage: %s [gemini://]example.com/foo/bar\n" "$0" >&2
    exit 1
}


for uri; do
    case "$uri" in "gemini://"*) ;; *) uri="gemini://$uri" ;; esac
    nopref="${uri##gemini://}"
    host="${nopref%%/*}"
    printf "%s\r\n" "$uri" | tee /dev/stderr | ./tlsnc "$host" 1965
done