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