]> git.proxmox.com Git - pve-xtermjs.git/log
pve-xtermjs.git
3 months agotermproxy: fix the command line help text
Dietmar Maurer [Wed, 24 Jul 2024 11:32:47 +0000 (13:32 +0200)]
termproxy: fix the command line help text

The <listen-port> need to be the first argument.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
5 months agomove .cargo/config to .cargo/config.toml
Fabian Grünbichler [Thu, 20 Jun 2024 10:38:14 +0000 (12:38 +0200)]
move .cargo/config to .cargo/config.toml

the old location has been deprecated for a while, and rustc 1.78 will start to warn about it.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 months agobuild: force debug symbols in release build
Fabian Grünbichler [Thu, 20 Jun 2024 08:03:25 +0000 (10:03 +0200)]
build: force debug symbols in release build

they then get stripped into their own package anyway, but without this we don't
get debug symbols at all with rustc >= 1.77

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
11 months agod/control: fix build-dependencies
Fabian Grünbichler [Thu, 14 Dec 2023 08:30:43 +0000 (09:30 +0100)]
d/control: fix build-dependencies

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
11 months agoxtermjs: bump version to 5.3.0-3
Thomas Lamprecht [Mon, 11 Dec 2023 12:37:18 +0000 (13:37 +0100)]
xtermjs: bump version to 5.3.0-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agofix #5063: load WebGL addon in try block
Dominik Csapak [Mon, 11 Dec 2023 10:19:56 +0000 (11:19 +0100)]
fix #5063: load WebGL addon in try block

since under certain circumstances (e.g. using safari < 16) the addon
constructor already throws an exception, not only the loading later.

To allow falling back to the canvas renderer, move it into the try
block after WebGL detection.

This should fix the xterm.js console on Apple's iOS.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
12 months agotermproxy: bump version to 1.0.1
Thomas Lamprecht [Thu, 26 Oct 2023 15:29:52 +0000 (17:29 +0200)]
termproxy: bump version to 1.0.1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 months agoxtermjs: bump version to 5.3.0-2
Thomas Lamprecht [Wed, 25 Oct 2023 16:49:06 +0000 (18:49 +0200)]
xtermjs: bump version to 5.3.0-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 months agoxtermjs: update lintian-overrides for split and webgl
Thomas Lamprecht [Wed, 25 Oct 2023 16:51:18 +0000 (18:51 +0200)]
xtermjs: update lintian-overrides for split and webgl

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 months agoxtermjs: try to detect hardware support for webgl2
Dominik Csapak [Wed, 25 Oct 2023 09:08:59 +0000 (11:08 +0200)]
xtermjs: try to detect hardware support for webgl2

With the new WebGL renderer, chrome/chromium has buggy software
support for emulating this (see [0]), so we have to detect that
manually and prevent loading the add-on. This fixes the issue that on
chrome without HW-support, it would not always render every character.

Firefox does not have support for a software renderer and the
loading/detection throws an exception, falling back to the default
renderer.

0: https://github.com/xtermjs/xterm.js/issues/4574

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 months agotermproxy: avoid expensive proxmox-sys crate, copy over PTY module
Thomas Lamprecht [Mon, 23 Oct 2023 08:27:19 +0000 (10:27 +0200)]
termproxy: avoid expensive proxmox-sys crate, copy over PTY module

This is only used here anyway, and proxmox-sys is one of those monster
crates still awaiting to be split up in more sensible pieces.

This halves (non-release) build times here from 8.5 to 4.1 seconds.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 months agotermproxy: cargo: sort dependencies
Thomas Lamprecht [Mon, 23 Oct 2023 08:19:45 +0000 (10:19 +0200)]
termproxy: cargo: sort dependencies

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 months agotermproxy: split out CLI stuff to own module
Thomas Lamprecht [Mon, 23 Oct 2023 08:12:12 +0000 (10:12 +0200)]
termproxy: split out CLI stuff to own module

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agotermproxy: code/formatter cleanups
Thomas Lamprecht [Fri, 20 Oct 2023 04:16:58 +0000 (06:16 +0200)]
termproxy: code/formatter cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agotermproxy: switch from clap to pico-args for CLI argument handling
Thomas Lamprecht [Fri, 20 Oct 2023 04:08:47 +0000 (06:08 +0200)]
termproxy: switch from clap to pico-args for CLI argument handling

