summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:54:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:54:31 +0000
commitdb1cb443e03f2b1e5176fa07b28b7f2cb547c0e5 (patch)
tree3ba77a067ab4f86e889cd259b8a7338910cbb782
parentAdding upstream version 1.7.4. (diff)
downloadttyd-db1cb443e03f2b1e5176fa07b28b7f2cb547c0e5.tar.xz
ttyd-db1cb443e03f2b1e5176fa07b28b7f2cb547c0e5.zip
Adding debian version 1.7.4-1.debian/1.7.4-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/TODO8
-rw-r--r--debian/changelog115
-rw-r--r--debian/control27
-rw-r--r--debian/copyright56
-rw-r--r--debian/examples/apache2-authbasic-file.conf10
-rw-r--r--debian/examples/apache2-authbasic-ip.conf8
-rw-r--r--debian/examples/apache2-authbasic-ldap-group.conf16
-rw-r--r--debian/examples/apache2-authbasic-ldap-user.conf16
-rw-r--r--debian/local/apache2/ttyd.conf18
-rw-r--r--debian/local/default/ttyd3
-rwxr-xr-xdebian/rules7
-rw-r--r--debian/source/format1
-rw-r--r--debian/ttyd.README.Debian62
-rw-r--r--debian/ttyd.examples1
-rw-r--r--debian/ttyd.install2
-rw-r--r--debian/ttyd.service17
-rw-r--r--debian/watch3
17 files changed, 370 insertions, 0 deletions
diff --git a/debian/TODO b/debian/TODO
new file mode 100644
index 0000000..db0584a
--- /dev/null
+++ b/debian/TODO
@@ -0,0 +1,8 @@
+ttyd
+====
+
+ * write logs to own logfile
+ * add debconf and update-alternative handling to do
+ apache configuration (enable modules, create config, create htpasswd, etc.)
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Mon, 08 Feb 2021 14:20:24 +0100
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..d1d768a
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,115 @@
+ttyd (1.7.4-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 1.7.4.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Wed, 04 Oct 2023 14:22:48 +0200
+
+ttyd (1.7.3-2) sid; urgency=medium
+
+ * Uploading to sid.
+ * Adding manual depends to libwebsockets-evlib-uv (Closes: #1022217).
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Wed, 01 Feb 2023 20:52:44 +0100
+
+ttyd (1.7.3-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 1.7.3.
+ * Updating to standards version 4.6.2.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Mon, 23 Jan 2023 09:45:13 +0100
+
+ttyd (1.7.2-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 1.7.2.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Fri, 21 Oct 2022 11:25:05 +0200
+
+ttyd (1.7.1-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 1.7.1.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Fri, 02 Sep 2022 10:36:10 +0200
+
+ttyd (1.7.0-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 1.7.0.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Mon, 15 Aug 2022 14:08:23 +0200
+
+ttyd (1.6.3+20220719-4) sid; urgency=medium
+
+ * Uploading to sid.
+ * Correcting port typo in apache2 config.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Thu, 21 Jul 2022 16:37:32 +0200
+
+ttyd (1.6.3+20220719-3) sid; urgency=medium
+
+ * Uploading to sid.
+ * Correcting typo of ProxyPassReverse directive name in apache2 config.
+ * Using 127.0.0.1 instead of localhost in apache2 config to work on
+ ipv6-only systems too.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Thu, 21 Jul 2022 07:14:33 +0200
+
+ttyd (1.6.3+20220719-2) sid; urgency=medium
+
+ * Uploading to sid.
+ * Removing superfluous slashes in apache2 config for convenience
+ reasons.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Wed, 20 Jul 2022 08:08:53 +0200
+
+ttyd (1.6.3+20220719-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 1.6.3+20220719.
+ * Updating copyright for new upstream.
+ * Updating to standards version 4.6.1.
+ * Adding apache2 reverse-proxy configuration.
+ * Adding TODO file.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Tue, 19 Jul 2022 12:34:47 +0200
+
+ttyd (1.6.3+20210924-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 1.6.3+20210924.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sat, 09 Oct 2021 12:24:08 +0200
+
+ttyd (1.6.3-4) sid; urgency=medium
+
+ * Uploading to sid.
+ * Updating to standards version 4.6.0.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sat, 09 Oct 2021 11:02:22 +0200
+
+ttyd (1.6.3-3) sid; urgency=medium
+
+ * Uploading to sid.
+ * Adding /etc/default/ttyd to handle options used to start ttyd via systemd
+ unit.
+ * Restricting package to linux architectures.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Fri, 26 Feb 2021 09:38:56 +0100
+
+ttyd (1.6.3-2) sid; urgency=medium
+
+ * Uploading to sid.
+ * Adding README.Debian.
+ * Correcting path to executables in system service,
+ thanks to Jonas Smedegaard <dr@jones.dk> (Closes: #983261).
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Mon, 22 Feb 2021 06:50:22 +0100
+
+ttyd (1.6.3-1) sid; urgency=medium
+
+ * Initial upload to sid (Closes: #972863).
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Mon, 08 Feb 2021 14:18:19 +0100
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..387a60d
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,27 @@
+Source: ttyd
+Section: web
+Priority: optional
+Maintainer: Daniel Baumann <daniel.baumann@progress-linux.org>
+Build-Depends:
+ cmake,
+ debhelper-compat (= 13),
+ libjson-c-dev,
+ libwebsockets-dev,
+ zlib1g-dev,
+Rules-Requires-Root: no
+Standards-Version: 4.6.2
+Homepage: https://tsl0922.github.io/ttyd
+Vcs-Browser: https://git.progress-linux.org/users/daniel.baumann/debian/packages/ttyd
+Vcs-Git: https://git.progress-linux.org/users/daniel.baumann/debian/packages/ttyd
+
+Package: ttyd
+Section: web
+Architecture: linux-any
+Depends:
+ libwebsockets-evlib-uv,
+ ${misc:Depends},
+ ${shlibs:Depends},
+Suggests:
+ apache2,
+Description: Share your terminal over the web
+ ttyd is a command-line tool for sharing a terminal over the web.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..df13f3f
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,56 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: ttyd
+Upstream-Contact: Shuanglei Tao <tsl0922@gmail.com>
+Source: https://github.com/tsl0922/ttyd/releases
+
+Files: *
+Copyright: 2016-2022 Shuanglei Tao <tsl0922@gmail.com>
+License: MIT
+
+Files: debian/*
+Copyright: 2021-2022 Daniel Baumann <daniel.baumann@progress-linux.org>
+License: MIT
+
+License: BSD-3
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
diff --git a/debian/examples/apache2-authbasic-file.conf b/debian/examples/apache2-authbasic-file.conf
new file mode 100644
index 0000000..5f28cb9
--- /dev/null
+++ b/debian/examples/apache2-authbasic-file.conf
@@ -0,0 +1,10 @@
+# /etc/ttyd/apache2-auth.conf
+
+<IfFile /etc/ttyd/htpasswd>
+ AuthName "ttyd"
+ AuthBasicProvider file
+ AuthType basic
+
+ AuthUserFile /etc/ttyd/htpasswd
+ Require valid-user
+</IfFile>
diff --git a/debian/examples/apache2-authbasic-ip.conf b/debian/examples/apache2-authbasic-ip.conf
new file mode 100644
index 0000000..8507a20
--- /dev/null
+++ b/debian/examples/apache2-authbasic-ip.conf
@@ -0,0 +1,8 @@
+# /etc/ttyd/apache2-auth.conf
+
+Order deny,allow
+Deny from all
+
+Allow from 10.0.0.0/8
+Allow from 172.16.0.0/12
+Allow from 192.168.0.0/16
diff --git a/debian/examples/apache2-authbasic-ldap-group.conf b/debian/examples/apache2-authbasic-ldap-group.conf
new file mode 100644
index 0000000..5827794
--- /dev/null
+++ b/debian/examples/apache2-authbasic-ldap-group.conf
@@ -0,0 +1,16 @@
+# /etc/ttyd/apache2-auth.conf
+
+AuthName "ttyd"
+AuthBasicProvider ldap
+AuthType basic
+
+AuthLDAPURL "ldaps://ldap.example.net:636/dc=example,dc=net?uid?sub"
+AuthLDAPBindDN cn=read-only,ou=srv-account,dc=example,dc=net
+AuthLDAPBindPassword "examplePassword"
+
+AuthLDAPRemoteUserAttribute uid
+AuthLDAPRemoteUserIsDN off
+AuthLDAPGroupAttribute memberUid
+AuthLDAPGroupAttributeIsDN off
+
+Require ldap-group cn=foo,ou=security,ou=groups,dc=example,dc=net
diff --git a/debian/examples/apache2-authbasic-ldap-user.conf b/debian/examples/apache2-authbasic-ldap-user.conf
new file mode 100644
index 0000000..5af7327
--- /dev/null
+++ b/debian/examples/apache2-authbasic-ldap-user.conf
@@ -0,0 +1,16 @@
+# /etc/ttyd/apache2-auth.conf
+
+AuthName "ttyd"
+AuthBasicProvider ldap
+AuthType basic
+
+AuthLDAPURL "ldaps://ldap.example.net:636/dc=example,dc=net?uid?sub"
+AuthLDAPBindDN cn=read-only,ou=srv-account,dc=example,dc=net
+AuthLDAPBindPassword "examplePassword"
+
+AuthLDAPRemoteUserAttribute uid
+AuthLDAPRemoteUserIsDN off
+AuthLDAPGroupAttribute memberUid
+AuthLDAPGroupAttributeIsDN off
+
+Require ldap-user foo bar baz
diff --git a/debian/local/apache2/ttyd.conf b/debian/local/apache2/ttyd.conf
new file mode 100644
index 0000000..9dcd79d
--- /dev/null
+++ b/debian/local/apache2/ttyd.conf
@@ -0,0 +1,18 @@
+# /etc/apache2/conf-available/ttyd.conf
+
+<IfModule mod_proxy.c>
+ ProxyRequests Off
+ ProxyPreserveHost On
+
+ ProxyPass /ttyd/ws ws://127.0.0.1:7681/ws
+ ProxyPassReverse /ttyd/ws ws://127.0.0.1:7681/ws
+
+ ProxyPass /ttyd http://127.0.0.1:7681 keepalive=on
+ ProxyPassReverse /ttyd http://127.0.0.1:7681
+
+ <IfFile /etc/ttyd/apache2-auth.conf>
+ <Location /ttyd>
+ Include /etc/ttyd/apache2-auth.conf
+ </Location>
+ </IfFile>
+</IfModule>
diff --git a/debian/local/default/ttyd b/debian/local/default/ttyd
new file mode 100644
index 0000000..526f877
--- /dev/null
+++ b/debian/local/default/ttyd
@@ -0,0 +1,3 @@
+# /etc/default/ttyd
+
+TTYD_OPTIONS="-i lo -p 7681 -O login"
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..453d005
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+%:
+ dh ${@} --builddirectory=build
+
+override_dh_auto_build:
+ mkdir -p build && cd build && cmake .. && make
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/ttyd.README.Debian b/debian/ttyd.README.Debian
new file mode 100644
index 0000000..25281ca
--- /dev/null
+++ b/debian/ttyd.README.Debian
@@ -0,0 +1,62 @@
+ttyd for Debian
+===============
+
+1. Default configuration
+------------------------
+
+After installing ttyd it will by default listen on http://localhost:7681
+in multi-user read-write "login"-mode:
+
+ * multi-user means that more than one user can connect at the same time.
+
+ * read-write means that anyone connecting to the website can input data.
+
+ * Login mode means that the user gets a login prompt (like getty) where
+ user and password has to be entered.
+
+Edit /etc/default/ttyd and check the ttyd(1) manpage for more information
+about available options.
+
+
+2. Reverse proxy
+----------------
+
+To make ttyd accessible on the network, it is advised to hide it behind a
+reverse proxy that does TLS and performs user authentication.
+
+To enable the apache2 proxy configuration, the following modules and
+configuration need to be enabled:
+
+ * sudo a2enmod proxy proxy_http proxy_http2 proxy_wstunnel
+
+ * sudo a2enconf ttyd
+
+ * sudo service apache2 reload
+
+ttyd is then accessible as <http://example.org/ttyd>.
+
+
+3. Apache authentication
+------------------------
+
+The apache reverse-proxy configuration automatically includes
+/etc/ttyd/apache2-auth.conf, if existing, to protect access to '/ttyd'.
+
+There are some examples in /usr/share/doc/ttyd/examples that can be
+used as starting point.
+
+To enable HTTP basic authentication, the following steps can be used:
+
+ * sudo mkdir -p /etc/ttyd
+
+ * sudo ln -s /usr/share/doc/ttyd/examples/apache2-authbasic-file.conf \
+ /etc/ttyd/apache2-auth.conf
+
+ * sudo htpasswd -c -b /etc/ttyd/htpasswd daniel password123
+
+ * sudo service apache2 reload
+
+This will allow the user 'daniel' to access ttyd with the password
+'password123'. Further users can be added, see htpasswd(1).
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 21 Feb 2021 17:19:20 +0100
diff --git a/debian/ttyd.examples b/debian/ttyd.examples
new file mode 100644
index 0000000..55b78ae
--- /dev/null
+++ b/debian/ttyd.examples
@@ -0,0 +1 @@
+debian/examples/*
diff --git a/debian/ttyd.install b/debian/ttyd.install
new file mode 100644
index 0000000..3182f36
--- /dev/null
+++ b/debian/ttyd.install
@@ -0,0 +1,2 @@
+debian/local/apache2/* /etc/apache2/conf-available
+debian/local/default/* /etc/default
diff --git a/debian/ttyd.service b/debian/ttyd.service
new file mode 100644
index 0000000..25956c7
--- /dev/null
+++ b/debian/ttyd.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=ttyd daemon
+Documentation=man:ttyd(1)
+After=network.target systemd-tmpfiles-clean.service
+
+[Service]
+Type=simple
+EnvironmentFile=/etc/default/ttyd
+ExecStart=/usr/bin/ttyd $TTYD_OPTIONS
+ExecReload=/usr/bin/kill -HUP $MAINPID
+KillMode=process
+LimitNOFILE=512
+LimitMEMLOCK=infinity
+LimitSTACK=infinity
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..904a16d
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=4
+opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/ttyd-$1\.tar\.gz/ \
+https://github.com/tsl0922/ttyd/releases .*/v?(\d\S+)\.tar\.gz