Blob


1 .\" Copyright (c) 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 .\"
15 .Dd February 9, 2022
16 .Dt KAMIPROXY 1
17 .Os
18 .Sh NAME
19 .Nm kamiproxy
20 .Nd 9p over tls proxy
21 .Sh SYNOPSIS
22 .Nm
23 .Op Fl dv
24 .Fl c Ar host Ns Oo : Ns Ar port Oc
25 .Fl l Oo Ar host : Oc Ns port
26 .Fl C Ar cert
27 .Op Fl K Ar key
28 .Sh DESCRIPTION
29 .Nm
30 is a proxy for 9p over tls.
31 It listen on a local port for plaintext 9p connections and forwards
32 them to a real server using a TLS-encrypted tunnel and a client
33 certificate.
34 .Pp
35 The options are as follows:
36 .Bl -tag -width Ds
37 .It Fl C Ar cert
38 Path to the client certificate to use.
39 .It Fl c Ar host Ns Oo : Ns Ar port Oc
40 Connect to the remote server identified by the given
41 .Ar host
42 name on the specified
43 .Ar port
44 .Pq 1337 by default.
45 .It Fl d
46 Do not daemonize.
47 If this option is specified,
48 .Nm
49 will run in the foreground and log to standard error.
50 .It Fl K Ar key
51 Path to the key of the client certificate.
52 If not provided, it's assumed to be the same as the
53 .Fl C
54 flag.
55 .It Fl l Oo Ar host : Oc Ns port
56 Listen on the specified address.
57 The
58 .Ar host
59 by default is
60 .Dq localhost .
61 .It Fl v
62 Produce more verbose output.
63 .El
64 .Sh SEE ALSO
65 .Xr 9p 7 ,
66 .Xr kamid 8
67 .Sh AUTHORS
68 .An -nosplit
69 The
70 .Nm
71 program was written by
72 .An Omar Polo Aq Mt op@omarpolo.com .
73 .Sh CAVEATS
74 .Nm
75 opens one TLS-encrypted connection for each incoming connection.
76 A better approach would be to multiplex the traffic to the remote
77 server, akin to what the plan9 kernel does by default.