Not that clap is bad or anything the like, but for one it's rather
over engineered, and it has to be as long as it wants to provide a
dozen wildly different way to do things.
And the second, more important reason: it's still undergoing a lot of
churn every year or so.  Each upgrade to a major version needs like
two hours of understanding what's going on, at least if one wants to
Do It Right™.

Termproxy, otoh., is a small and internal tool that doesn't need an
overly fancy CLI targetting humans, as it will be only called by the
API anyway.

So, to reduce the time required to constantly catch up, and remove
some complexity, switch over to pico-args. That one provides a few
small interfaces for the most common things, does it right and uses
OsString as main type and has exactly zero dependencies on its own.
In other words, perfect for such internal tools (and possibly also
most others).

Copy over the help output from the clap based tool for convenience,
pico-args really doesn't bother with such things, and introduce an
Options struct to have a, well, more structured way of handling CLI
arguments/options.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agotermproxy: fix port/fd range check
Thomas Lamprecht [Tue, 17 Oct 2023 12:57:03 +0000 (14:57 +0200)]
termproxy: fix port/fd range check

The valid upper range was swapped, while at it switch from i32::Max to
RawFd::Max, while currently RawFd is a type alias to i32, it's easier
to grasp what's going on and might even change in the future.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agotermproxy: bump version to 1.0.0
Thomas Lamprecht [Mon, 16 Oct 2023 15:06:35 +0000 (17:06 +0200)]
termproxy: bump version to 1.0.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agotermproxy: d/rules: drop bogus dh_build/install overrides for LIBEXECDIR
Thomas Lamprecht [Tue, 17 Oct 2023 08:49:23 +0000 (10:49 +0200)]
termproxy: d/rules: drop bogus dh_build/install overrides for LIBEXECDIR

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agotermproxy: install to usr/libexec directory
Thomas Lamprecht [Tue, 17 Oct 2023 08:02:17 +0000 (10:02 +0200)]
termproxy: install to usr/libexec directory

this is not a standard CLI tool that should be exposed to all users,
but an internal binary, so  move it to /usr/libexec/proxmox.
That location was chosen over a multiarch path
/usr/lib/<triplet>/proxmox to make resolving the path easier for the
caller, as the standard ways to get the multiarch triplet (e.g.,
"x86_64-linux-gnu") involve CC and are not easily/cheaply available in
perl – we would basically create an architecture specific package that
provides a path resolution with multiarch triplet resolved at "build"
time of that module; as we probably do not ever install termproxy
multiple times targeting different arch's on the same system, this is
just to much complexity.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agoxterm.js: bump version to 5.3.0-1
Thomas Lamprecht [Mon, 16 Oct 2023 14:19:41 +0000 (16:19 +0200)]
xterm.js: bump version to 5.3.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agoxtermjs: hard-depent on proxmox-termproxy for now
Thomas Lamprecht [Mon, 16 Oct 2023 08:44:06 +0000 (10:44 +0200)]
xtermjs: hard-depent on proxmox-termproxy for now

Avoids that we need to bump all frontends with updated dependencies
and then add them to the proxmox-termproxy's Breaks info.

We can loosen this dependency on the next major release, or when all
users switch to the respective ones (with a versioned Break!).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agotermproxy: enable full LTO
Thomas Lamprecht [Wed, 4 Oct 2023 15:26:56 +0000 (17:26 +0200)]
termproxy: enable full LTO

shaves of over 100KB of the final binary and this crate is small
enough to not notice a relevant compile time impact.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agosplit upstream and our native into different source packages
Thomas Lamprecht [Wed, 4 Oct 2023 12:57:46 +0000 (14:57 +0200)]
split upstream and our native into different source packages

We should have never added a upstream repackage and some custom tools
in the same source package, let alone binary package. Finally resolve
that tech debt and do a split.

This commit does a bit more than I'd like at once, but it's really not
trivial to make a clean split while keeping all sanely buildable in
multiple commits.

