.Dd Jun 10, 2020 .Dt GEMINAWK 1 .Os .Sh NAME .Nm geminawk .Nd a Gemini client written with .Xr awk 1 .Sh SYNOPSIS .Nm .Op Fl R .Op Fl h Ar hostname .Op Fl p Ar default-port .Op Fl r Ar max-redirects .Ar URL ... .Sh DESCRIPTION Fetch .Ar URL using the Gemini protocol. .Pp The options are as follows: .Bl -tag -width Ds .It Fl R Request .Ar URL exactly as it is given. .It Fl h Ar hostname The actual hostname to make requests to. This allows for proxying, and other similar situations. .It Fl p Ar default-port Set the default port to use when there is no port in the .Ar URL . .Pq default Li 1965 .It Fl r Ar max-redirects Set the maximum number of redirects to follow. .Pq default Li 5 .El .Sh ENVIRONMENT .Bl -tag -width Ds .It Ev NC The path to for, or to call in place of, .Xr nc 1 . .It Ev NCFLAGS The flags to pass to .Ev NC . .It Ev HOST The hostname to make requests to .Pq Fl h Ar hostname . .It Ev PORT The default port number .Pq Fl p Ar default-port . .It Ev REDIRECTS The maximum number of redirects .Pq Fl r Ar max-redirects . .El .Sh SEE ALSO .Xr awk 1 , .Xr nc 1 , .Xr openssl 1 .Sh EXIT STATUS .Ex -std .Sh EXAMPLES Request a page through a different hostname: .Bd -literal -offset indent -compact geminawk -h localhost gemini.example .Ed .Pp Request an absolute path: .Bd -literal -offset indent -compact geminawk -Rh gemini.example /path/to/resource .Ed .Pp Make a request using .Xr torsocks 1 : .Bd -literal -offset indent -compact NC='torsocks nc' geminawk address.onion .Ed .Sh CAVEATS By default, this only works with the OpenBSD, or LibreSSL, .Xr nc 1 . If a compatible version is not found, .Nm defaults to using .Cm s_client from .Xr openssl 1 . .Pp To use a different program for the TLS connection set the .Ev NC and .Ev NCFLAGS environment variables, or edit the script itself.