Using netcat with gemini (was Re: A question regarding the spec)

Jeffrey Horn <jrhorn424 at gmail.com> writes:

Hi, I don't think netcat does tls.  One thing you could do is to use
openssl:

#+begin_src bash
echo -e "gemini://gemini.circumlunar.space:1965/\r\n" | openssl s_client 
-connect gemini.circumlunar.space:1965 -ign_eof
#+end_src

this command establishes a connection, sends <URL><CR><LF> and then
reads the response ("20 text/gemini")



> On Sun, Oct 25, 2020 at 7:02 AM Ali Fardan <raiz at stellarbound.space> wrote:
>> I was browsing gemspace using netcat ...
>
> This made me curious so I started up netcat. According to the spec,
> the request is `<URI> <CR> <LF>`. I thought this was correct, but I
> just lose the connection when sending the line feed:
>
> ```
> $ nc gemini.circumlunar.space 1965
> gemini://gemini.circumlunar.space/
> $
> ```
>
> Any suggestions?
>
> -- 
> jeff

---

Previous in thread (6 of 21): 🗣️ Jeffrey Horn (jrhorn424 (a) gmail.com)

Next in thread (8 of 21): 🗣️ Sudipto Mallick (smallick.dev (a) gmail.com)

View entire thread.