What roughly happens is:
- two complete separate source packages
  - one for xterm.js, we keep this purely to the xterm.js and our
    local additions and modifications that are relevant directly to
    xterm.js itself
  - one for termproxy, where only the rust-based tool is shipped.
    This also reduces churn, as the termproxy doesn't sees lots of
    updates, so no point in building it on every xterm.js update.
  - drop debcargo, which while great for library source code packages
    for build dependencies, is just a PITA for binary packages
    shipping actual compiled rust code, it adds almost nothing there
    but provides lots of special handling to get the correct result.
  - rename `termproxy` to `proxmox-termproxy` but keep a backward
    compat link for now, termproxy is way to general a name.
    Maybe we should also move this away from /bin in general, into the
    /lib/<arch-qualifier>/proxmox/ directory like we do for
    proxmox-backup.
  - clean ups all over the place

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agotermproxy: update clap crate to major version 4
Thomas Lamprecht [Wed, 4 Oct 2023 13:38:36 +0000 (15:38 +0200)]
termproxy: update clap crate to major version 4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agoreadme: update and reword slightly
Thomas Lamprecht [Fri, 29 Sep 2023 08:07:17 +0000 (10:07 +0200)]
readme: update and reword slightly

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agodownload and use xterm-addon-webgl as renderer
Dominik Csapak [Tue, 26 Sep 2023 06:34:39 +0000 (08:34 +0200)]
download and use xterm-addon-webgl as renderer

since xterm.js 5.0.0, the previous default canvas renderer is not
built-in anymore and only recommended as a fallback. The new recommended
renderer is this webgl one, so use it with a fallback to the default
built-in dom renderer (which is slower, but still functional).

to use it we have to load the addon after `terminal.open` so move the
`open` call to before the addon loading. While we're touching that line,
remove the superfluous second 'true' parameter that did not do anything.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 months agoupgrade to xterm.js 5.3.0
Dominik Csapak [Tue, 26 Sep 2023 06:33:26 +0000 (08:33 +0200)]
upgrade to xterm.js 5.3.0

and update xterm-addon-fit to a compatible version (0.8.0)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 months agoui: fix typo in error handler
Dominik Csapak [Tue, 26 Sep 2023 06:30:57 +0000 (08:30 +0200)]
ui: fix typo in error handler

s/even/event/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
18 months agoextend .gitignore
Thomas Lamprecht [Tue, 23 May 2023 12:13:00 +0000 (14:13 +0200)]
extend .gitignore

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agod/source: set format to 3.0 (quilt)
Thomas Lamprecht [Tue, 23 May 2023 12:11:18 +0000 (14:11 +0200)]
d/source: set format to 3.0 (quilt)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agobump version to 4.16.0-3
Thomas Lamprecht [Tue, 23 May 2023 11:55:33 +0000 (13:55 +0200)]
bump version to 4.16.0-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agoupdate proxmox-sys to 0.5
Thomas Lamprecht [Tue, 23 May 2023 11:56:23 +0000 (13:56 +0200)]
update proxmox-sys to 0.5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agod/control: define compat level via build-depends and raise to 13
Thomas Lamprecht [Tue, 23 May 2023 11:24:06 +0000 (13:24 +0200)]
d/control: define compat level via build-depends and raise to 13

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agobuildsys: derive upload dist automatically
Thomas Lamprecht [Tue, 23 May 2023 12:02:15 +0000 (14:02 +0200)]
buildsys: derive upload dist automatically

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agobuildsys: fix source tarball generation and add sbuild target
Thomas Lamprecht [Tue, 23 May 2023 11:48:18 +0000 (13:48 +0200)]
buildsys: fix source tarball generation and add sbuild target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agobuildsys: avoid debcargo and dh-cargo on build
Thomas Lamprecht [Tue, 23 May 2023 11:44:33 +0000 (13:44 +0200)]
buildsys: avoid debcargo and dh-cargo on build

debcargo package requires all dependencies to be installed, even if
we basically just use it for d/control generation, which makes it a
bad choice for build dir generation here (i.e., with a native
package) as the DSC should be buildable without requiring all build
dependencies.

