mirror of
https://git.myvelabs.com/novnc/archlinux.git
synced 2026-10-16 10:24:00 +00:00
Optimize build parameters
This commit is contained in:
parent
a7ad922ad3
commit
65312a688b
218 changed files with 182 additions and 258 deletions
204
base.sh
204
base.sh
|
|
@ -1,204 +0,0 @@
|
||||||
## Dockerfile
|
|
||||||
cat >Dockerfile <<- 'Dockerfile'
|
|
||||||
# syntax = docker/dockerfile:1.2
|
|
||||||
FROM quay.io/archlinux/archlinux:base-devel
|
|
||||||
USER root
|
|
||||||
|
|
||||||
# Docker ENV variables
|
|
||||||
# # Required
|
|
||||||
# ENV MYVNC_VNCPASS
|
|
||||||
# # Optional
|
|
||||||
# ENV MYVNC_CUSTOM_TITLE
|
|
||||||
# ENV MYVNC_PROXYPATH (eg, "/subpath/" or "/subpath")
|
|
||||||
# ENV MYVNC_VNCSHARING (eg, "true" to allow sharing (defaults to "false"))
|
|
||||||
# ENV MYVNC_VNCSERVER_HOST (eg, localhost or 192.168.1.1)
|
|
||||||
# ENV MYVNC_VNCSERVER_PORT (eg, 5900)
|
|
||||||
|
|
||||||
# Build ARG for additional pacman packages to install (eg, openssh)
|
|
||||||
ARG pkg
|
|
||||||
|
|
||||||
# Install packages
|
|
||||||
COPY mirrorlist /etc/pacman.d/mirrorlist
|
|
||||||
RUN pacman-key --init \
|
|
||||||
&& sed -i '/ParallelDownloads/c ParallelDownloads = 10' /etc/pacman.conf \
|
|
||||||
&& pacman -Sy --ask 4 archlinux-keyring \
|
|
||||||
&& pacman -Su --ask 4 --needed \
|
|
||||||
sudo bash-completion ${pkg} \
|
|
||||||
inetutils python-numpy python-setuptools \
|
|
||||||
nginx-mainline \
|
|
||||||
&& pacman -Scc --ask 4 \
|
|
||||||
&& useradd --create-home --gid users --shell /usr/bin/bash user \
|
|
||||||
&& echo 'user ALL=(ALL:ALL) NOPASSWD: MISCELLANEOUS, /usr/bin/nginx' >/etc/sudoers.d/zz-DOCKER \
|
|
||||||
&& echo 'Defaults lecture = never' >>/etc/sudoers.d/zz-DOCKER \
|
|
||||||
&& passwd -l root >/dev/null 2>&1 \
|
|
||||||
&& sed '/^http {/a\ \
|
|
||||||
include /app/nginx/\*.conf;\n\ \
|
|
||||||
types_hash_max_size 4096;\n\ \
|
|
||||||
server_names_hash_bucket_size 128;\n' -i /etc/nginx/nginx.conf \
|
|
||||||
&& mkdir -p /app/init.d /app/nginx /app/logs
|
|
||||||
|
|
||||||
# Install noVNC
|
|
||||||
COPY novnc /app/novnc
|
|
||||||
|
|
||||||
# Install all init scripts
|
|
||||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
|
||||||
COPY 01-init.sh 10-novnc.sh 10-nginx.sh /app/init.d/
|
|
||||||
|
|
||||||
# Proper permissions
|
|
||||||
RUN chmod +x /docker-entrypoint.sh /app/init.d/* \
|
|
||||||
&& chown -R user:users /app
|
|
||||||
|
|
||||||
# Default environment
|
|
||||||
USER user
|
|
||||||
WORKDIR /home/user
|
|
||||||
ENV DISPLAY=:0
|
|
||||||
ENV SHELL=/usr/bin/bash
|
|
||||||
|
|
||||||
# Expose nginx port for VNC webui
|
|
||||||
EXPOSE 6900
|
|
||||||
|
|
||||||
# Docker entrypoint
|
|
||||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
||||||
Dockerfile
|
|
||||||
|
|
||||||
## Init script, always runs first
|
|
||||||
cat >01-init.sh <<- '01-init.sh'
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
# Create base directories
|
|
||||||
for dir in vnc config ssh
|
|
||||||
do
|
|
||||||
[ -d ~/.${dir} ] || mkdir -p ~/.${dir}
|
|
||||||
done
|
|
||||||
|
|
||||||
## OPTIONAL: More commands may be added below
|
|
||||||
|
|
||||||
01-init.sh
|
|
||||||
|
|
||||||
## NoVNC setup
|
|
||||||
cat >10-novnc.sh <<- '10-novnc.sh'
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
# Turn vnc sharing on/off
|
|
||||||
if [[ ${MYVNC_VNCSHARING} == "true" ]] || [[ ${MYVNC_VNCSHARING} == "1" ]]
|
|
||||||
then
|
|
||||||
_MYVNC_VNCSHARING=true
|
|
||||||
else
|
|
||||||
_MYVNC_VNCSHARING=false
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Always default to remote scaling
|
|
||||||
sed -i "/UI.initSetting\|resize/ s/resize', '.*');/resize', 'scale');/" /app/novnc/app/ui.js
|
|
||||||
|
|
||||||
# Always default to autoconnect=true
|
|
||||||
sed -i "/let autoconnect/ s/autoconnect', .*);/autoconnect', true);/" /app/novnc/app/ui.js
|
|
||||||
|
|
||||||
# Change vnc shared view settings (defaults to false/off)
|
|
||||||
sed -i "/UI.initSetting\|shared/ s/shared', .*);/shared', ${_MYVNC_VNCSHARING});/" /app/novnc/app/ui.js
|
|
||||||
|
|
||||||
# NoVNC custom title
|
|
||||||
sed -i "/<title>noVNC<\/title>/ s/noVNC/${MYVNC_CUSTOM_TITLE:-noVNC}/g" /app/novnc/*.html
|
|
||||||
|
|
||||||
# Apply subpath to websocket
|
|
||||||
if [[ ${MYVNC_PROXYPATH} == "/" ]]
|
|
||||||
then
|
|
||||||
unset _MYVNC_PROXYPATH
|
|
||||||
elif [ ${MYVNC_PROXYPATH} ]
|
|
||||||
then
|
|
||||||
_MYVNC_PROXYPATH=$(echo ${MYVNC_PROXYPATH%/} | sed "s|^.*/||")
|
|
||||||
sed -i "/UI.initSetting/ s|websockify|${_MYVNC_PROXYPATH}/&|" /app/novnc/app/ui.js
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Start NoVNC
|
|
||||||
/app/novnc/utils/novnc_proxy \
|
|
||||||
--listen 6080 \
|
|
||||||
--vnc ${MYVNC_VNCSERVER_HOST:-localhost}:${MYVNC_VNCSERVER_PORT:-5900} \
|
|
||||||
--file-only &
|
|
||||||
10-novnc.sh
|
|
||||||
|
|
||||||
## Nginx setup
|
|
||||||
cat >10-nginx.sh <<- '10-nginx.sh'
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
# Reformat path
|
|
||||||
if [[ ${MYVNC_PROXYPATH} == "/" ]]
|
|
||||||
then
|
|
||||||
unset _MYVNC_PROXYPATH
|
|
||||||
elif [ ${MYVNC_PROXYPATH} ]
|
|
||||||
then
|
|
||||||
_MYVNC_PROXYPATH=$(echo ${MYVNC_PROXYPATH%/} | sed "s|^.*/||;s|^|/|")
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add novnc virtual proxy conf
|
|
||||||
cat >/app/nginx/novnc.conf <<- novnc
|
|
||||||
upstream vnc_proxy {
|
|
||||||
server 127.0.0.1:6080;
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 6900;
|
|
||||||
|
|
||||||
location ${_MYVNC_PROXYPATH}/websockify {
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_pass http://vnc_proxy/;
|
|
||||||
proxy_set_header Upgrade \$http_upgrade;
|
|
||||||
proxy_set_header Connection "upgrade";
|
|
||||||
|
|
||||||
# VNC connection timeout
|
|
||||||
proxy_read_timeout 3600s;
|
|
||||||
proxy_send_timeout 3600s;
|
|
||||||
|
|
||||||
# Disable cache
|
|
||||||
proxy_buffering off;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ${_MYVNC_PROXYPATH}/ {
|
|
||||||
index vnc.html;
|
|
||||||
alias /app/novnc/;
|
|
||||||
try_files \$uri \$uri/ /vnc.html;
|
|
||||||
|
|
||||||
# In the location block related to noVNC
|
|
||||||
add_header Cache-Control no-cache;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
novnc
|
|
||||||
|
|
||||||
# Start nginx
|
|
||||||
sudo /usr/bin/nginx -g "daemon off;" &
|
|
||||||
10-nginx.sh
|
|
||||||
|
|
||||||
## Docker entrypoint
|
|
||||||
cat >docker-entrypoint.sh <<- 'docker-entrypoint.sh'
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
# Export all variables
|
|
||||||
set -a
|
|
||||||
|
|
||||||
# Abort if an error is encountered
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# SSH config
|
|
||||||
if [ -f ~/.ssh/id_ed25519 ]
|
|
||||||
then
|
|
||||||
chmod 0600 ~/.ssh/id_ed25519
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Run all scripts in init folder
|
|
||||||
for file in /app/init.d/*.sh
|
|
||||||
do
|
|
||||||
/usr/bin/bash -c ${file} >>/app/logs/$(echo ${file} | sed 's|/app/init.d/||;s|\.sh$||').log
|
|
||||||
done
|
|
||||||
|
|
||||||
# Read cli parameters
|
|
||||||
exec "${@}" &
|
|
||||||
|
|
||||||
# Monitor log
|
|
||||||
tail -f /app/logs/*.log
|
|
||||||
docker-entrypoint.sh
|
|
||||||
|
|
||||||
## Fetch latest mirrorlist
|
|
||||||
curl --fail --silent https://myvelabs.com/lab/archlinux/raw/branch/master/mirrorlist -o mirrorlist
|
|
||||||
|
|
||||||
## Docker build
|
|
||||||
# eg, ARCHPKG=openssh
|
|
||||||
# eg, BUILDTAG=base
|
|
||||||
DOCKER_BUILDKIT=1 docker build ./. \
|
|
||||||
--build-arg pkg=${ARCHPKG:-""} \
|
|
||||||
--tag myvnc/${BUILDTAG:-base} \
|
|
||||||
&& rm -f Dockerfile *.sh mirrorlist
|
|
||||||
59
base/Dockerfile
Normal file
59
base/Dockerfile
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
# syntax = docker/dockerfile:1.2
|
||||||
|
FROM quay.io/archlinux/archlinux:base-devel
|
||||||
|
USER root
|
||||||
|
|
||||||
|
# Docker ENV variables
|
||||||
|
# # Required
|
||||||
|
# ENV MYVNC_VNCPASS
|
||||||
|
# # Optional
|
||||||
|
# ENV MYVNC_CUSTOM_TITLE
|
||||||
|
# ENV MYVNC_PROXYPATH (eg, "/subpath/" or "/subpath")
|
||||||
|
# ENV MYVNC_VNCSHARING (eg, "true" to allow sharing (defaults to "false"))
|
||||||
|
# ENV MYVNC_VNCSERVER_HOST (eg, localhost or 192.168.1.1)
|
||||||
|
# ENV MYVNC_VNCSERVER_PORT (eg, 5900)
|
||||||
|
|
||||||
|
# Build ARG for additional pacman packages to install (eg, openssh)
|
||||||
|
ARG pkg
|
||||||
|
|
||||||
|
# Install packages
|
||||||
|
COPY mirrorlist /etc/pacman.d/mirrorlist
|
||||||
|
RUN pacman-key --init \
|
||||||
|
&& sed -i '/ParallelDownloads/c ParallelDownloads = 10' /etc/pacman.conf \
|
||||||
|
&& pacman -Sy --ask 4 archlinux-keyring \
|
||||||
|
&& pacman -Su --ask 4 --needed \
|
||||||
|
sudo bash-completion ${pkg} \
|
||||||
|
inetutils python-numpy python-setuptools \
|
||||||
|
nginx-mainline \
|
||||||
|
&& pacman -Scc --ask 4 \
|
||||||
|
&& useradd --create-home --gid users --shell /usr/bin/bash user \
|
||||||
|
&& echo 'user ALL=(ALL:ALL) NOPASSWD: MISCELLANEOUS, /usr/bin/nginx' >/etc/sudoers.d/zz-DOCKER \
|
||||||
|
&& echo 'Defaults lecture = never' >>/etc/sudoers.d/zz-DOCKER \
|
||||||
|
&& passwd -l root >/dev/null 2>&1 \
|
||||||
|
&& sed '/^http {/a\ \
|
||||||
|
include /app/nginx/\*.conf;\n\ \
|
||||||
|
types_hash_max_size 4096;\n\ \
|
||||||
|
server_names_hash_bucket_size 128;\n' -i /etc/nginx/nginx.conf \
|
||||||
|
&& mkdir -p /app/init.d /app/nginx /app/logs
|
||||||
|
|
||||||
|
# Install noVNC
|
||||||
|
COPY novnc /app/novnc
|
||||||
|
|
||||||
|
# Install all init scripts
|
||||||
|
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||||
|
COPY 01-init.sh 10-novnc.sh 10-nginx.sh /app/init.d/
|
||||||
|
|
||||||
|
# Proper permissions
|
||||||
|
RUN chmod +x /docker-entrypoint.sh /app/init.d/* \
|
||||||
|
&& chown -R user:users /app
|
||||||
|
|
||||||
|
# Default environment
|
||||||
|
USER user
|
||||||
|
WORKDIR /home/user
|
||||||
|
ENV DISPLAY=:0
|
||||||
|
ENV SHELL=/usr/bin/bash
|
||||||
|
|
||||||
|
# Expose nginx port for VNC webui
|
||||||
|
EXPOSE 6900
|
||||||
|
|
||||||
|
# Docker entrypoint
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
24
base/app/entrypoint
Executable file
24
base/app/entrypoint
Executable file
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Export all variables
|
||||||
|
set -a
|
||||||
|
|
||||||
|
# Abort if an error is encountered
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# SSH config
|
||||||
|
if [ -f ~/.ssh/id_ed25519 ]
|
||||||
|
then
|
||||||
|
chmod 0600 ~/.ssh/id_ed25519
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Run all scripts in init folder
|
||||||
|
for file in /app/init.d/*.sh
|
||||||
|
do
|
||||||
|
/usr/bin/bash -c ${file} >>/app/logs/$(echo ${file} | sed 's|/app/init.d/||;s|\.sh$||').log
|
||||||
|
done
|
||||||
|
|
||||||
|
# Read cli parameters
|
||||||
|
exec "${@}" &
|
||||||
|
|
||||||
|
# Monitor log
|
||||||
|
tail -f /app/logs/*.log
|
||||||
6
base/app/init.d/01-init.sh
Executable file
6
base/app/init.d/01-init.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Create base directories
|
||||||
|
for dir in vnc config ssh
|
||||||
|
do
|
||||||
|
[ -d ~/.${dir} ] || mkdir -p ~/.${dir}
|
||||||
|
done
|
||||||
46
base/app/init.d/10-nginx.sh
Executable file
46
base/app/init.d/10-nginx.sh
Executable file
|
|
@ -0,0 +1,46 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Reformat path
|
||||||
|
if [[ ${MYVNC_PROXYPATH} == "/" ]]
|
||||||
|
then
|
||||||
|
unset _MYVNC_PROXYPATH
|
||||||
|
elif [ ${MYVNC_PROXYPATH} ]
|
||||||
|
then
|
||||||
|
_MYVNC_PROXYPATH=$(echo ${MYVNC_PROXYPATH%/} | sed "s|^.*/||;s|^|/|")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add novnc virtual proxy conf
|
||||||
|
cat >/app/nginx/novnc.conf <<- novnc
|
||||||
|
upstream vnc_proxy {
|
||||||
|
server 127.0.0.1:6080;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 6900;
|
||||||
|
|
||||||
|
location ${_MYVNC_PROXYPATH}/websockify {
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_pass http://vnc_proxy/;
|
||||||
|
proxy_set_header Upgrade \$http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
||||||
|
# VNC connection timeout
|
||||||
|
proxy_read_timeout 3600s;
|
||||||
|
proxy_send_timeout 3600s;
|
||||||
|
|
||||||
|
# Disable cache
|
||||||
|
proxy_buffering off;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ${_MYVNC_PROXYPATH}/ {
|
||||||
|
index vnc.html;
|
||||||
|
alias /app/novnc/;
|
||||||
|
try_files \$uri \$uri/ /vnc.html;
|
||||||
|
|
||||||
|
# In the location block related to noVNC
|
||||||
|
add_header Cache-Control no-cache;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
novnc
|
||||||
|
|
||||||
|
# Start nginx
|
||||||
|
sudo /usr/bin/nginx -g "daemon off;" &
|
||||||
36
base/app/init.d/10-novnc.sh
Executable file
36
base/app/init.d/10-novnc.sh
Executable file
|
|
@ -0,0 +1,36 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Turn vnc sharing on/off
|
||||||
|
if [[ ${MYVNC_VNCSHARING} == "true" ]] || [[ ${MYVNC_VNCSHARING} == "1" ]]
|
||||||
|
then
|
||||||
|
_MYVNC_VNCSHARING=true
|
||||||
|
else
|
||||||
|
_MYVNC_VNCSHARING=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Always default to remote scaling
|
||||||
|
sed -i "/UI.initSetting\|resize/ s/resize', '.*');/resize', 'scale');/" /app/novnc/app/ui.js
|
||||||
|
|
||||||
|
# Always default to autoconnect=true
|
||||||
|
sed -i "/let autoconnect/ s/autoconnect', .*);/autoconnect', true);/" /app/novnc/app/ui.js
|
||||||
|
|
||||||
|
# Change vnc shared view settings (defaults to false/off)
|
||||||
|
sed -i "/UI.initSetting\|shared/ s/shared', .*);/shared', ${_MYVNC_VNCSHARING});/" /app/novnc/app/ui.js
|
||||||
|
|
||||||
|
# NoVNC custom title
|
||||||
|
sed -i "/<title>noVNC<\/title>/ s/noVNC/${MYVNC_CUSTOM_TITLE:-noVNC}/g" /app/novnc/*.html
|
||||||
|
|
||||||
|
# Apply subpath to websocket
|
||||||
|
if [[ ${MYVNC_PROXYPATH} == "/" ]]
|
||||||
|
then
|
||||||
|
unset _MYVNC_PROXYPATH
|
||||||
|
elif [ ${MYVNC_PROXYPATH} ]
|
||||||
|
then
|
||||||
|
_MYVNC_PROXYPATH=$(echo ${MYVNC_PROXYPATH%/} | sed "s|^.*/||")
|
||||||
|
sed -i "/UI.initSetting/ s|websockify|${_MYVNC_PROXYPATH}/&|" /app/novnc/app/ui.js
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Start NoVNC
|
||||||
|
/app/novnc/utils/novnc_proxy \
|
||||||
|
--listen 6080 \
|
||||||
|
--vnc ${MYVNC_VNCSERVER_HOST:-localhost}:${MYVNC_VNCSERVER_PORT:-5900} \
|
||||||
|
--file-only &
|
||||||
34
base/app/novnc/.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
34
base/app/novnc/.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Client (please complete the following information):**
|
||||||
|
- OS: [e.g. iOS]
|
||||||
|
- Browser: [e.g. chrome, safari]
|
||||||
|
- Browser version: [e.g. 22]
|
||||||
|
|
||||||
|
**Server (please complete the following information):**
|
||||||
|
- noVNC version: [e.g. 1.0.0 or git commit id]
|
||||||
|
- VNC server: [e.g. QEMU, TigerVNC]
|
||||||
|
- WebSocket proxy: [e.g. websockify]
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
||||||
5
base/app/novnc/.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
base/app/novnc/.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: Question or discussion
|
||||||
|
url: https://groups.google.com/forum/?fromgroups#!forum/novnc
|
||||||
|
about: Ask a question or start a discussion
|
||||||
17
base/app/novnc/.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
17
base/app/novnc/.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
||||||
97
base/app/novnc/.github/workflows/deploy.yml
vendored
Normal file
97
base/app/novnc/.github/workflows/deploy.yml
vendored
Normal file
|
|
@ -0,0 +1,97 @@
|
||||||
|
name: Publish
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
npm:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: |
|
||||||
|
GITREV=$(git rev-parse --short HEAD)
|
||||||
|
echo $GITREV
|
||||||
|
sed -i "s/^\(.*\"version\".*\)\"\([^\"]\+\)\"\(.*\)\$/\1\"\2-g$GITREV\"\3/" package.json
|
||||||
|
if: github.event_name != 'release'
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
# Needs to be explicitly specified for auth to work
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
- run: npm install
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: npm
|
||||||
|
path: lib
|
||||||
|
- run: npm publish --access public
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||||
|
if: |
|
||||||
|
github.repository == 'novnc/noVNC' &&
|
||||||
|
github.event_name == 'release' &&
|
||||||
|
!github.event.release.prerelease
|
||||||
|
- run: npm publish --access public --tag beta
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||||
|
if: |
|
||||||
|
github.repository == 'novnc/noVNC' &&
|
||||||
|
github.event_name == 'release' &&
|
||||||
|
github.event.release.prerelease
|
||||||
|
- run: npm publish --access public --tag dev
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||||
|
if: |
|
||||||
|
github.repository == 'novnc/noVNC' &&
|
||||||
|
github.event_name == 'push' &&
|
||||||
|
github.event.ref == 'refs/heads/master'
|
||||||
|
snap:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: |
|
||||||
|
GITREV=$(git rev-parse --short HEAD)
|
||||||
|
echo $GITREV
|
||||||
|
sed -i "s/^\(.*\"version\".*\)\"\([^\"]\+\)\"\(.*\)\$/\1\"\2-g$GITREV\"\3/" package.json
|
||||||
|
if: github.event_name != 'release'
|
||||||
|
- run: |
|
||||||
|
VERSION=$(grep '"version"' package.json | cut -d '"' -f 4)
|
||||||
|
echo $VERSION
|
||||||
|
sed -i "s/^version:.*/version: '$VERSION'/" snap/snapcraft.yaml
|
||||||
|
- uses: snapcore/action-build@v1
|
||||||
|
id: snapcraft
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: snap
|
||||||
|
path: ${{ steps.snapcraft.outputs.snap }}
|
||||||
|
- uses: snapcore/action-publish@v1
|
||||||
|
with:
|
||||||
|
snap: ${{ steps.snapcraft.outputs.snap }}
|
||||||
|
release: stable
|
||||||
|
env:
|
||||||
|
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_LOGIN }}
|
||||||
|
if: |
|
||||||
|
github.repository == 'novnc/noVNC' &&
|
||||||
|
github.event_name == 'release' &&
|
||||||
|
!github.event.release.prerelease
|
||||||
|
- uses: snapcore/action-publish@v1
|
||||||
|
with:
|
||||||
|
snap: ${{ steps.snapcraft.outputs.snap }}
|
||||||
|
release: beta
|
||||||
|
env:
|
||||||
|
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_LOGIN }}
|
||||||
|
if: |
|
||||||
|
github.repository == 'novnc/noVNC' &&
|
||||||
|
github.event_name == 'release' &&
|
||||||
|
github.event.release.prerelease
|
||||||
|
- uses: snapcore/action-publish@v1
|
||||||
|
with:
|
||||||
|
snap: ${{ steps.snapcraft.outputs.snap }}
|
||||||
|
release: edge
|
||||||
|
env:
|
||||||
|
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_LOGIN }}
|
||||||
|
if: |
|
||||||
|
github.repository == 'novnc/noVNC' &&
|
||||||
|
github.event_name == 'push' &&
|
||||||
|
github.event.ref == 'refs/heads/master'
|
||||||
19
base/app/novnc/.github/workflows/lint.yml
vendored
Normal file
19
base/app/novnc/.github/workflows/lint.yml
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
name: Lint
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
eslint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
- run: npm update
|
||||||
|
- run: npm run lint
|
||||||
|
html:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
- run: npm update
|
||||||
|
- run: git ls-tree --name-only -r HEAD | grep -E "[.](html|css)$" | xargs ./utils/validate
|
||||||
28
base/app/novnc/.github/workflows/test.yml
vendored
Normal file
28
base/app/novnc/.github/workflows/test.yml
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
name: Test
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-latest
|
||||||
|
- windows-latest
|
||||||
|
browser:
|
||||||
|
- ChromeHeadless
|
||||||
|
- FirefoxHeadless
|
||||||
|
include:
|
||||||
|
- os: macos-latest
|
||||||
|
browser: Safari
|
||||||
|
- os: windows-latest
|
||||||
|
browser: EdgeHeadless
|
||||||
|
fail-fast: false
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
- run: npm update
|
||||||
|
- run: npm run test
|
||||||
|
env:
|
||||||
|
TEST_BROWSER_NAME: ${{ matrix.browser }}
|
||||||
15
base/app/novnc/.github/workflows/translate.yml
vendored
Normal file
15
base/app/novnc/.github/workflows/translate.yml
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
name: Translate
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
translate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
- run: npm update
|
||||||
|
- run: sudo apt-get install gettext
|
||||||
|
- run: make -C po update-pot
|
||||||
|
- run: make -C po update-po
|
||||||
|
- run: make -C po update-js
|
||||||
12
base/app/novnc/.gitignore
vendored
Normal file
12
base/app/novnc/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
*.pyc
|
||||||
|
*.o
|
||||||
|
tests/data_*.js
|
||||||
|
utils/rebind.so
|
||||||
|
utils/websockify
|
||||||
|
/node_modules
|
||||||
|
/build
|
||||||
|
/lib
|
||||||
|
recordings
|
||||||
|
*.swp
|
||||||
|
*~
|
||||||
|
noVNC-*.tgz
|
||||||
0
base/app/novnc/.gitmodules
vendored
Normal file
0
base/app/novnc/.gitmodules
vendored
Normal file
13
base/app/novnc/AUTHORS
Normal file
13
base/app/novnc/AUTHORS
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
maintainers:
|
||||||
|
- Samuel Mannehed for Cendio AB (@samhed)
|
||||||
|
- Pierre Ossman for Cendio AB (@CendioOssman)
|
||||||
|
maintainersEmeritus:
|
||||||
|
- Joel Martin (@kanaka)
|
||||||
|
- Solly Ross (@directxman12)
|
||||||
|
- @astrand
|
||||||
|
contributors:
|
||||||
|
# There are a bunch of people that should be here.
|
||||||
|
# If you want to be on this list, feel free send a PR
|
||||||
|
# to add yourself.
|
||||||
|
- jalf <git@jalf.dk>
|
||||||
|
- NTT corp.
|
||||||
62
base/app/novnc/LICENSE.txt
Normal file
62
base/app/novnc/LICENSE.txt
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
noVNC is Copyright (C) 2022 The noVNC Authors
|
||||||
|
(./AUTHORS)
|
||||||
|
|
||||||
|
The noVNC core library files are licensed under the MPL 2.0 (Mozilla
|
||||||
|
Public License 2.0). The noVNC core library is composed of the
|
||||||
|
Javascript code necessary for full noVNC operation. This includes (but
|
||||||
|
is not limited to):
|
||||||
|
|
||||||
|
core/**/*.js
|
||||||
|
app/*.js
|
||||||
|
test/playback.js
|
||||||
|
|
||||||
|
The HTML, CSS, font and images files that included with the noVNC
|
||||||
|
source distibution (or repository) are not considered part of the
|
||||||
|
noVNC core library and are licensed under more permissive licenses.
|
||||||
|
The intent is to allow easy integration of noVNC into existing web
|
||||||
|
sites and web applications.
|
||||||
|
|
||||||
|
The HTML, CSS, font and image files are licensed as follows:
|
||||||
|
|
||||||
|
*.html : 2-Clause BSD license
|
||||||
|
|
||||||
|
app/styles/*.css : 2-Clause BSD license
|
||||||
|
|
||||||
|
app/styles/Orbitron* : SIL Open Font License 1.1
|
||||||
|
(Copyright 2009 Matt McInerney)
|
||||||
|
|
||||||
|
app/images/ : Creative Commons Attribution-ShareAlike
|
||||||
|
http://creativecommons.org/licenses/by-sa/3.0/
|
||||||
|
|
||||||
|
Some portions of noVNC are copyright to their individual authors.
|
||||||
|
Please refer to the individual source files and/or to the noVNC commit
|
||||||
|
history: https://github.com/novnc/noVNC/commits/master
|
||||||
|
|
||||||
|
The are several files and projects that have been incorporated into
|
||||||
|
the noVNC core library. Here is a list of those files and the original
|
||||||
|
licenses (all MPL 2.0 compatible):
|
||||||
|
|
||||||
|
core/base64.js : MPL 2.0
|
||||||
|
|
||||||
|
core/des.js : Various BSD style licenses
|
||||||
|
|
||||||
|
vendor/pako/ : MIT
|
||||||
|
|
||||||
|
Any other files not mentioned above are typically marked with
|
||||||
|
a copyright/license header at the top of the file. The default noVNC
|
||||||
|
license is MPL-2.0.
|
||||||
|
|
||||||
|
The following license texts are included:
|
||||||
|
|
||||||
|
docs/LICENSE.MPL-2.0
|
||||||
|
docs/LICENSE.OFL-1.1
|
||||||
|
docs/LICENSE.BSD-3-Clause (New BSD)
|
||||||
|
docs/LICENSE.BSD-2-Clause (Simplified BSD / FreeBSD)
|
||||||
|
vendor/pako/LICENSE (MIT)
|
||||||
|
|
||||||
|
Or alternatively the license texts may be found here:
|
||||||
|
|
||||||
|
http://www.mozilla.org/MPL/2.0/
|
||||||
|
http://scripts.sil.org/OFL
|
||||||
|
http://en.wikipedia.org/wiki/BSD_licenses
|
||||||
|
https://opensource.org/licenses/MIT
|
||||||
227
base/app/novnc/README.md
Normal file
227
base/app/novnc/README.md
Normal file
|
|
@ -0,0 +1,227 @@
|
||||||
|
## noVNC: HTML VNC Client Library and Application
|
||||||
|
|
||||||
|
[](https://github.com/novnc/noVNC/actions?query=workflow%3ATest)
|
||||||
|
[](https://github.com/novnc/noVNC/actions?query=workflow%3ALint)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
|
||||||
|
noVNC is both a HTML VNC client JavaScript library and an application built on
|
||||||
|
top of that library. noVNC runs well in any modern browser including mobile
|
||||||
|
browsers (iOS and Android).
|
||||||
|
|
||||||
|
Many companies, projects and products have integrated noVNC including
|
||||||
|
[OpenStack](http://www.openstack.org),
|
||||||
|
[OpenNebula](http://opennebula.org/),
|
||||||
|
[LibVNCServer](http://libvncserver.sourceforge.net), and
|
||||||
|
[ThinLinc](https://cendio.com/thinlinc). See
|
||||||
|
[the Projects and Companies wiki page](https://github.com/novnc/noVNC/wiki/Projects-and-companies-using-noVNC)
|
||||||
|
for a more complete list with additional info and links.
|
||||||
|
|
||||||
|
### Table of Contents
|
||||||
|
|
||||||
|
- [News/help/contact](#newshelpcontact)
|
||||||
|
- [Features](#features)
|
||||||
|
- [Screenshots](#screenshots)
|
||||||
|
- [Browser Requirements](#browser-requirements)
|
||||||
|
- [Server Requirements](#server-requirements)
|
||||||
|
- [Quick Start](#quick-start)
|
||||||
|
- [Installation from Snap Package](#installation-from-snap-package)
|
||||||
|
- [Integration and Deployment](#integration-and-deployment)
|
||||||
|
- [Authors/Contributors](#authorscontributors)
|
||||||
|
|
||||||
|
### News/help/contact
|
||||||
|
|
||||||
|
The project website is found at [novnc.com](http://novnc.com).
|
||||||
|
|
||||||
|
If you are a noVNC developer/integrator/user (or want to be) please join the
|
||||||
|
[noVNC discussion group](https://groups.google.com/forum/?fromgroups#!forum/novnc).
|
||||||
|
|
||||||
|
Bugs and feature requests can be submitted via
|
||||||
|
[github issues](https://github.com/novnc/noVNC/issues). If you have questions
|
||||||
|
about using noVNC then please first use the
|
||||||
|
[discussion group](https://groups.google.com/forum/?fromgroups#!forum/novnc).
|
||||||
|
We also have a [wiki](https://github.com/novnc/noVNC/wiki/) with lots of
|
||||||
|
helpful information.
|
||||||
|
|
||||||
|
If you are looking for a place to start contributing to noVNC, a good place to
|
||||||
|
start would be the issues that are marked as
|
||||||
|
["patchwelcome"](https://github.com/novnc/noVNC/issues?labels=patchwelcome).
|
||||||
|
Please check our
|
||||||
|
[contribution guide](https://github.com/novnc/noVNC/wiki/Contributing) though.
|
||||||
|
|
||||||
|
If you want to show appreciation for noVNC you could donate to a great non-
|
||||||
|
profits such as:
|
||||||
|
[Compassion International](http://www.compassion.com/),
|
||||||
|
[SIL](http://www.sil.org),
|
||||||
|
[Habitat for Humanity](http://www.habitat.org),
|
||||||
|
[Electronic Frontier Foundation](https://www.eff.org/),
|
||||||
|
[Against Malaria Foundation](http://www.againstmalaria.com/),
|
||||||
|
[Nothing But Nets](http://www.nothingbutnets.net/), etc.
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Supports all modern browsers including mobile (iOS, Android)
|
||||||
|
* Supported authentication methods: none, classical VNC, RealVNC's
|
||||||
|
RSA-AES, Tight, VeNCrypt Plain, XVP, Apple's Diffie-Hellman,
|
||||||
|
UltraVNC's MSLogonII
|
||||||
|
* Supported VNC encodings: raw, copyrect, rre, hextile, tight, tightPNG,
|
||||||
|
ZRLE, JPEG
|
||||||
|
* Supports scaling, clipping and resizing the desktop
|
||||||
|
* Local cursor rendering
|
||||||
|
* Clipboard copy/paste with full Unicode support
|
||||||
|
* Translations
|
||||||
|
* Touch gestures for emulating common mouse actions
|
||||||
|
* Licensed mainly under the [MPL 2.0](http://www.mozilla.org/MPL/2.0/), see
|
||||||
|
[the license document](LICENSE.txt) for details
|
||||||
|
|
||||||
|
### Screenshots
|
||||||
|
|
||||||
|
Running in Firefox before and after connecting:
|
||||||
|
|
||||||
|
<img src="http://novnc.com/img/noVNC-1-login.png" width=400>
|
||||||
|
<img src="http://novnc.com/img/noVNC-3-connected.png" width=400>
|
||||||
|
|
||||||
|
See more screenshots
|
||||||
|
[here](http://novnc.com/screenshots.html).
|
||||||
|
|
||||||
|
|
||||||
|
### Browser Requirements
|
||||||
|
|
||||||
|
noVNC uses many modern web technologies so a formal requirement list is
|
||||||
|
not available. However these are the minimum versions we are currently
|
||||||
|
aware of:
|
||||||
|
|
||||||
|
* Chrome 64, Firefox 79, Safari 13.4, Opera 51, Edge 79
|
||||||
|
|
||||||
|
|
||||||
|
### Server Requirements
|
||||||
|
|
||||||
|
noVNC follows the standard VNC protocol, but unlike other VNC clients it does
|
||||||
|
require WebSockets support. Many servers include support (e.g.
|
||||||
|
[x11vnc/libvncserver](http://libvncserver.sourceforge.net/),
|
||||||
|
[QEMU](http://www.qemu.org/), and
|
||||||
|
[MobileVNC](http://www.smartlab.at/mobilevnc/)), but for the others you need to
|
||||||
|
use a WebSockets to TCP socket proxy. noVNC has a sister project
|
||||||
|
[websockify](https://github.com/novnc/websockify) that provides a simple such
|
||||||
|
proxy.
|
||||||
|
|
||||||
|
|
||||||
|
### Quick Start
|
||||||
|
|
||||||
|
* Use the `novnc_proxy` script to automatically download and start websockify, which
|
||||||
|
includes a mini-webserver and the WebSockets proxy. The `--vnc` option is
|
||||||
|
used to specify the location of a running VNC server:
|
||||||
|
|
||||||
|
`./utils/novnc_proxy --vnc localhost:5901`
|
||||||
|
|
||||||
|
* If you don't need to expose the web server to public internet, you can
|
||||||
|
bind to localhost:
|
||||||
|
|
||||||
|
`./utils/novnc_proxy --vnc localhost:5901 --listen localhost:6081`
|
||||||
|
|
||||||
|
* Point your browser to the cut-and-paste URL that is output by the `novnc_proxy`
|
||||||
|
script. Hit the Connect button, enter a password if the VNC server has one
|
||||||
|
configured, and enjoy!
|
||||||
|
|
||||||
|
### Installation from Snap Package
|
||||||
|
Running the command below will install the latest release of noVNC from Snap:
|
||||||
|
|
||||||
|
`sudo snap install novnc`
|
||||||
|
|
||||||
|
#### Running noVNC from Snap Directly
|
||||||
|
|
||||||
|
You can run the Snap-package installed novnc directly with, for example:
|
||||||
|
|
||||||
|
`novnc --listen 6081 --vnc localhost:5901 # /snap/bin/novnc if /snap/bin is not in your PATH`
|
||||||
|
|
||||||
|
If you want to use certificate files, due to standard Snap confinement restrictions you need to have them in the /home/\<user\>/snap/novnc/current/ directory. If your username is jsmith an example command would be:
|
||||||
|
|
||||||
|
`novnc --listen 8443 --cert ~jsmith/snap/novnc/current/self.crt --key ~jsmith/snap/novnc/current/self.key --vnc ubuntu.example.com:5901`
|
||||||
|
|
||||||
|
#### Running noVNC from Snap as a Service (Daemon)
|
||||||
|
The Snap package also has the capability to run a 'novnc' service which can be
|
||||||
|
configured to listen on multiple ports connecting to multiple VNC servers
|
||||||
|
(effectively a service runing multiple instances of novnc).
|
||||||
|
Instructions (with example values):
|
||||||
|
|
||||||
|
List current services (out-of-box this will be blank):
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo snap get novnc services
|
||||||
|
Key Value
|
||||||
|
services.n6080 {...}
|
||||||
|
services.n6081 {...}
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a new service that listens on port 6082 and connects to the VNC server
|
||||||
|
running on port 5902 on localhost:
|
||||||
|
|
||||||
|
`sudo snap set novnc services.n6082.listen=6082 services.n6082.vnc=localhost:5902`
|
||||||
|
|
||||||
|
(Any services you define with 'snap set' will be automatically started)
|
||||||
|
Note that the name of the service, 'n6082' in this example, can be anything
|
||||||
|
as long as it doesn't start with a number or contain spaces/special characters.
|
||||||
|
|
||||||
|
View the configuration of the service just created:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo snap get novnc services.n6082
|
||||||
|
Key Value
|
||||||
|
services.n6082.listen 6082
|
||||||
|
services.n6082.vnc localhost:5902
|
||||||
|
```
|
||||||
|
|
||||||
|
Disable a service (note that because of a limitation in Snap it's currently not
|
||||||
|
possible to unset config variables, setting them to blank values is the way
|
||||||
|
to disable a service):
|
||||||
|
|
||||||
|
`sudo snap set novnc services.n6082.listen='' services.n6082.vnc=''`
|
||||||
|
|
||||||
|
(Any services you set to blank with 'snap set' like this will be automatically stopped)
|
||||||
|
|
||||||
|
Verify that the service is disabled (blank values):
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo snap get novnc services.n6082
|
||||||
|
Key Value
|
||||||
|
services.n6082.listen
|
||||||
|
services.n6082.vnc
|
||||||
|
```
|
||||||
|
|
||||||
|
### Integration and Deployment
|
||||||
|
|
||||||
|
Please see our other documents for how to integrate noVNC in your own software,
|
||||||
|
or deploying the noVNC application in production environments:
|
||||||
|
|
||||||
|
* [Embedding](docs/EMBEDDING.md) - For the noVNC application
|
||||||
|
* [Library](docs/LIBRARY.md) - For the noVNC JavaScript library
|
||||||
|
|
||||||
|
|
||||||
|
### Authors/Contributors
|
||||||
|
|
||||||
|
See [AUTHORS](AUTHORS) for a (full-ish) list of authors. If you're not on
|
||||||
|
that list and you think you should be, feel free to send a PR to fix that.
|
||||||
|
|
||||||
|
* Core team:
|
||||||
|
* [Samuel Mannehed](https://github.com/samhed) (Cendio)
|
||||||
|
* [Pierre Ossman](https://github.com/CendioOssman) (Cendio)
|
||||||
|
|
||||||
|
* Previous core contributors:
|
||||||
|
* [Joel Martin](https://github.com/kanaka) (Project founder)
|
||||||
|
* [Solly Ross](https://github.com/DirectXMan12) (Red Hat / OpenStack)
|
||||||
|
|
||||||
|
* Notable contributions:
|
||||||
|
* UI and Icons : Pierre Ossman, Chris Gordon
|
||||||
|
* Original Logo : Michael Sersen
|
||||||
|
* tight encoding : Michael Tinglof (Mercuri.ca)
|
||||||
|
* RealVNC RSA AES authentication : USTC Vlab Team
|
||||||
|
|
||||||
|
* Included libraries:
|
||||||
|
* base64 : Martijn Pieters (Digital Creations 2), Samuel Sieb (sieb.net)
|
||||||
|
* DES : Dave Zimmerman (Widget Workshop), Jef Poskanzer (ACME Labs)
|
||||||
|
* Pako : Vitaly Puzrin (https://github.com/nodeca/pako)
|
||||||
|
|
||||||
|
Do you want to be on this list? Check out our
|
||||||
|
[contribution guide](https://github.com/novnc/noVNC/wiki/Contributing) and
|
||||||
|
start hacking!
|
||||||
79
base/app/novnc/app/error-handler.js
Normal file
79
base/app/novnc/app/error-handler.js
Normal file
|
|
@ -0,0 +1,79 @@
|
||||||
|
/*
|
||||||
|
* noVNC: HTML5 VNC client
|
||||||
|
* Copyright (C) 2019 The noVNC Authors
|
||||||
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
||||||
|
*
|
||||||
|
* See README.md for usage and integration instructions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Fallback for all uncought errors
|
||||||
|
function handleError(event, err) {
|
||||||
|
try {
|
||||||
|
const msg = document.getElementById('noVNC_fallback_errormsg');
|
||||||
|
|
||||||
|
// Work around Firefox bug:
|
||||||
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=1685038
|
||||||
|
if (event.message === "ResizeObserver loop completed with undelivered notifications.") {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only show the initial error
|
||||||
|
if (msg.hasChildNodes()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let div = document.createElement("div");
|
||||||
|
div.classList.add('noVNC_message');
|
||||||
|
div.appendChild(document.createTextNode(event.message));
|
||||||
|
msg.appendChild(div);
|
||||||
|
|
||||||
|
if (event.filename) {
|
||||||
|
div = document.createElement("div");
|
||||||
|
div.className = 'noVNC_location';
|
||||||
|
let text = event.filename;
|
||||||
|
if (event.lineno !== undefined) {
|
||||||
|
text += ":" + event.lineno;
|
||||||
|
if (event.colno !== undefined) {
|
||||||
|
text += ":" + event.colno;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
div.appendChild(document.createTextNode(text));
|
||||||
|
msg.appendChild(div);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (err && err.stack) {
|
||||||
|
div = document.createElement("div");
|
||||||
|
div.className = 'noVNC_stack';
|
||||||
|
div.appendChild(document.createTextNode(err.stack));
|
||||||
|
msg.appendChild(div);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById('noVNC_fallback_error')
|
||||||
|
.classList.add("noVNC_open");
|
||||||
|
|
||||||
|
} catch (exc) {
|
||||||
|
document.write("noVNC encountered an error.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Try to disable keyboard interaction, best effort
|
||||||
|
try {
|
||||||
|
// Remove focus from the currently focused element in order to
|
||||||
|
// prevent keyboard interaction from continuing
|
||||||
|
if (document.activeElement) { document.activeElement.blur(); }
|
||||||
|
|
||||||
|
// Don't let any element be focusable when showing the error
|
||||||
|
let keyboardFocusable = 'a[href], button, input, textarea, select, details, [tabindex]';
|
||||||
|
document.querySelectorAll(keyboardFocusable).forEach((elem) => {
|
||||||
|
elem.setAttribute("tabindex", "-1");
|
||||||
|
});
|
||||||
|
} catch (exc) {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
// Don't return true since this would prevent the error
|
||||||
|
// from being printed to the browser console.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('error', evt => handleError(evt, evt.error));
|
||||||
|
window.addEventListener('unhandledrejection', evt => handleError(evt.reason, evt.reason));
|
||||||
92
base/app/novnc/app/images/alt.svg
Normal file
92
base/app/novnc/app/images/alt.svg
Normal file
|
|
@ -0,0 +1,92 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="25"
|
||||||
|
height="25"
|
||||||
|
viewBox="0 0 25 25"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.91 r13725"
|
||||||
|
sodipodi:docname="alt.svg"
|
||||||
|
inkscape:export-filename="/home/ossman/devel/noVNC/images/drag.png"
|
||||||
|
inkscape:export-xdpi="90"
|
||||||
|
inkscape:export-ydpi="90">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#959595"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="16"
|
||||||
|
inkscape:cx="18.205425"
|
||||||
|
inkscape:cy="17.531398"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
units="px"
|
||||||
|
inkscape:snap-bbox="true"
|
||||||
|
inkscape:bbox-paths="true"
|
||||||
|
inkscape:bbox-nodes="true"
|
||||||
|
inkscape:snap-bbox-edge-midpoints="true"
|
||||||
|
inkscape:object-paths="true"
|
||||||
|
showguides="true"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1136"
|
||||||
|
inkscape:window-x="1920"
|
||||||
|
inkscape:window-y="27"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:snap-smooth-nodes="true"
|
||||||
|
inkscape:object-nodes="true"
|
||||||
|
inkscape:snap-intersection-paths="true"
|
||||||
|
inkscape:snap-nodes="true"
|
||||||
|
inkscape:snap-global="true">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid4136" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-1027.3622)">
|
||||||
|
<g
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:48px;line-height:125%;font-family:'DejaVu Sans';-inkscape-font-specification:'Sans Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
id="text5290">
|
||||||
|
<path
|
||||||
|
d="m 9.9560547,1042.3329 -2.9394531,0 -0.4638672,1.3281 -1.8896485,0 2.7001953,-7.29 2.241211,0 2.7001958,7.29 -1.889649,0 -0.4589843,-1.3281 z m -2.4707031,-1.3526 1.9970703,0 -0.9960938,-2.9003 -1.0009765,2.9003 z"
|
||||||
|
style="font-size:10px;fill:#ffffff;fill-opacity:1"
|
||||||
|
id="path5340" />
|
||||||
|
<path
|
||||||
|
d="m 13.188477,1036.0634 1.748046,0 0,7.5976 -1.748046,0 0,-7.5976 z"
|
||||||
|
style="font-size:10px;fill:#ffffff;fill-opacity:1"
|
||||||
|
id="path5342" />
|
||||||
|
<path
|
||||||
|
d="m 18.535156,1036.6395 0,1.5528 1.801758,0 0,1.25 -1.801758,0 0,2.3193 q 0,0.3809 0.151367,0.5176 0.151368,0.1318 0.600586,0.1318 l 0.898438,0 0,1.25 -1.499024,0 q -1.035156,0 -1.469726,-0.4297 -0.429688,-0.4345 -0.429688,-1.4697 l 0,-2.3193 -0.86914,0 0,-1.25 0.86914,0 0,-1.5528 1.748047,0 z"
|
||||||
|
style="font-size:10px;fill:#ffffff;fill-opacity:1"
|
||||||
|
id="path5344" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.5 KiB |
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue