Compare commits
45 Commits
release/1.
...
v1.3.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c368aa746 | ||
|
|
e5404b10e1 | ||
|
|
0e043bc4a0 | ||
|
|
515a62e0b9 | ||
|
|
e4db0eb9a7 | ||
|
|
a6bc1e4b76 | ||
|
|
cc1bb0c79f | ||
|
|
bc580857c6 | ||
|
|
e535430a2c | ||
|
|
6a2c2c82a1 | ||
|
|
3c7555d2f9 | ||
|
|
75b3cb8065 | ||
|
|
4d4516f727 | ||
|
|
202ac98cf4 | ||
|
|
edf4dcac59 | ||
|
|
79ca2ee054 | ||
|
|
ba6226e308 | ||
|
|
4b18320984 | ||
|
|
9f7a6b58ce | ||
|
|
d67e5288e3 | ||
|
|
5199a98ac4 | ||
|
|
0963a1e10f | ||
|
|
9fe714d910 | ||
|
|
eba4c7dae4 | ||
|
|
7927b7e57b | ||
|
|
ce645b39dc | ||
|
|
16e365747a | ||
|
|
511e2ae542 | ||
|
|
67eab1b6d4 | ||
|
|
574954611c | ||
|
|
6eeb2445e8 | ||
|
|
b8763c5afd | ||
|
|
d74f7102f9 | ||
|
|
3f28ee9d3d | ||
|
|
766a55d08f | ||
|
|
bb2d903113 | ||
|
|
27b3a28a56 | ||
|
|
aa6ae266b9 | ||
|
|
3ffb8f93f0 | ||
|
|
fe2d67e462 | ||
|
|
2dd5a54524 | ||
|
|
4ec39572fc | ||
|
|
d74f7c6ce7 | ||
|
|
07f015e68e | ||
|
|
0b5513873c |
116
.gitlab-ci.yml
116
.gitlab-ci.yml
@@ -17,7 +17,7 @@ variables:
|
||||
workflow:
|
||||
rules:
|
||||
# Disable tag builds.
|
||||
- if: $CI_COMMIT_TAG != $CI_COMMIT_REF_NAME
|
||||
- if: $CI_COMMIT_TAG != $CI_COMMIT_REF_NAME && $CI_PIPELINE_SOURCE != "merge_request_event"
|
||||
|
||||
stages:
|
||||
- www
|
||||
@@ -180,6 +180,44 @@ build_ubuntu_jammy_arm:
|
||||
paths:
|
||||
- output/
|
||||
|
||||
build_ubuntu_noble:
|
||||
stage: build
|
||||
allow_failure: true
|
||||
tags:
|
||||
- oci-fixed-amd
|
||||
before_script:
|
||||
- *prepare_build
|
||||
- *prepare_www
|
||||
after_script:
|
||||
- *prepare_artfacts
|
||||
script:
|
||||
- bash builder/build-package ubuntu noble;
|
||||
only:
|
||||
variables:
|
||||
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||
artifacts:
|
||||
paths:
|
||||
- output/
|
||||
|
||||
build_ubuntu_noble_arm:
|
||||
stage: build
|
||||
allow_failure: true
|
||||
tags:
|
||||
- oci-fixed-arm
|
||||
before_script:
|
||||
- *prepare_build
|
||||
- *prepare_www
|
||||
after_script:
|
||||
- *prepare_artfacts
|
||||
script:
|
||||
- bash builder/build-package ubuntu noble;
|
||||
only:
|
||||
variables:
|
||||
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||
artifacts:
|
||||
paths:
|
||||
- output/
|
||||
|
||||
build_debian_buster:
|
||||
stage: build
|
||||
allow_failure: true
|
||||
@@ -580,6 +618,44 @@ build_fedora_thirtynine_arm:
|
||||
paths:
|
||||
- output/
|
||||
|
||||
build_fedora_forty:
|
||||
stage: build
|
||||
allow_failure: true
|
||||
tags:
|
||||
- oci-fixed-amd
|
||||
before_script:
|
||||
- *prepare_build
|
||||
- *prepare_www
|
||||
after_script:
|
||||
- *prepare_artfacts
|
||||
script:
|
||||
- bash builder/build-package fedora forty;
|
||||
only:
|
||||
variables:
|
||||
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||
artifacts:
|
||||
paths:
|
||||
- output/
|
||||
|
||||
build_fedora_forty_arm:
|
||||
stage: build
|
||||
allow_failure: true
|
||||
tags:
|
||||
- oci-fixed-arm
|
||||
before_script:
|
||||
- *prepare_build
|
||||
- *prepare_www
|
||||
after_script:
|
||||
- *prepare_artfacts
|
||||
script:
|
||||
- bash builder/build-package fedora forty;
|
||||
only:
|
||||
variables:
|
||||
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||
artifacts:
|
||||
paths:
|
||||
- output/
|
||||
|
||||
build_alpine_317:
|
||||
stage: build
|
||||
allow_failure: true
|
||||
@@ -704,6 +780,44 @@ build_alpine_319_arm:
|
||||
paths:
|
||||
- output/
|
||||
|
||||
build_alpine_320:
|
||||
stage: build
|
||||
allow_failure: true
|
||||
tags:
|
||||
- oci-fixed-amd
|
||||
before_script:
|
||||
- *prepare_build
|
||||
- *prepare_www
|
||||
after_script:
|
||||
- *prepare_artfacts
|
||||
script:
|
||||
- bash builder/build-package alpine 320;
|
||||
only:
|
||||
variables:
|
||||
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||
artifacts:
|
||||
paths:
|
||||
- output/
|
||||
|
||||
build_alpine_320_arm:
|
||||
stage: build
|
||||
allow_failure: true
|
||||
tags:
|
||||
- oci-fixed-arm
|
||||
before_script:
|
||||
- *prepare_build
|
||||
- *prepare_www
|
||||
after_script:
|
||||
- *prepare_artfacts
|
||||
script:
|
||||
- bash builder/build-package alpine 320;
|
||||
only:
|
||||
variables:
|
||||
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||
artifacts:
|
||||
paths:
|
||||
- output/
|
||||
|
||||
upload:
|
||||
stage: upload
|
||||
image: ubuntu:focal
|
||||
|
||||
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -1,4 +1,4 @@
|
||||
[submodule "kasmweb"]
|
||||
path = kasmweb
|
||||
url = https://github.com/kasmtech/noVNC.git
|
||||
branch = master
|
||||
branch = release/1.2.2
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
KasmVNC provides remote web-based access to a Desktop or application. While VNC is in the name, KasmVNC differs from other VNC variants such as TigerVNC, RealVNC, and TurboVNC. KasmVNC has broken from the RFB specification which defines VNC, in order to support modern technologies and increase security. KasmVNC is accessed by users from any modern browser and does not support legacy VNC viewer applications. KasmVNC uses a modern YAML based configuration at the server and user level, allowing for ease of management.
|
||||
|
||||
[Kasm Technologies](https://www.kasmweb.com) developed Kasm Workspaces, the Containerized Streaming Platform. Kasm has open-sourced the Workspace docker images, which include containerized [full desktops and apps](https://github.com/kasmtech/workspaces-images) and [base images](https://github.com/kasmtech/workspaces-core-images) intended for developers to create custimized streaming containers. These containers can be used standalone or within the [Kasm Workspaces Platform](https://www.kasmweb.com) which provides a full Enterprise feature set.
|
||||
[Kasm Technologies](https://www.kasmweb.com) developed Kasm Workspaces, the Containerized Streaming Platform. Kasm has open-sourced the Workspace docker images, which include containerized [full desktops and apps](https://github.com/kasmtech/workspaces-images) and [base images](https://github.com/kasmtech/workspaces-core-images) intended for developers to create customized streaming containers. These containers can be used standalone or within the [Kasm Workspaces Platform](https://www.kasmweb.com) which provides a full Enterprise feature set.
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -27,7 +27,7 @@ wget <package_url>
|
||||
sudo apt-get install ./kasmvncserver_*.deb
|
||||
|
||||
# Add your user to the ssl-cert group
|
||||
sudo addgroup $USER ssl-cert
|
||||
sudo adduser $USER ssl-cert
|
||||
```
|
||||
|
||||
### Oracle 8
|
||||
@@ -269,4 +269,4 @@ Future Goals:
|
||||
See the [builder/README.md](https://github.com/kasmtech/KasmVNC/blob/master/builder/README.md). We containerize our build systems to ensure highly repeatable builds.
|
||||
|
||||
### License and Acknowledgements
|
||||
See the [LICENSE.TXT](https://github.com/kasmtech/KasmVNC/blob/master/LICENSE.TXT) and [ACKNOWLEDGEMENTS.MD](https://github.com/kasmtech/KasmVNC/blob/master/LICENSE.TXT)
|
||||
See the [LICENSE.TXT](https://github.com/kasmtech/KasmVNC/blob/master/LICENSE.TXT) and [ACKNOWLEDGEMENTS.md](https://github.com/kasmtech/KasmVNC/blob/master/ACKNOWLEDGEMENTS.md)
|
||||
|
||||
@@ -139,6 +139,8 @@ if [ -d /usr/lib/x86_64-linux-gnu/dri ]; then
|
||||
ln -s /usr/lib/x86_64-linux-gnu/dri dri
|
||||
elif [ -d /usr/lib/aarch64-linux-gnu/dri ]; then
|
||||
ln -s /usr/lib/aarch64-linux-gnu/dri dri
|
||||
elif [ -d /usr/lib/arm-linux-gnueabihf/dri ]; then
|
||||
ln -s /usr/lib/arm-linux-gnueabihf/dri dri
|
||||
elif [ -d /usr/lib/xorg/modules/dri ]; then
|
||||
ln -s /usr/lib/xorg/modules/dri dri
|
||||
else
|
||||
|
||||
7
builder/dockerfile.alpine_320.apk.build
Normal file
7
builder/dockerfile.alpine_320.apk.build
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM alpine:3.20
|
||||
|
||||
RUN apk add shadow bash
|
||||
|
||||
RUN useradd -m docker && echo "docker:docker" | chpasswd
|
||||
|
||||
USER docker
|
||||
82
builder/dockerfile.alpine_320.build
Normal file
82
builder/dockerfile.alpine_320.build
Normal file
@@ -0,0 +1,82 @@
|
||||
FROM alpine:3.20
|
||||
|
||||
ENV KASMVNC_BUILD_OS alpine
|
||||
ENV KASMVNC_BUILD_OS_CODENAME 320
|
||||
ENV XORG_VER 1.20.14
|
||||
|
||||
RUN \
|
||||
echo "**** install build deps ****" && \
|
||||
apk add \
|
||||
alpine-release \
|
||||
alpine-sdk \
|
||||
autoconf \
|
||||
automake \
|
||||
bash \
|
||||
ca-certificates \
|
||||
cmake \
|
||||
coreutils \
|
||||
curl \
|
||||
eudev-dev \
|
||||
font-cursor-misc \
|
||||
font-misc-misc \
|
||||
font-util-dev \
|
||||
git \
|
||||
grep \
|
||||
jq \
|
||||
libdrm-dev \
|
||||
libepoxy-dev \
|
||||
libjpeg-turbo-dev \
|
||||
libjpeg-turbo-static \
|
||||
libpciaccess-dev \
|
||||
libtool \
|
||||
libwebp-dev \
|
||||
libx11-dev \
|
||||
libxau-dev \
|
||||
libxcb-dev \
|
||||
libxcursor-dev \
|
||||
libxcvt-dev \
|
||||
libxdmcp-dev \
|
||||
libxext-dev \
|
||||
libxfont2-dev \
|
||||
libxkbfile-dev \
|
||||
libxrandr-dev \
|
||||
libxshmfence-dev \
|
||||
libxtst-dev \
|
||||
mesa-dev \
|
||||
mesa-dri-gallium \
|
||||
meson \
|
||||
nettle-dev \
|
||||
openssl-dev \
|
||||
pixman-dev \
|
||||
procps \
|
||||
shadow \
|
||||
tar \
|
||||
tzdata \
|
||||
wayland-dev \
|
||||
wayland-protocols \
|
||||
xcb-util-dev \
|
||||
xcb-util-image-dev \
|
||||
xcb-util-keysyms-dev \
|
||||
xcb-util-renderutil-dev \
|
||||
xcb-util-wm-dev \
|
||||
xinit \
|
||||
xkbcomp \
|
||||
xkbcomp-dev \
|
||||
xkeyboard-config \
|
||||
xorgproto \
|
||||
xorg-server-common \
|
||||
xorg-server-dev \
|
||||
xtrans
|
||||
|
||||
|
||||
ENV SCRIPTS_DIR=/tmp/scripts
|
||||
COPY builder/scripts $SCRIPTS_DIR
|
||||
RUN $SCRIPTS_DIR/build-webp
|
||||
RUN $SCRIPTS_DIR/build-libjpeg-turbo
|
||||
|
||||
RUN useradd -m docker && echo "docker:docker" | chpasswd
|
||||
|
||||
COPY --chown=docker:docker . /src/
|
||||
|
||||
USER docker
|
||||
ENTRYPOINT ["/src/builder/build.sh"]
|
||||
86
builder/dockerfile.fedora_forty.build
Normal file
86
builder/dockerfile.fedora_forty.build
Normal file
@@ -0,0 +1,86 @@
|
||||
FROM fedora:40
|
||||
|
||||
ENV KASMVNC_BUILD_OS fedora
|
||||
ENV KASMVNC_BUILD_OS_CODENAME forty
|
||||
ENV XORG_VER 1.20.14
|
||||
|
||||
RUN \
|
||||
echo "**** install build deps ****" && \
|
||||
dnf group install -y \
|
||||
"C Development Tools and Libraries" \
|
||||
"Development Tools" && \
|
||||
dnf install -y \
|
||||
autoconf \
|
||||
automake \
|
||||
bison \
|
||||
byacc \
|
||||
bzip2 \
|
||||
cmake \
|
||||
diffutils \
|
||||
doxygen \
|
||||
file \
|
||||
flex \
|
||||
fop \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
git \
|
||||
glibc-devel \
|
||||
libdrm-devel \
|
||||
libepoxy-devel \
|
||||
libmd-devel \
|
||||
libpciaccess-devel \
|
||||
libtool \
|
||||
libwebp-devel \
|
||||
libX11-devel \
|
||||
libXau-devel \
|
||||
libxcb-devel \
|
||||
libXcursor-devel \
|
||||
libxcvt-devel \
|
||||
libXdmcp-devel \
|
||||
libXext-devel \
|
||||
libXfont2-devel \
|
||||
libxkbfile-devel \
|
||||
libXrandr-devel \
|
||||
libxshmfence-devel \
|
||||
libXtst-devel \
|
||||
mesa-libEGL-devel \
|
||||
mesa-libgbm-devel \
|
||||
mesa-libGL-devel \
|
||||
meson \
|
||||
mingw64-binutils \
|
||||
mt-st \
|
||||
nettle-devel \
|
||||
openssl-devel \
|
||||
patch \
|
||||
pixman-devel \
|
||||
wayland-devel \
|
||||
wget \
|
||||
which \
|
||||
xcb-util-devel \
|
||||
xcb-util-image-devel \
|
||||
xcb-util-keysyms-devel \
|
||||
xcb-util-renderutil-devel \
|
||||
xcb-util-wm-devel \
|
||||
xinit \
|
||||
xkbcomp \
|
||||
xkbcomp-devel \
|
||||
xkeyboard-config \
|
||||
xmlto \
|
||||
xorg-x11-font-utils \
|
||||
xorg-x11-proto-devel \
|
||||
xorg-x11-server-common \
|
||||
xorg-x11-server-devel \
|
||||
xorg-x11-xtrans-devel \
|
||||
xsltproc
|
||||
|
||||
ENV SCRIPTS_DIR=/tmp/scripts
|
||||
COPY builder/scripts $SCRIPTS_DIR
|
||||
RUN $SCRIPTS_DIR/build-webp
|
||||
RUN $SCRIPTS_DIR/build-libjpeg-turbo
|
||||
|
||||
RUN useradd -m docker && echo "docker:docker" | chpasswd
|
||||
|
||||
COPY --chown=docker:docker . /src/
|
||||
|
||||
USER docker
|
||||
ENTRYPOINT ["/src/builder/build.sh"]
|
||||
13
builder/dockerfile.fedora_forty.rpm.build
Normal file
13
builder/dockerfile.fedora_forty.rpm.build
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM fedora:40
|
||||
|
||||
RUN dnf install -y fedora-packager fedora-review
|
||||
RUN dnf install -y tree vim less
|
||||
RUN dnf install -y redhat-lsb-core
|
||||
RUN dnf install -y dnf-plugins-core
|
||||
|
||||
COPY fedora/*.spec /tmp
|
||||
RUN dnf builddep -y /tmp/*.spec
|
||||
|
||||
RUN useradd -m docker && echo "docker:docker" | chpasswd
|
||||
|
||||
USER docker
|
||||
@@ -4,8 +4,8 @@ ENV KASMVNC_BUILD_OS oracle
|
||||
ENV KASMVNC_BUILD_OS_CODENAME 9
|
||||
|
||||
RUN dnf config-manager --set-enabled ol9_codeready_builder
|
||||
RUN dnf config-manager --set-enabled ol9_distro_builder
|
||||
RUN dnf install -y \
|
||||
RUN dnf config-manager --nobest --set-enabled ol9_distro_builder
|
||||
RUN dnf install --nobest -y \
|
||||
gpg* \
|
||||
less \
|
||||
redhat-lsb-core \
|
||||
|
||||
28
builder/dockerfile.ubuntu_noble.build
Normal file
28
builder/dockerfile.ubuntu_noble.build
Normal file
@@ -0,0 +1,28 @@
|
||||
FROM ubuntu:noble
|
||||
|
||||
ENV KASMVNC_BUILD_OS ubuntu
|
||||
ENV KASMVNC_BUILD_OS_CODENAME noble
|
||||
ENV XORG_VER 1.20.8
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN sed -i 's$Types: deb$Types: deb deb-src$' /etc/apt/sources.list.d/ubuntu.sources
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get -y install sudo
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends tzdata
|
||||
RUN apt-get update && apt-get -y build-dep xorg-server libxfont-dev
|
||||
RUN apt-get update && apt-get -y install cmake git libgnutls28-dev vim wget curl
|
||||
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
|
||||
|
||||
ENV SCRIPTS_DIR=/tmp/scripts
|
||||
COPY builder/scripts $SCRIPTS_DIR
|
||||
RUN $SCRIPTS_DIR/build-webp
|
||||
RUN $SCRIPTS_DIR/build-libjpeg-turbo
|
||||
|
||||
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
||||
|
||||
COPY --chown=docker:docker . /src/
|
||||
|
||||
USER docker
|
||||
ENTRYPOINT ["/src/builder/build.sh"]
|
||||
19
builder/dockerfile.ubuntu_noble.deb.build
Normal file
19
builder/dockerfile.ubuntu_noble.deb.build
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM ubuntu:noble
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get -y install vim build-essential devscripts equivs
|
||||
|
||||
# Install build-deps for the package.
|
||||
COPY ./debian/control /tmp
|
||||
RUN apt-get update && echo YYY | mk-build-deps --install --remove /tmp/control
|
||||
|
||||
ARG L_UID
|
||||
RUN if [ "$L_UID" -eq 0 ]; then \
|
||||
useradd -m docker; \
|
||||
else \
|
||||
useradd -m docker -u $L_UID;\
|
||||
fi
|
||||
|
||||
USER docker
|
||||
57
builder/dockerfile.ubuntu_noble.deb.test
Normal file
57
builder/dockerfile.ubuntu_noble.deb.test
Normal file
@@ -0,0 +1,57 @@
|
||||
FROM ubuntu:noble
|
||||
|
||||
ENV DISPLAY=:1 \
|
||||
VNC_PORT=8443 \
|
||||
VNC_RESOLUTION=1280x720 \
|
||||
MAX_FRAME_RATE=24 \
|
||||
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7" \
|
||||
HOME=/home/user \
|
||||
TERM=xterm \
|
||||
STARTUPDIR=/dockerstartup \
|
||||
INST_SCRIPTS=/dockerstartup/install \
|
||||
KASM_RX_HOME=/dockerstartup/kasmrx \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
VNC_COL_DEPTH=24 \
|
||||
VNC_RESOLUTION=1280x1024 \
|
||||
VNC_PW=vncpassword \
|
||||
VNC_USER=user \
|
||||
VNC_VIEW_ONLY_PW=vncviewonlypassword \
|
||||
LD_LIBRARY_PATH=/usr/local/lib/ \
|
||||
OMP_WAIT_POLICY=PASSIVE \
|
||||
SHELL=/bin/bash \
|
||||
SINGLE_APPLICATION=0 \
|
||||
KASMVNC_BUILD_OS=ubuntu \
|
||||
KASMVNC_BUILD_OS_CODENAME=noble
|
||||
|
||||
EXPOSE $VNC_PORT
|
||||
|
||||
WORKDIR $HOME
|
||||
|
||||
### REQUIRED STUFF ###
|
||||
|
||||
RUN apt-get update && apt-get install -y supervisor xfce4 xfce4-terminal xterm libnss-wrapper gettext wget
|
||||
RUN apt-get purge -y pm-utils xscreensaver*
|
||||
RUN apt-get update && apt-get install -y vim less
|
||||
RUN apt-get update && apt-get -y install lsb-release
|
||||
|
||||
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
||||
|
||||
RUN mkdir -p $STARTUPDIR
|
||||
COPY builder/startup/ $STARTUPDIR
|
||||
|
||||
### START CUSTOM STUFF ####
|
||||
|
||||
ARG KASMVNC_PACKAGE_DIR
|
||||
COPY $KASMVNC_PACKAGE_DIR/kasmvncserver_*.deb /tmp/
|
||||
RUN rm -f /tmp/kasmvncserver_*+*.deb; dpkg -i /tmp/*.deb; apt-get -yf install
|
||||
|
||||
RUN mkdir ~/.vnc && echo '/usr/bin/xfce4-session &' >> ~/.vnc/xstartup && \
|
||||
chmod +x ~/.vnc/xstartup
|
||||
|
||||
### END CUSTOM STUFF ###
|
||||
|
||||
RUN chown -R 1000:0 $HOME
|
||||
USER 1000:ssl-cert
|
||||
WORKDIR $HOME
|
||||
|
||||
ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]
|
||||
51
builder/dockerfile.ubuntu_noble.test
Normal file
51
builder/dockerfile.ubuntu_noble.test
Normal file
@@ -0,0 +1,51 @@
|
||||
FROM ubuntu:noble
|
||||
|
||||
ENV DISPLAY=:1 \
|
||||
VNC_PORT=8443 \
|
||||
VNC_RESOLUTION=1280x720 \
|
||||
MAX_FRAME_RATE=24 \
|
||||
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7" \
|
||||
HOME=/home/user \
|
||||
TERM=xterm \
|
||||
STARTUPDIR=/dockerstartup \
|
||||
INST_SCRIPTS=/dockerstartup/install \
|
||||
KASM_RX_HOME=/dockerstartup/kasmrx \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
VNC_COL_DEPTH=24 \
|
||||
VNC_RESOLUTION=1280x1024 \
|
||||
VNC_PW=vncpassword \
|
||||
VNC_USER=user \
|
||||
VNC_VIEW_ONLY_PW=vncviewonlypassword \
|
||||
LD_LIBRARY_PATH=/usr/local/lib/ \
|
||||
OMP_WAIT_POLICY=PASSIVE \
|
||||
SHELL=/bin/bash \
|
||||
SINGLE_APPLICATION=0 \
|
||||
KASMVNC_BUILD_OS=ubuntu \
|
||||
KASMVNC_BUILD_OS_CODENAME=noble
|
||||
|
||||
EXPOSE $VNC_PORT
|
||||
|
||||
WORKDIR $HOME
|
||||
|
||||
### REQUIRED STUFF ###
|
||||
|
||||
RUN apt-get update && apt-get install -y supervisor xfce4 xfce4-terminal xterm libnss-wrapper gettext wget
|
||||
RUN apt-get purge -y pm-utils xscreensaver*
|
||||
|
||||
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
||||
|
||||
RUN mkdir -p $STARTUPDIR
|
||||
COPY startup/ $STARTUPDIR
|
||||
|
||||
### START CUSTOM STUFF ####
|
||||
|
||||
COPY build/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_CODENAME}.tar.gz /tmp/
|
||||
RUN tar -xzvf /tmp/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_CODENAME}.tar.gz --strip 1 -C /
|
||||
|
||||
### END CUSTOM STUFF ###
|
||||
|
||||
RUN chown -R 1000:0 $HOME
|
||||
USER 1000
|
||||
WORKDIR $HOME
|
||||
|
||||
ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <dirent.h>
|
||||
#include <inttypes.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -782,6 +783,10 @@ static const char *name2mime(const char *name) {
|
||||
goto def;
|
||||
end++;
|
||||
|
||||
// Everything under Downloads/ should be treated as binary
|
||||
if (strcasestr(name, "Downloads/"))
|
||||
goto def;
|
||||
|
||||
#define CMP(s) if (!strncmp(end, s, sizeof(s) - 1))
|
||||
|
||||
CMP("htm")
|
||||
@@ -917,6 +922,12 @@ static void servefile(ws_ctx_t *ws_ctx, const char *in, const char * const user,
|
||||
|
||||
percent_decode(path, buf, 1);
|
||||
|
||||
// in case they percent-encoded dots
|
||||
if (strstr(buf, "../")) {
|
||||
handler_msg("Attempted dir traversal attack, rejecting\n", len);
|
||||
goto nope;
|
||||
}
|
||||
|
||||
handler_msg("Requested file '%s'\n", buf);
|
||||
sprintf(fullpath, "%s/%s", settings.httpdir, buf);
|
||||
|
||||
@@ -933,15 +944,15 @@ static void servefile(ws_ctx_t *ws_ctx, const char *in, const char * const user,
|
||||
goto nope;
|
||||
}
|
||||
|
||||
fseek(f, 0, SEEK_END);
|
||||
const uint64_t filesize = ftell(f);
|
||||
fseeko(f, 0, SEEK_END);
|
||||
const uint64_t filesize = ftello(f);
|
||||
rewind(f);
|
||||
|
||||
sprintf(buf, "HTTP/1.1 200 OK\r\n"
|
||||
"Server: KasmVNC/4.0\r\n"
|
||||
"Connection: close\r\n"
|
||||
"Content-type: %s\r\n"
|
||||
"Content-length: %lu\r\n"
|
||||
"Content-length: %" PRIu64 "\r\n"
|
||||
"%s"
|
||||
"\r\n",
|
||||
name2mime(path), filesize, extra_headers ? extra_headers : "");
|
||||
@@ -1018,6 +1029,20 @@ static void send403(ws_ctx_t *ws_ctx, const char * const origip, const char * co
|
||||
weblog(403, wsthread_handler_id, 0, origip, ip, "-", 1, "-", strlen(buf));
|
||||
}
|
||||
|
||||
static void send400(ws_ctx_t *ws_ctx, const char * const origip, const char * const ip,
|
||||
const char *info) {
|
||||
char buf[4096];
|
||||
sprintf(buf, "HTTP/1.1 400 Bad Request\r\n"
|
||||
"Server: KasmVNC/4.0\r\n"
|
||||
"Connection: close\r\n"
|
||||
"Content-type: text/plain\r\n"
|
||||
"%s"
|
||||
"\r\n"
|
||||
"400 Bad Request%s", extra_headers ? extra_headers : "", info);
|
||||
ws_send(ws_ctx, buf, strlen(buf));
|
||||
weblog(400, wsthread_handler_id, 0, origip, ip, "-", 1, "-", strlen(buf));
|
||||
}
|
||||
|
||||
static uint8_t ownerapi_post(ws_ctx_t *ws_ctx, const char *in, const char * const user,
|
||||
const char * const ip, const char * const origip) {
|
||||
char buf[4096], path[4096];
|
||||
@@ -1644,7 +1669,7 @@ timeout:
|
||||
}
|
||||
|
||||
ws_ctx_t *do_handshake(int sock, char * const ip) {
|
||||
char handshake[4096], response[4096], sha1[29], trailer[17];
|
||||
char handshake[16 * 1024], response[4096], sha1[29], trailer[17];
|
||||
char *scheme, *pre;
|
||||
headers_t *headers;
|
||||
int len, i, offset;
|
||||
@@ -1701,6 +1726,7 @@ ws_ctx_t *do_handshake(int sock, char * const ip) {
|
||||
break;
|
||||
} else if (sizeof(handshake) <= (size_t)(offset + 1)) {
|
||||
handler_emsg("Oversized handshake\n");
|
||||
send400(ws_ctx, "-", ip, ", too large");
|
||||
free_ws_ctx(ws_ctx);
|
||||
return NULL;
|
||||
} else if (9 == i) {
|
||||
|
||||
2
kasmweb
2
kasmweb
Submodule kasmweb updated: 4c6127b47b...bce2d6a704
@@ -520,6 +520,8 @@ int main(int argc, char **argv) {
|
||||
cursorhash = newhash;
|
||||
}
|
||||
|
||||
XFree(cursor);
|
||||
|
||||
usleep(sleeptime);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,9 +55,12 @@ typedef struct gbm_pixmap gbm_pixmap;
|
||||
static DevPrivateKeyRec dri3_pixmap_private_key;
|
||||
static struct timeval start;
|
||||
|
||||
#define MAX_TEXPIXMAPS 32
|
||||
static PixmapPtr texpixmaps[MAX_TEXPIXMAPS];
|
||||
static uint32_t num_texpixmaps;
|
||||
struct texpixmap {
|
||||
PixmapPtr pixmap;
|
||||
struct xorg_list entry;
|
||||
};
|
||||
|
||||
static struct xorg_list texpixmaps;
|
||||
static CARD32 update_texpixmaps(OsTimerPtr timer, CARD32 time, void *arg);
|
||||
static OsTimerPtr texpixmaptimer;
|
||||
|
||||
@@ -110,25 +113,21 @@ static gbm_pixmap *gbm_pixmap_get(PixmapPtr pixmap)
|
||||
|
||||
static void add_texpixmap(PixmapPtr pix)
|
||||
{
|
||||
uint32_t i;
|
||||
for (i = 0; i < MAX_TEXPIXMAPS; i++) {
|
||||
if (texpixmaps[i] == pix)
|
||||
struct texpixmap *ptr;
|
||||
|
||||
xorg_list_for_each_entry(ptr, &texpixmaps, entry) {
|
||||
if (ptr->pixmap == pix)
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_TEXPIXMAPS; i++) {
|
||||
if (!texpixmaps[i]) {
|
||||
texpixmaps[i] = pix;
|
||||
pix->refcnt++;
|
||||
num_texpixmaps++;
|
||||
// start if not running
|
||||
if (!texpixmaptimer)
|
||||
texpixmaptimer = TimerSet(NULL, 0, 16, update_texpixmaps, NULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
ptr = calloc(1, sizeof(struct texpixmap));
|
||||
ptr->pixmap = pix;
|
||||
pix->refcnt++;
|
||||
xorg_list_append(&ptr->entry, &texpixmaps);
|
||||
|
||||
ErrorF("Max number of texpixmaps reached\n");
|
||||
// start if not running
|
||||
if (!texpixmaptimer)
|
||||
texpixmaptimer = TimerSet(NULL, 0, 16, update_texpixmaps, NULL);
|
||||
}
|
||||
|
||||
static PixmapPtr
|
||||
@@ -313,38 +312,41 @@ void xvnc_sync_dri3_textures(void)
|
||||
// This is called both from the global damage report and the timer,
|
||||
// to account for cases that do not use the damage report.
|
||||
|
||||
uint32_t i, y;
|
||||
uint32_t y;
|
||||
gbm_pixmap *gp;
|
||||
uint8_t *src, *dst;
|
||||
uint32_t srcstride, dststride;
|
||||
void *opaque = NULL;
|
||||
struct texpixmap *ptr, *tmpptr;
|
||||
|
||||
for (i = 0; i < MAX_TEXPIXMAPS; i++) {
|
||||
if (!texpixmaps[i])
|
||||
continue;
|
||||
if (texpixmaps[i]->refcnt == 1) {
|
||||
// We may not be running on hw if there's a compositor using PRESENT on llvmpipe
|
||||
if (!driNode)
|
||||
return;
|
||||
|
||||
xorg_list_for_each_entry_safe(ptr, tmpptr, &texpixmaps, entry) {
|
||||
if (ptr->pixmap->refcnt == 1) {
|
||||
// We are the only user left, delete it
|
||||
texpixmaps[i]->drawable.pScreen->DestroyPixmap(texpixmaps[i]);
|
||||
texpixmaps[i] = NULL;
|
||||
num_texpixmaps--;
|
||||
ptr->pixmap->drawable.pScreen->DestroyPixmap(ptr->pixmap);
|
||||
xorg_list_del(&ptr->entry);
|
||||
free(ptr);
|
||||
continue;
|
||||
}
|
||||
|
||||
gp = gbm_pixmap_get(texpixmaps[i]);
|
||||
gp = gbm_pixmap_get(ptr->pixmap);
|
||||
opaque = NULL;
|
||||
dst = gbm_bo_map(gp->bo, 0, 0,
|
||||
texpixmaps[i]->drawable.width,
|
||||
texpixmaps[i]->drawable.height,
|
||||
ptr->pixmap->drawable.width,
|
||||
ptr->pixmap->drawable.height,
|
||||
GBM_BO_TRANSFER_WRITE, &dststride, &opaque);
|
||||
if (!dst) {
|
||||
ErrorF("gbm map failed, errno %d\n", errno);
|
||||
continue;
|
||||
}
|
||||
|
||||
srcstride = texpixmaps[i]->devKind;
|
||||
src = texpixmaps[i]->devPrivate.ptr;
|
||||
srcstride = ptr->pixmap->devKind;
|
||||
src = ptr->pixmap->devPrivate.ptr;
|
||||
|
||||
for (y = 0; y < texpixmaps[i]->drawable.height; y++) {
|
||||
for (y = 0; y < ptr->pixmap->drawable.height; y++) {
|
||||
memcpy(dst, src, srcstride);
|
||||
dst += dststride;
|
||||
src += srcstride;
|
||||
@@ -358,7 +360,7 @@ static CARD32 update_texpixmaps(OsTimerPtr timer, CARD32 time, void *arg)
|
||||
{
|
||||
xvnc_sync_dri3_textures();
|
||||
|
||||
if (!num_texpixmaps) {
|
||||
if (xorg_list_is_empty(&texpixmaps)) {
|
||||
TimerFree(texpixmaptimer);
|
||||
texpixmaptimer = NULL;
|
||||
return 0;
|
||||
@@ -387,6 +389,8 @@ void xvnc_init_dri3(void)
|
||||
if (!priv.gbm)
|
||||
FatalError("Failed to create gbm\n");
|
||||
|
||||
xorg_list_init(&texpixmaps);
|
||||
|
||||
if (!dri3_screen_init(screenInfo.screens[0], &xvnc_dri3_info))
|
||||
FatalError("Couldn't init dri3\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user