Add a target to update d/control manually (not much tested) and move
the build away from dh-cargo

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agobuildsys: do not skip pre-cleaning source
Thomas Lamprecht [Tue, 23 May 2023 11:43:14 +0000 (13:43 +0200)]
buildsys: do not skip pre-cleaning source

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agobuildsys: smarter generation of xterm.js addon exclusion arguments
Thomas Lamprecht [Tue, 23 May 2023 11:21:14 +0000 (13:21 +0200)]
buildsys: smarter generation of xterm.js addon exclusion arguments

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agobuildsys: use full DEB_VERSION and correct DEB_HOST_ARCH
Thomas Lamprecht [Tue, 23 May 2023 11:19:24 +0000 (13:19 +0200)]
buildsys: use full DEB_VERSION and correct DEB_HOST_ARCH

and drop git and srcdir variable

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agomakefile: convert to use simple parenthesis
Thomas Lamprecht [Tue, 23 May 2023 11:16:30 +0000 (13:16 +0200)]
makefile: convert to use simple parenthesis

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agoupdate cargo metadata
Thomas Lamprecht [Tue, 23 May 2023 11:15:16 +0000 (13:15 +0200)]
update cargo metadata

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agoupdate lintian-overrides for debhelper 13+
Thomas Lamprecht [Tue, 23 May 2023 11:14:57 +0000 (13:14 +0200)]
update lintian-overrides for debhelper 13+

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agod/control: wrap and sort
Thomas Lamprecht [Tue, 23 May 2023 11:22:25 +0000 (13:22 +0200)]
d/control: wrap and sort

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agocheck in debian/control
Thomas Lamprecht [Mon, 22 May 2023 14:09:25 +0000 (16:09 +0200)]
check in debian/control

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agobump version to 4.16.0-2
Thomas Lamprecht [Mon, 22 May 2023 13:35:38 +0000 (15:35 +0200)]
bump version to 4.16.0-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
21 months agoupdate to clap 3 / proxmox-sys 0.4
Dominik Csapak [Mon, 23 Jan 2023 09:28:15 +0000 (10:28 +0100)]
update to clap 3 / proxmox-sys 0.4

only major difference was that clap now does not allow invalid utf8 by
default, but that's necessary for our 'cmd' parameter so add that

(also includes a rustfmt fixup)

Acked-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoupdate to proxmox-lang 1.1 / proxmox-sys 0.3.0
Fabian Grünbichler [Thu, 2 Jun 2022 11:44:31 +0000 (13:44 +0200)]
update to proxmox-lang 1.1 / proxmox-sys 0.3.0

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoCargo.toml: bump mio to 0.8
Fabian Grünbichler [Thu, 2 Jun 2022 08:03:36 +0000 (10:03 +0200)]
Cargo.toml: bump mio to 0.8

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agodetect not running guests and add start button
Dominik Csapak [Fri, 25 Feb 2022 14:10:18 +0000 (15:10 +0100)]
detect not running guests and add start button

akin to what we now have in novnc
css classes copied from novnc, so that we have the same look

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoswitch from curl to ureq
Thomas Lamprecht [Wed, 26 Jan 2022 17:58:29 +0000 (18:58 +0100)]
switch from curl to ureq

Not only less code, we lose a whopping 29 libraries on linkage cruft:

> --- ldd.before  2022-01-26 19:03:25.759426164 +0100
> +++ ldd.after   2022-01-26 19:03:31.919529632 +0100
> @@ -5,36 +5,7 @@ librt.so.1
>  libzstd.so.1
>  libc.so.6
>  /lib64/ld-linux-x86-64.so.2
> -libcurl-gnutls.so.4
>  libgcc_s.so.1
>  libpthread.so.0
>  libm.so.6
>  libdl.so.2
> -libnghttp2.so.14
> -libidn2.so.0
> -librtmp.so.1
> -libssh2.so.1
> -libpsl.so.5
> -libnettle.so.8
> -libgnutls.so.30
> -libgssapi_krb5.so.2
> -libldap_r-2.4.so.2
> -liblber-2.4.so.2
> -libbrotlidec.so.1
> -libz.so.1
> -libunistring.so.2
> -libhogweed.so.6
> -libgmp.so.10
> -libgcrypt.so.20
> -libp11-kit.so.0
> -libtasn1.so.6
> -libkrb5.so.3
> -libk5crypto.so.3
> -libcom_err.so.2
> -libkrb5support.so.0
> -libresolv.so.2
> -libsasl2.so.2
> -libbrotlicommon.so.1
> -libgpg-error.so.0
> -libffi.so.7
> -libkeyutils.so.1

