1 7b682af0 2021-11-21 op # lstun -- lazy ssh tunnel
3 7b682af0 2021-11-21 op lstun is a simple utility to lazily (on demand) spawn a ssh tunnel to
4 814d74c9 2022-07-30 op a remote machine and optionally kill it after some time of inactivity.
6 4f96af19 2022-07-30 op The only dependency is libevent and openssh.
8 7b682af0 2021-11-21 op To compile it just run
12 814d74c9 2022-07-30 op # make install # eventually
14 814d74c9 2022-07-30 op The build can be customized by passing arguments to the configure
15 814d74c9 2022-07-30 op script or by using a `configure.local` file; see `./configure -h` and
16 814d74c9 2022-07-30 op [`configure.local.example`](configure.local.example) for more
19 814d74c9 2022-07-30 op The `configure` script can use pkg-config if available to find the
20 814d74c9 2022-07-30 op flags for libevent. To disable the usage of it, pass
21 814d74c9 2022-07-30 op `PKG_CONFIG=false` to the configure script.
23 814d74c9 2022-07-30 op For Linux users with libbsd installed, the configure script can be
24 814d74c9 2022-07-30 op instructed to use libbsd instead of the bundled compats as follows:
26 814d74c9 2022-07-30 op CFLAGS="$(pkg-config --cflags libbsd-overlay)" \
27 814d74c9 2022-07-30 op ./configure LDFLAGS="$(pkg-config --libs libbsd-overlay)"
33 355ad914 2021-12-01 op usage: lstun [-dv] -B sshaddr -b addr [-t timeout] destination
36 814d74c9 2022-07-30 op Check out the [manpage](lstun.1) for the usage.
39 355ad914 2021-12-01 op ### Motivation
41 355ad914 2021-12-01 op It was written to forward lazily all the traffic on the local port
42 355ad914 2021-12-01 op 2525 to a remote port 25, thus using ssh as some sort of
43 355ad914 2021-12-01 op authentication.
45 355ad914 2021-12-01 op The need for the "lazy" opening and closing of the tunnel is to avoid
46 355ad914 2021-12-01 op wasting resources when not needed.