Blob


1 .\" Copyright (c) 2021-2024 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: May 29 2024$
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 23Nnq
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 q
86 Don't print server error messages to standard error.
87 .It Fl T Ar seconds
88 Kill
89 .Nm
90 after
91 .Ar seconds .
92 .El
93 .Sh EXIT STATUS
94 The
95 .Nm
96 utility exits with zero if the response code was in the 2x range.
97 If a failure occurs, it exits with status code 1.
98 Otherwise, the error code reflects the Gemini response code.
99 .Sh ACKNOWLEDGEMENTS
100 .Nm
101 uses the
102 .Dq Flexible and Economical
103 UTF-8 decoder written by
104 .An Bjoern Hoehrmann .
105 .Sh SEE ALSO
106 .Xr ftp 1 ,
107 .Xr titan 1
108 .Sh AUTHORS
109 .An -nosplit
110 The
111 .Nm
112 utility was written by
113 .An Omar Polo Aq Mt op@omarpolo.com .
114 .Sh CAVEATS
115 .Nm
116 doesn't perform TOFU
117 .Pq Trust On First Use
118 or any X.509 certificate validation beyond the name verification.
119 .Pp
120 .Nm
121 doesn't follow redirects.