IOW.: curl is really nice for a CLI tool and super powerful library,
but way to much overkill for simple HTTP requests (not even TLS) we
need here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agouse anyhow for result/error
Thomas Lamprecht [Wed, 26 Jan 2022 17:56:16 +0000 (18:56 +0100)]
use anyhow for result/error

it's in out dependency chain anyway through proxmox-sys or -time and
it makes life a bit easier. FWIW, I got slightly pressured into this
by the future switch from curl to ureq, as the latter brings their
own Error type.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agobuildsys: fix upload target and track debug package
Thomas Lamprecht [Tue, 25 Jan 2022 14:38:28 +0000 (15:38 +0100)]
buildsys: fix upload target and track debug package

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 4.16.0-1
Thomas Lamprecht [Tue, 25 Jan 2022 14:32:20 +0000 (15:32 +0100)]
bump version to 4.16.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoupgrade xterm.js to 4.16.0
Dominik Csapak [Tue, 25 Jan 2022 14:01:13 +0000 (15:01 +0100)]
upgrade xterm.js to 4.16.0

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoupgrade xterm.js from 4.12.0 to 4.15.0
Dominik Csapak [Thu, 16 Dec 2021 12:20:39 +0000 (13:20 +0100)]
upgrade xterm.js from 4.12.0 to 4.15.0

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoupdate rust dependencies
Dominik Csapak [Thu, 16 Dec 2021 12:18:38 +0000 (13:18 +0100)]
update rust dependencies

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agobump version to 4.12.0-1
Thomas Lamprecht [Fri, 14 May 2021 06:26:41 +0000 (08:26 +0200)]
bump version to 4.12.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodebian: update summary/description & fix homepage link
Thomas Lamprecht [Fri, 14 May 2021 12:49:30 +0000 (14:49 +0200)]
debian: update summary/description & fix homepage link

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodebcargo: commit automatic changes
Thomas Lamprecht [Fri, 14 May 2021 12:48:46 +0000 (14:48 +0200)]
debcargo: commit automatic changes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobuildsys: fix indentation of continued command
Thomas Lamprecht [Fri, 14 May 2021 12:48:11 +0000 (14:48 +0200)]
buildsys: fix indentation of continued command

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agodebcargo: workaround bug with package description/summary generation
Thomas Lamprecht [Fri, 14 May 2021 12:45:33 +0000 (14:45 +0200)]
debcargo: workaround bug with package description/summary generation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoupdate xterm.js to 4.12.0 and the fit-addon to 0.5.0
Thomas Lamprecht [Fri, 14 May 2021 06:09:55 +0000 (08:09 +0200)]
update xterm.js to 4.12.0 and the fit-addon to 0.5.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobuild: track d/control
Fabian Grünbichler [Tue, 2 Feb 2021 12:03:01 +0000 (13:03 +0100)]
build: track d/control

for easier build-dependency installation

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agorustfmt
Fabian Grünbichler [Tue, 2 Feb 2021 11:57:18 +0000 (12:57 +0100)]
rustfmt

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agostyle: use Interest | Interest instead of .add
Fabian Grünbichler [Tue, 2 Feb 2021 11:56:24 +0000 (12:56 +0100)]
style: use Interest | Interest instead of .add

BitOr is implemented via .add anyway, but this is more readable.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoaccept/auth: count timeout over whole loop
Fabian Grünbichler [Tue, 2 Feb 2021 11:53:09 +0000 (12:53 +0100)]
accept/auth: count timeout over whole loop

instead of just poll. the manual tracking of elapsed across loop
iterations is to avoid underflows - can be replaced with a
saturating_sub call once that becomes stable.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agotermproxy: rewrite read_ticket_line
Dominik Csapak [Mon, 1 Feb 2021 07:55:18 +0000 (08:55 +0100)]
termproxy: rewrite read_ticket_line

since we cannot accept a std TcpStream from a mio::net::TcpListener
anymore, we cannot use set_read_timeout here

