summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-apps/ttyd')
-rw-r--r--www-apps/ttyd/Manifest1
-rw-r--r--www-apps/ttyd/files/ttyd.confd17
-rw-r--r--www-apps/ttyd/files/ttyd.service2
-rw-r--r--www-apps/ttyd/ttyd-1.7.4.ebuild40
4 files changed, 54 insertions, 6 deletions
diff --git a/www-apps/ttyd/Manifest b/www-apps/ttyd/Manifest
index 4039ce4e90bd..883fcd4ae400 100644
--- a/www-apps/ttyd/Manifest
+++ b/www-apps/ttyd/Manifest
@@ -1 +1,2 @@
DIST ttyd-1.7.3.tar.gz 579492 BLAKE2B 14b66dbe83c0ccb601a6e3bf35a804f69f679387c9aca2f55a055dda85b2e3a396ddb4f9a3fb56575d0554837faf1d5c090cf66f4e7571201323659db3feb0b7 SHA512 e0900e2b4620095717d0f32206d08177ce74bc2f24cd9c20793cc2e370a8ee961272b73698b0dda857360703df20378c080293dfdfd287ae863801d338c8b2a4
+DIST ttyd-1.7.4.tar.gz 603483 BLAKE2B 745ad302fdf17f31d941d3ae4b69b70257f87f3b6d624f3678e83269901577370fc6296726d8b2c61e94469f9970257b1192bcc2299fb0855bd0f3ea5960a498 SHA512 bbaa56389c224db9438b6dcce696deb0eeedfdf9b3a68cbc4c01c155340f71558e1d90c3fabe9a52de180728792b8dc7deed0c3512acdc246d651270d7fb82c6
diff --git a/www-apps/ttyd/files/ttyd.confd b/www-apps/ttyd/files/ttyd.confd
index 57d24e3fb394..8e614522b436 100644
--- a/www-apps/ttyd/files/ttyd.confd
+++ b/www-apps/ttyd/files/ttyd.confd
@@ -5,12 +5,15 @@
# Some of the meaningful options are:
# -p, --port Port to listen (default: 7681, use `0` for random port)
# -i, --interface Network interface to bind (eg: eth0), or UNIX domain socket path (eg: /var/run/ttyd.sock)
-# -c, --credential Credential for Basic Authentication (format: username:password)
+# -U, --socket-owner User owner of the UNIX domain socket file, when enabled (eg: user:group)
+# -c, --credential Credential for basic authentication (format: username:password)
+# -H, --auth-header HTTP Header name for auth proxy, this will configure ttyd to let a HTTP reverse proxy handle authentication
# -u, --uid User id to run with
# -g, --gid Group id to run with
# -s, --signal Signal to send to the command when exit it (default: 1, SIGHUP)
-# -r, --reconnect Time to reconnect for the client in seconds (default: 10)
-# -R, --readonly Do not allow clients to write to the TTY
+# -w, --cwd Working directory to be set for the child program
+# -a, --url-arg Allow client to send command line arguments in URL (eg: http://localhost:7681?arg=foo&arg=bar)
+# -W, --writable Allow clients to write to the TTY (readonly by default)
# -t, --client-option Send option to client (format: key=value), repeat to add more options
# -T, --terminal-type Terminal type to report, default: xterm-256color
# -O, --check-origin Do not allow websocket connection from different origin
@@ -18,12 +21,16 @@
# -o, --once Accept only one client and exit on disconnection
# -B, --browser Open terminal with the default system browser
# -I, --index Custom index.html path
+# -b, --base-path Expected base path for requests coming from a reverse proxy (eg: /mounted/here, max length: 128)
+# -P, --ping-interval Websocket ping interval(sec) (default: 5)
# -6, --ipv6 Enable IPv6 support
# -S, --ssl Enable SSL
# -C, --ssl-cert SSL certificate file path
# -K, --ssl-key SSL key file path
# -A, --ssl-ca SSL CA file path for client certificate verification
# -d, --debug Set log level (default: 7)
-# login --- Login with system accounts
+# -v, --version Print the version and exit
+# -h, --help Print this text and exit
-TTYD_OPTS="login"
+
+TTYD_OPTS="-W login"
diff --git a/www-apps/ttyd/files/ttyd.service b/www-apps/ttyd/files/ttyd.service
index caa95ab1a910..d1d7e92461a4 100644
--- a/www-apps/ttyd/files/ttyd.service
+++ b/www-apps/ttyd/files/ttyd.service
@@ -3,7 +3,7 @@ Description=Terminal over HTTP
[Service]
User=root
-ExecStart=/usr/bin/ttyd -p 9000 login
+ExecStart=/usr/bin/ttyd -W -p 9000 login
Restart=on-abort
[Install]
diff --git a/www-apps/ttyd/ttyd-1.7.4.ebuild b/www-apps/ttyd/ttyd-1.7.4.ebuild
new file mode 100644
index 000000000000..adbcac55b7f7
--- /dev/null
+++ b/www-apps/ttyd/ttyd-1.7.4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake systemd
+
+MY_PV="$(ver_rs 3 '-')"
+
+DESCRIPTION="ttyd, a simple command-line tool for sharing terminal over the web"
+HOMEPAGE="https://github.com/tsl0922/ttyd"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/tsl0922/ttyd.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/tsl0922/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+
+DEPEND="
+ dev-libs/json-c:=
+ dev-libs/libuv:=
+ net-libs/libwebsockets:=[libuv,ssl]
+ sys-libs/zlib:=
+"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_install() {
+ dobin ../${P}_build/${PN}
+ doman man/*.1
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}