Blob


1 .\" Copyright (c) 2021, 2022 Omar Polo <op@omarpolo.com>
2 .\"
3 .\" Permission to use, copy, modify, and distribute this software for any
4 .\" purpose with or without fee is hereby granted, provided that the above
5 .\" copyright notice and this permission notice appear in all copies.
6 .\"
7 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 .Dd $Mdocdate: October 19 2023$
15 .Dt GG 1
16 .Os
17 .Sh NAME
18 .Nm gg
19 .Nd gemini client
20 .Sh SYNOPSIS
21 .Nm
22 .Bk -words
23 .Op Fl 23Nn
24 .Op Fl C Ar cert
25 .Op Fl d Ar mode
26 .Op Fl H Ar sni
27 .Op Fl K Ar key
28 .Op Fl P Ar host Ns Oo : Ns Ar port Oc
29 .Op Fl T Ar seconds
30 .Ar gemini://...
31 .Ek
32 .Sh DESCRIPTION
33 .Nm
34 .Pq gemini get
35 fetches the given gemini page and prints it to standard output.
36 .Pp
37 The options are as follows:
38 .Bl -tag -width Ds
39 .It Fl 2
40 Use TLSv1.2.
41 .It Fl 3
42 Use TLSv1.3.
43 .It Fl C Ar certificate
44 Use the given client
45 .Ar certificate .
46 .It Fl d Ar mode
47 Specify what
48 .Nm
49 should print.
50 .Ar mode
51 can be one of:
52 .Bl -tag -width header -compact
53 .It Ic none
54 print only the body of the reply, the default.
55 .It Ic code
56 print only the response code.
57 .It Ic header
58 print only the response header.
59 .It Ic meta
60 print only the response meta.
61 .It Ic all
62 print the whole response as-is.
63 .El
64 .It Fl H Ar sni
65 Use the given
66 .Ar sni
67 host name instead of the one deducted by the IRI or proxy.
68 .It Fl K Ar key
69 Specify the key for the certificate.
70 It's mandatory if
71 .Fl C
72 is used.
73 .It Fl N
74 Disables the server name verification.
75 .It Fl n
76 Check the given IRI for validity, but don't issue any requests.
77 .It Fl P Ar host Ns Oo : Ns Ar port Oc
78 Connect to the given
79 .Ar host
80 and
81 .Ar port
82 to do the request instead of the ones extracted by the IRI.
83 .Ar port
84 is by default 1965.
85 .It Fl T Ar seconds
86 Kill
87 .Nm
88 after
89 .Ar seconds .
90 .El
91 .Sh EXIT STATUS
92 The
93 .Nm
94 utility exits with zero if the response code was in the 2x range.
95 If a failure occurs, it exits with status code 1.
96 Otherwise, the error code reflects the Gemini response code.
97 .Sh ACKNOWLEDGEMENTS
98 .Nm
99 uses the
100 .Dq Flexible and Economical
101 UTF-8 decoder written by
102 .An Bjoern Hoehrmann .
103 .Sh SEE ALSO
104 .Xr ftp 1 ,
105 .Xr titan 1
106 .Sh AUTHORS
107 .An -nosplit
108 The
109 .Nm
110 utility was written by
111 .An Omar Polo Aq Mt op@omarpolo.com .
112 .Sh CAVEATS
113 .Nm
114 doesn't perform TOFU
115 .Pq Trust On First Use
116 or any X.509 certificate validation beyond the name verification.
117 .Pp
118 .Nm
119 doesn't follow redirects.