instead implement the readloop as a mio poll loop similar
to listen_and_accept, otherwise termproxy will busy loop and
consume 100% of a single core during authentication

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoupdate to mio 0.7
Dominik Csapak [Mon, 1 Feb 2021 07:55:17 +0000 (08:55 +0100)]
update to mio 0.7

notable changes:
* all polls in mio are now edge triggered, so no need for PollOpt, etc.
* functionality of UnixReady is now in the mio::Event directly
  (UnixReady::is_hup -> event.is_read_closed())
* TcpListener::from_std() is not a result anymore
* EventedFd -> SourceFd
* mio::net::TcpListener cannot accept_std anymore, so convert
  everywhere to mio::net::TcpStream, drop set_read_timeout
  (this warrants another patch)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoCargo.toml: update mio to 0.7 and proxmox to 0.10
Dominik Csapak [Mon, 1 Feb 2021 07:55:16 +0000 (08:55 +0100)]
Cargo.toml: update mio to 0.7 and proxmox to 0.10

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agodebcargo: fix maintainer directive
Fabian Grünbichler [Mon, 1 Feb 2021 10:23:11 +0000 (11:23 +0100)]
debcargo: fix maintainer directive

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoupdate proxmox dependency to 0.8
Fabian Grünbichler [Wed, 2 Dec 2020 12:27:29 +0000 (13:27 +0100)]
update proxmox dependency to 0.8

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agobump version to 4.7.0-3
Thomas Lamprecht [Tue, 24 Nov 2020 13:53:15 +0000 (14:53 +0100)]
bump version to 4.7.0-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agofix #2980: do not prompt for leaving on reconnect/disconnect
Dominik Csapak [Mon, 23 Nov 2020 15:41:50 +0000 (16:41 +0100)]
fix #2980: do not prompt for leaving on reconnect/disconnect

this includes migration detection

basically we should only enable this when we are fully connected

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoavoid unnecessary use statement for std::io::Read
Thomas Lamprecht [Wed, 11 Nov 2020 15:00:25 +0000 (16:00 +0100)]
avoid unnecessary use statement for std::io::Read

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agocargo: update proxmox to 0.7
Thomas Lamprecht [Wed, 11 Nov 2020 14:53:08 +0000 (15:53 +0100)]
cargo: update proxmox to 0.7

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofix console window title for rust template
Aaron Lauterer [Wed, 11 Nov 2020 10:08:46 +0000 (11:08 +0100)]
fix console window title for rust template

The nodename was missing from the title because the variable name is
capitalized.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
4 years agobump version to 4.7.0-2
Thomas Lamprecht [Fri, 28 Aug 2020 11:51:48 +0000 (13:51 +0200)]
bump version to 4.7.0-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobump proxmox crate dependency to 0.3.4
Thomas Lamprecht [Fri, 28 Aug 2020 11:50:40 +0000 (13:50 +0200)]
bump proxmox crate dependency to 0.3.4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofix cmd-opt guard
Thomas Lamprecht [Fri, 28 Aug 2020 11:43:31 +0000 (13:43 +0200)]
fix cmd-opt guard

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobump version to 4.7.0-1
Thomas Lamprecht [Thu, 23 Jul 2020 10:23:50 +0000 (12:23 +0200)]
bump version to 4.7.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agod/copyright: update to upstream
Thomas Lamprecht [Thu, 23 Jul 2020 10:24:04 +0000 (12:24 +0200)]
d/copyright: update to upstream

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: prevent accidental closing of terminal window
Dominik Csapak [Tue, 21 Jul 2020 09:00:48 +0000 (11:00 +0200)]
ui: prevent accidental closing of terminal window

this prevents closing the window e.g. when pressing ctrl+w

most browsers have a function to block a website from doing that,
so users that do not want that, simply have to click that option

also, the message will (at least in chrome) not be displayed,
instead a fixed message will appear

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: improve error message handling
Dominik Csapak [Tue, 21 Jul 2020 09:00:47 +0000 (11:00 +0200)]
ui: improve error message handling

by splitting the msg and code, and only showing the existing parts
also actually read the msg/code from the event by giving it from
tryReconnect to stopTerminal

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoadd handlebars template
Dominik Csapak [Tue, 21 Jul 2020 09:00:46 +0000 (11:00 +0200)]
add handlebars template

for rust projects, we do not use Perl::Template, but handlebars,
so provide a separate template for that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agotermproxy: rewrite in rust
Dominik Csapak [Tue, 21 Jul 2020 09:00:45 +0000 (11:00 +0200)]
termproxy: rewrite in rust

termproxy is now completely written in rust (instead of perl) but
it is a drop-in replacement

this contains all other necessary changes to the build-system
for it to successfully build

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoupgrade xterm.js to version 4.7.0
Dominik Csapak [Mon, 6 Jul 2020 10:20:48 +0000 (12:20 +0200)]
upgrade xterm.js to version 4.7.0

and xterm-addon-fit to 0.4.0
no breaking changes, so no adaptions are necessary

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoallow to pass cmd-opts to command
Thomas Lamprecht [Fri, 3 Jul 2020 04:58:31 +0000 (06:58 +0200)]
allow to pass cmd-opts to command

Preparatory steps for the 'command with params' api feature.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoupgrade: use cmd not depreacated upgrade param
Thomas Lamprecht [Fri, 5 Jun 2020 12:03:23 +0000 (14:03 +0200)]
upgrade: use cmd not depreacated upgrade param

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobump version to 4.3.0-1
Thomas Lamprecht [Wed, 22 Jan 2020 11:18:49 +0000 (12:18 +0100)]
bump version to 4.3.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agouse new Uint8Array interface of xterm.js
Dominik Csapak [Tue, 21 Jan 2020 14:38:29 +0000 (15:38 +0100)]
use new Uint8Array interface of xterm.js

which means we can drop our utf8-decoder

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoadapt main.js to upstream xterm.js changes
Dominik Csapak [Tue, 21 Jan 2020 14:38:28 +0000 (15:38 +0100)]
adapt main.js to upstream xterm.js changes

Addon loading/usage changed
event listener interface changed ('on' to 'onResize', 'onData', etc.)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoupgrade xterm.js to version 4.3.0
Dominik Csapak [Tue, 21 Jan 2020 14:38:27 +0000 (15:38 +0100)]
upgrade xterm.js to version 4.3.0

adapt version of xterm.js
also download and unpack xterm-addon-fit
replace addon/fit/fit.js[.map] with xterm-addon-fit.js[.map]

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agobuildsys: fix GITVERSION
Thomas Lamprecht [Mon, 24 Jun 2019 06:53:30 +0000 (08:53 +0200)]
buildsys: fix GITVERSION

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobuildsys: switch upload dist over to buster
Thomas Lamprecht [Wed, 22 May 2019 18:52:45 +0000 (20:52 +0200)]
buildsys: switch upload dist over to buster

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agodsc: override lintian errors triggered by minified JS files
Thomas Lamprecht [Wed, 22 May 2019 18:45:19 +0000 (20:45 +0200)]
dsc: override lintian errors triggered by minified JS files

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoset debian source format to 1.0
Thomas Lamprecht [Wed, 22 May 2019 18:43:42 +0000 (20:43 +0200)]
set debian source format to 1.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoadd DSC source package and fix its reported lintian errors
Thomas Lamprecht [Wed, 22 May 2019 18:32:51 +0000 (20:32 +0200)]
add DSC source package and fix its reported lintian errors

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump version to 3.13.2-1
Thomas Lamprecht [Wed, 22 May 2019 18:04:50 +0000 (20:04 +0200)]
bump version to 3.13.2-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoupdate xterm.js sources to 3.13.2 and move away from tarballs
Thomas Lamprecht [Wed, 22 May 2019 18:02:06 +0000 (20:02 +0200)]
update xterm.js sources to 3.13.2 and move away from tarballs

instead just extract the build parts where we want them too

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobuildsys: use dpkg-dev makefile helpers for pkg info
Thomas Lamprecht [Wed, 22 May 2019 17:54:56 +0000 (19:54 +0200)]
buildsys: use dpkg-dev makefile helpers for pkg info

and build this ass arch independent all package, makes no sense else,
it has no binaries included...

This allows more easily to do away with that defines.mk

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>