Compare commits
188 Commits
release/1.
...
release/1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
001ff1aa47 | ||
|
|
12066abc66 | ||
|
|
a10358b5ca | ||
|
|
124d36a981 | ||
|
|
f02fbb0e2d | ||
|
|
8c7dd2ed30 | ||
|
|
ae70375afe | ||
|
|
127ab45329 | ||
|
|
3bc1024e7f | ||
|
|
228eb87db1 | ||
|
|
4f726e3654 | ||
|
|
ed9fbcbec2 | ||
|
|
659a4198fc | ||
|
|
5456ccc072 | ||
|
|
fddaab5124 | ||
|
|
7be7e34b51 | ||
|
|
5b64eb32f8 | ||
|
|
eef8e7264f | ||
|
|
e8b54db6bf | ||
|
|
7b442658e1 | ||
|
|
408fcd3415 | ||
|
|
7cdb7e1f3e | ||
|
|
b595c0bce8 | ||
|
|
4c9b065c31 | ||
|
|
8b5ee59ae2 | ||
|
|
4114d73ed6 | ||
|
|
1d8a2ed59a | ||
|
|
c055920348 | ||
|
|
b2d965b58d | ||
|
|
446497ad06 | ||
|
|
0de752f65e | ||
|
|
f712f5e7f8 | ||
|
|
d090e1b707 | ||
|
|
fb7570709a | ||
|
|
73c3bda8cd | ||
|
|
9a73cb4a60 | ||
|
|
6cd50869c2 | ||
|
|
5823b550a4 | ||
|
|
29c48a8679 | ||
|
|
c88b683354 | ||
|
|
7399e5dc62 | ||
|
|
e4a5004f4b | ||
|
|
da7c481fc8 | ||
|
|
32f4398115 | ||
|
|
7350b12b3d | ||
|
|
1b25ad8e54 | ||
|
|
2165c3e1ba | ||
|
|
d390d187b4 | ||
|
|
a4034865e6 | ||
|
|
7d6244fe1c | ||
|
|
21d2ae5018 | ||
|
|
dcea208d73 | ||
|
|
44555f9581 | ||
|
|
561ea86e85 | ||
|
|
446d03d479 | ||
|
|
04f95d2b62 | ||
|
|
c0ed7d7b1a | ||
|
|
dda29172c1 | ||
|
|
fa88480914 | ||
|
|
b4f6fafd73 | ||
|
|
6a73d1cb49 | ||
|
|
6207b1b60f | ||
|
|
0923f300a0 | ||
|
|
7b8a4e8388 | ||
|
|
b9e9a2d2a0 | ||
|
|
25a996cb97 | ||
|
|
6774cbf3a2 | ||
|
|
fc0f2a3192 | ||
|
|
9a14b07ba4 | ||
|
|
0527c9f76e | ||
|
|
e41bc997a6 | ||
|
|
75c51c1e93 | ||
|
|
9450157af1 | ||
|
|
f9e46f5a13 | ||
|
|
13bafe3759 | ||
|
|
d5080eca8f | ||
|
|
4d3a9b749a | ||
|
|
12ba00f939 | ||
|
|
5c068f0d4f | ||
|
|
932ca80b50 | ||
|
|
ee07a90111 | ||
|
|
09fdbc1ab3 | ||
|
|
8372a91d53 | ||
|
|
76618a3e0b | ||
|
|
22901b87b0 | ||
|
|
a0121b4117 | ||
|
|
0fa8eafa01 | ||
|
|
5ad7b2dc54 | ||
|
|
d00c1819fe | ||
|
|
037eae7f44 | ||
|
|
9aa33f1900 | ||
|
|
32a9b354b9 | ||
|
|
a1e3d91489 | ||
|
|
9a8bfce25f | ||
|
|
5b58cfb1e1 | ||
|
|
243176984e | ||
|
|
059bec7ddf | ||
|
|
a2b2230489 | ||
|
|
cc4ec630c2 | ||
|
|
3116154f79 | ||
|
|
cc606d0c00 | ||
|
|
ba399efc3f | ||
|
|
ec347f5b46 | ||
|
|
252fc2f20c | ||
|
|
47bdc828c1 | ||
|
|
f0786fa3d4 | ||
|
|
178dd8e7ae | ||
|
|
3070de6d10 | ||
|
|
8b9ef1bc15 | ||
|
|
90fd90b948 | ||
|
|
e77d6693b3 | ||
|
|
13458a0a88 | ||
|
|
6a8adf0fb1 | ||
|
|
ec810a2abe | ||
|
|
d15492fa32 | ||
|
|
f9e6aa234e | ||
|
|
4678f3d969 | ||
|
|
20876547a1 | ||
|
|
ee10b81eef | ||
|
|
ea7568b240 | ||
|
|
d1492bd0c0 | ||
|
|
f1bdfb5ab5 | ||
|
|
099211c281 | ||
|
|
60cfd52bcf | ||
|
|
1b7ebc2a96 | ||
|
|
a2c49f6d89 | ||
|
|
e64a5f87d0 | ||
|
|
bbfbcc5af8 | ||
|
|
8a9fd18228 | ||
|
|
e5056eaeea | ||
|
|
16bf937bfa | ||
|
|
797c57121a | ||
|
|
a1b138e5e1 | ||
|
|
834bb9a925 | ||
|
|
5b3786e5ad | ||
|
|
ae93cd6840 | ||
|
|
cdf21ea6fd | ||
|
|
22ec1c6dbd | ||
|
|
3bae812364 | ||
|
|
61613c4e65 | ||
|
|
7366bbc613 | ||
|
|
b91d06f734 | ||
|
|
73016d8d55 | ||
|
|
ed4d4ea59f | ||
|
|
9684bd1f0a | ||
|
|
a2d2e48bd4 | ||
|
|
a1cd656910 | ||
|
|
1116642e62 | ||
|
|
3104465f62 | ||
|
|
33018e7b82 | ||
|
|
6d791eb059 | ||
|
|
a5a36d96b6 | ||
|
|
2017ac01f5 | ||
|
|
8d49eed7f0 | ||
|
|
55c8c1e80e | ||
|
|
a5193e240a | ||
|
|
503784a4aa | ||
|
|
956f83dda2 | ||
|
|
546814266d | ||
|
|
07ef056612 | ||
|
|
0206686ce0 | ||
|
|
5fcff79967 | ||
|
|
4bf7097dc9 | ||
|
|
40401ef380 | ||
|
|
c34724f421 | ||
|
|
9f5fbae244 | ||
|
|
38ac841490 | ||
|
|
d04982125a | ||
|
|
4b89868219 | ||
|
|
7760ec2d84 | ||
|
|
8cd57a612d | ||
|
|
23676ab3b3 | ||
|
|
d1cc18f751 | ||
|
|
cac80a22a3 | ||
|
|
907e32187c | ||
|
|
895b6b5697 | ||
|
|
90afa1f005 | ||
|
|
f1104e2cb5 | ||
|
|
9f42bad1f8 | ||
|
|
1bd674d7b3 | ||
|
|
22949e28e3 | ||
|
|
66f3013998 | ||
|
|
95f64ce1f2 | ||
|
|
e187fb7205 | ||
|
|
1623c5da93 | ||
|
|
dca55c7c8b | ||
|
|
779c54f7ee | ||
|
|
f0e2cd7a53 |
@@ -89,3 +89,26 @@ detect_revision() {
|
|||||||
|
|
||||||
REVISION=$(echo "$package" | sed "s/_${arch}.\+//" | sed 's/.\++//')
|
REVISION=$(echo "$package" | sed "s/_${arch}.\+//" | sed 's/.\++//')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
make_index_html() {
|
||||||
|
local body=""
|
||||||
|
local bname
|
||||||
|
|
||||||
|
for f in "$@"; do
|
||||||
|
bname=$(basename "$f")
|
||||||
|
body="${body}<a href=/$f>$bname</a><br>"
|
||||||
|
done
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
<!doctype html>
|
||||||
|
<html lang=en>
|
||||||
|
<head>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title>KasmVNC preview build</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
$body
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|||||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**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.
|
||||||
27
.github/ISSUE_TEMPLATE/installation-issue.md
vendored
Normal file
27
.github/ISSUE_TEMPLATE/installation-issue.md
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
name: Installation Issue
|
||||||
|
about: Create a report about an installation issue
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the issue is.
|
||||||
|
|
||||||
|
**System Description**
|
||||||
|
Provide the output of
|
||||||
|
```bash
|
||||||
|
cat /etc/os-release
|
||||||
|
uname -a
|
||||||
|
```
|
||||||
|
|
||||||
|
**KasmVNC Details**
|
||||||
|
Provide the filename of the package you installed KasmVNC with. The filename includes important details like the OS, architecture, and commit sha.
|
||||||
|
|
||||||
|
**Installation Details**
|
||||||
|
Provide the commands used to install the KasmVNC package and the output of those commands.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
||||||
46
.github/ISSUE_TEMPLATE/report-a-bug-or-issue-with-kasmvnc.md
vendored
Normal file
46
.github/ISSUE_TEMPLATE/report-a-bug-or-issue-with-kasmvnc.md
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
---
|
||||||
|
name: Report a bug or issue with KasmVNC
|
||||||
|
about: Create a bug/issue report on KasmVNC
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the issue is.
|
||||||
|
|
||||||
|
**System Description**
|
||||||
|
Provide the output of
|
||||||
|
```bash
|
||||||
|
cat /etc/os-release
|
||||||
|
uname -a
|
||||||
|
```
|
||||||
|
|
||||||
|
**KasmVNC Details**
|
||||||
|
Provide the filename of the package you installed KasmVNC with. The filename includes important details like the OS, architecture, and commit sha.
|
||||||
|
|
||||||
|
Provide the output of this command.
|
||||||
|
```bash
|
||||||
|
Xvnc -version
|
||||||
|
```
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior (for non-installation issues):
|
||||||
|
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.
|
||||||
|
|
||||||
|
**Browser**
|
||||||
|
If this is a problem with the KasmVNC client, provide details about the browser you are accessing KasmVNC from.
|
||||||
|
- Device: [e.g. iPhone6]
|
||||||
|
- OS: [e.g. Windows 11]
|
||||||
|
- Browser [e.g. chrome, safari, edge]
|
||||||
|
- Version [e.g. 22]
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
||||||
416
.gitlab-ci.yml
416
.gitlab-ci.yml
@@ -6,11 +6,18 @@ variables:
|
|||||||
KASMVNC_COMMIT_ID: $CI_COMMIT_SHA
|
KASMVNC_COMMIT_ID: $CI_COMMIT_SHA
|
||||||
GITLAB_SHARED_DIND_DIR: /builds/$CI_PROJECT_PATH/shared
|
GITLAB_SHARED_DIND_DIR: /builds/$CI_PROJECT_PATH/shared
|
||||||
GIT_SUBMODULE_STRATEGY: normal
|
GIT_SUBMODULE_STRATEGY: normal
|
||||||
GIT_FETCH_EXTRA_FLAGS: --tags
|
GIT_FETCH_EXTRA_FLAGS: --tags --force
|
||||||
# E.g. BUILD_JOBS: build_debian_buster,build_ubuntu_bionic. This will include
|
# E.g. BUILD_JOBS: build_debian_buster,build_ubuntu_bionic. This will include
|
||||||
# arm builds, because build_debian_buster_arm matches build_debian_buster.
|
# arm builds, because build_debian_buster_arm matches build_debian_buster.
|
||||||
# "BUILD_JOBS: none" won't build any build jobs, nor www.
|
# "BUILD_JOBS: none" won't build any build jobs, nor www.
|
||||||
BUILD_JOBS: all
|
BUILD_JOBS: all
|
||||||
|
DOCKER_HOST: tcp://docker:2375
|
||||||
|
DOCKER_TLS_CERTDIR: ""
|
||||||
|
|
||||||
|
workflow:
|
||||||
|
rules:
|
||||||
|
# Disable tag builds.
|
||||||
|
- if: $CI_COMMIT_TAG != $CI_COMMIT_REF_NAME
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- www
|
- www
|
||||||
@@ -30,9 +37,15 @@ stages:
|
|||||||
- cp -r builder/build/* output/
|
- cp -r builder/build/* output/
|
||||||
- rm output/*.tar.gz
|
- rm output/*.tar.gz
|
||||||
|
|
||||||
|
default:
|
||||||
|
tags:
|
||||||
|
- oci-fixed-amd
|
||||||
|
|
||||||
build_www:
|
build_www:
|
||||||
stage: www
|
stage: www
|
||||||
allow_failure: false
|
allow_failure: false
|
||||||
|
tags:
|
||||||
|
- oci-fixed-amd
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
script:
|
script:
|
||||||
@@ -42,6 +55,9 @@ build_www:
|
|||||||
- docker run --rm -v $PWD/builder/www:/build kasmweb/www:latest
|
- docker run --rm -v $PWD/builder/www:/build kasmweb/www:latest
|
||||||
- mkdir -p output/www
|
- mkdir -p output/www
|
||||||
- cd builder
|
- cd builder
|
||||||
|
- echo $PWD
|
||||||
|
- ls -l
|
||||||
|
- ls -l ../output
|
||||||
- tar -zcvf ../output/www/kasm_www.tar.gz www
|
- tar -zcvf ../output/www/kasm_www.tar.gz www
|
||||||
only:
|
only:
|
||||||
variables:
|
variables:
|
||||||
@@ -53,6 +69,8 @@ build_www:
|
|||||||
build_ubuntu_bionic:
|
build_ubuntu_bionic:
|
||||||
stage: build
|
stage: build
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
tags:
|
||||||
|
- oci-fixed-amd
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
- *prepare_www
|
- *prepare_www
|
||||||
@@ -71,7 +89,7 @@ build_ubuntu_bionic_arm:
|
|||||||
stage: build
|
stage: build
|
||||||
allow_failure: false
|
allow_failure: false
|
||||||
tags:
|
tags:
|
||||||
- arm
|
- oci-fixed-arm
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
- *prepare_www
|
- *prepare_www
|
||||||
@@ -86,26 +104,11 @@ build_ubuntu_bionic_arm:
|
|||||||
paths:
|
paths:
|
||||||
- output/
|
- output/
|
||||||
|
|
||||||
build_ubuntu_bionic_libjpeg_turbo:
|
|
||||||
stage: build
|
|
||||||
allow_failure: false
|
|
||||||
before_script:
|
|
||||||
- *prepare_build
|
|
||||||
- *prepare_www
|
|
||||||
after_script:
|
|
||||||
- *prepare_artfacts
|
|
||||||
script:
|
|
||||||
- bash builder/build-package ubuntu bionic +libjpeg-turbo_latest
|
|
||||||
only:
|
|
||||||
variables:
|
|
||||||
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- output/
|
|
||||||
|
|
||||||
build_ubuntu_focal:
|
build_ubuntu_focal:
|
||||||
stage: build
|
stage: build
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
tags:
|
||||||
|
- oci-fixed-amd
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
- *prepare_www
|
- *prepare_www
|
||||||
@@ -124,7 +127,7 @@ build_ubuntu_focal_arm:
|
|||||||
stage: build
|
stage: build
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
tags:
|
tags:
|
||||||
- arm
|
- oci-fixed-arm
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
- *prepare_www
|
- *prepare_www
|
||||||
@@ -142,6 +145,8 @@ build_ubuntu_focal_arm:
|
|||||||
build_ubuntu_jammy:
|
build_ubuntu_jammy:
|
||||||
stage: build
|
stage: build
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
tags:
|
||||||
|
- oci-fixed-amd
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
- *prepare_www
|
- *prepare_www
|
||||||
@@ -160,7 +165,7 @@ build_ubuntu_jammy_arm:
|
|||||||
stage: build
|
stage: build
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
tags:
|
tags:
|
||||||
- arm
|
- oci-fixed-arm
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
- *prepare_www
|
- *prepare_www
|
||||||
@@ -178,6 +183,8 @@ build_ubuntu_jammy_arm:
|
|||||||
build_debian_buster:
|
build_debian_buster:
|
||||||
stage: build
|
stage: build
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
tags:
|
||||||
|
- oci-fixed-amd
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
- *prepare_www
|
- *prepare_www
|
||||||
@@ -187,7 +194,7 @@ build_debian_buster:
|
|||||||
- bash builder/build-package debian buster;
|
- bash builder/build-package debian buster;
|
||||||
only:
|
only:
|
||||||
variables:
|
variables:
|
||||||
- $CI_COMMIT_MESSAGE =~ /\[full [cC][Ii]\]/ || $BUILD_JOBS =~ $CI_JOB_NAME
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- output/
|
- output/
|
||||||
@@ -196,7 +203,7 @@ build_debian_buster_arm:
|
|||||||
stage: build
|
stage: build
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
tags:
|
tags:
|
||||||
- arm
|
- oci-fixed-arm
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
- *prepare_www
|
- *prepare_www
|
||||||
@@ -206,7 +213,7 @@ build_debian_buster_arm:
|
|||||||
- bash builder/build-package debian buster;
|
- bash builder/build-package debian buster;
|
||||||
only:
|
only:
|
||||||
variables:
|
variables:
|
||||||
- $CI_COMMIT_MESSAGE =~ /\[full [cC][Ii]\]/ || $BUILD_JOBS =~ $CI_JOB_NAME
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- output/
|
- output/
|
||||||
@@ -214,6 +221,8 @@ build_debian_buster_arm:
|
|||||||
build_debian_bullseye:
|
build_debian_bullseye:
|
||||||
stage: build
|
stage: build
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
tags:
|
||||||
|
- oci-fixed-amd
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
- *prepare_www
|
- *prepare_www
|
||||||
@@ -223,7 +232,7 @@ build_debian_bullseye:
|
|||||||
- bash builder/build-package debian bullseye;
|
- bash builder/build-package debian bullseye;
|
||||||
only:
|
only:
|
||||||
variables:
|
variables:
|
||||||
- $CI_COMMIT_MESSAGE =~ /\[full [cC][Ii]\]/ || $BUILD_JOBS =~ $CI_JOB_NAME
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- output/
|
- output/
|
||||||
@@ -232,7 +241,7 @@ build_debian_bullseye_arm:
|
|||||||
stage: build
|
stage: build
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
tags:
|
tags:
|
||||||
- arm
|
- oci-fixed-arm
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
- *prepare_www
|
- *prepare_www
|
||||||
@@ -242,7 +251,46 @@ build_debian_bullseye_arm:
|
|||||||
- bash builder/build-package debian bullseye;
|
- bash builder/build-package debian bullseye;
|
||||||
only:
|
only:
|
||||||
variables:
|
variables:
|
||||||
- $CI_COMMIT_MESSAGE =~ /\[full [cC][Ii]\]/ || $BUILD_JOBS =~ $CI_JOB_NAME
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- output/
|
||||||
|
|
||||||
|
|
||||||
|
build_debian_bookworm:
|
||||||
|
stage: build
|
||||||
|
allow_failure: true
|
||||||
|
tags:
|
||||||
|
- oci-fixed-amd
|
||||||
|
before_script:
|
||||||
|
- *prepare_build
|
||||||
|
- *prepare_www
|
||||||
|
after_script:
|
||||||
|
- *prepare_artfacts
|
||||||
|
script:
|
||||||
|
- bash builder/build-package debian bookworm;
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- output/
|
||||||
|
|
||||||
|
build_debian_bookworm_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 debian bookworm;
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- output/
|
- output/
|
||||||
@@ -250,6 +298,8 @@ build_debian_bullseye_arm:
|
|||||||
build_kali_rolling:
|
build_kali_rolling:
|
||||||
stage: build
|
stage: build
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
tags:
|
||||||
|
- oci-fixed-amd
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
- *prepare_www
|
- *prepare_www
|
||||||
@@ -268,7 +318,7 @@ build_kali_rolling_arm:
|
|||||||
stage: build
|
stage: build
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
tags:
|
tags:
|
||||||
- arm
|
- oci-fixed-arm
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
- *prepare_www
|
- *prepare_www
|
||||||
@@ -286,6 +336,8 @@ build_kali_rolling_arm:
|
|||||||
build_centos7:
|
build_centos7:
|
||||||
stage: build
|
stage: build
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
tags:
|
||||||
|
- oci-fixed-amd
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
- *prepare_www
|
- *prepare_www
|
||||||
@@ -303,6 +355,8 @@ build_centos7:
|
|||||||
build_oracle_8:
|
build_oracle_8:
|
||||||
stage: build
|
stage: build
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
tags:
|
||||||
|
- oci-fixed-amd
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
- *prepare_www
|
- *prepare_www
|
||||||
@@ -321,7 +375,7 @@ build_oracle_8_arm:
|
|||||||
stage: build
|
stage: build
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
tags:
|
tags:
|
||||||
- arm
|
- oci-fixed-arm
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
- *prepare_www
|
- *prepare_www
|
||||||
@@ -336,9 +390,49 @@ build_oracle_8_arm:
|
|||||||
paths:
|
paths:
|
||||||
- output/
|
- output/
|
||||||
|
|
||||||
|
build_oracle_9:
|
||||||
|
stage: build
|
||||||
|
allow_failure: true
|
||||||
|
tags:
|
||||||
|
- oci-fixed-amd
|
||||||
|
before_script:
|
||||||
|
- *prepare_build
|
||||||
|
- *prepare_www
|
||||||
|
after_script:
|
||||||
|
- *prepare_artfacts
|
||||||
|
script:
|
||||||
|
- bash builder/build-package oracle 9;
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- output/
|
||||||
|
|
||||||
|
build_oracle_9_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 oracle 9;
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- output/
|
||||||
|
|
||||||
build_opensuse_15:
|
build_opensuse_15:
|
||||||
stage: build
|
stage: build
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
tags:
|
||||||
|
- oci-fixed-amd
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
- *prepare_www
|
- *prepare_www
|
||||||
@@ -357,7 +451,7 @@ build_opensuse_15_arm:
|
|||||||
stage: build
|
stage: build
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
tags:
|
tags:
|
||||||
- arm
|
- oci-fixed-arm
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
- *prepare_www
|
- *prepare_www
|
||||||
@@ -372,16 +466,252 @@ build_opensuse_15_arm:
|
|||||||
paths:
|
paths:
|
||||||
- output/
|
- output/
|
||||||
|
|
||||||
|
build_fedora_thirtyseven:
|
||||||
|
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 thirtyseven;
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- output/
|
||||||
|
|
||||||
|
build_fedora_thirtyseven_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 thirtyseven;
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- output/
|
||||||
|
|
||||||
|
build_fedora_thirtyeight:
|
||||||
|
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 thirtyeight;
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- output/
|
||||||
|
|
||||||
|
build_fedora_thirtyeight_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 thirtyeight;
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- output/
|
||||||
|
|
||||||
|
build_fedora_thirtynine:
|
||||||
|
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 thirtynine;
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- output/
|
||||||
|
|
||||||
|
build_fedora_thirtynine_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 thirtynine;
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- output/
|
||||||
|
|
||||||
|
build_alpine_317:
|
||||||
|
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 317;
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- output/
|
||||||
|
|
||||||
|
build_alpine_317_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 317;
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- output/
|
||||||
|
|
||||||
test:
|
test:
|
||||||
stage: test
|
stage: test
|
||||||
|
tags:
|
||||||
|
- oci-fixed-amd
|
||||||
before_script:
|
before_script:
|
||||||
- *prepare_build
|
- *prepare_build
|
||||||
script:
|
script:
|
||||||
- bash builder/test-vncserver
|
- bash builder/test-vncserver
|
||||||
|
|
||||||
|
|
||||||
|
build_alpine_318:
|
||||||
|
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 318;
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- output/
|
||||||
|
|
||||||
|
build_alpine_318_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 318;
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- output/
|
||||||
|
|
||||||
|
build_alpine_319:
|
||||||
|
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 319;
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- output/
|
||||||
|
|
||||||
|
build_alpine_319_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 319;
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- output/
|
||||||
|
|
||||||
upload:
|
upload:
|
||||||
stage: upload
|
stage: upload
|
||||||
image: ubuntu:focal
|
image: ubuntu:focal
|
||||||
|
tags:
|
||||||
|
- oci-fixed-amd
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- output/
|
||||||
before_script:
|
before_script:
|
||||||
- . .ci/upload.sh
|
- . .ci/upload.sh
|
||||||
script:
|
script:
|
||||||
@@ -398,12 +728,34 @@ upload:
|
|||||||
done
|
done
|
||||||
- export S3_BUILD_DIRECTORY="kasmvnc/${CI_COMMIT_SHA}"
|
- export S3_BUILD_DIRECTORY="kasmvnc/${CI_COMMIT_SHA}"
|
||||||
- export RELEASE_VERSION=$(.ci/next_release_version "$CI_COMMIT_REF_NAME")
|
- export RELEASE_VERSION=$(.ci/next_release_version "$CI_COMMIT_REF_NAME")
|
||||||
- for package in `find output/ -type f -name '*.deb' -or -name '*.rpm'`; do
|
- uploaded_files=()
|
||||||
|
- for package in `find output/ -type f -name '*.deb' -or -name '*.rpm' -or -name '*.tgz'`; do
|
||||||
prepare_upload_filename "$package";
|
prepare_upload_filename "$package";
|
||||||
upload_filename="${S3_BUILD_DIRECTORY}/$upload_filename";
|
upload_filename="${S3_BUILD_DIRECTORY}/$upload_filename";
|
||||||
echo;
|
echo;
|
||||||
echo "File to upload $upload_filename";
|
echo "File to upload $upload_filename";
|
||||||
upload_to_s3 "$package" "$upload_filename" "$S3_BUCKET";
|
upload_to_s3 "$package" "$upload_filename" "$S3_BUCKET";
|
||||||
UPLOAD_NAME=$(basename $upload_filename | sed 's#kasmvncserver_##' | sed -r 's#_([0-9]{1,3}\.){2}[0-9]{1,2}_\S+?([a-f0-9]{6})##' | sed -r 's#\.(deb|rpm)##');
|
UPLOAD_NAME=$(basename $upload_filename | sed 's#kasmvncserver_##' | sed -r 's#_([0-9]{1,3}\.){2}[0-9]{1,2}_\S+?([a-f0-9]{6})##' | sed -r 's#\.(deb|rpm|tgz)##');
|
||||||
curl --request POST --header "PRIVATE-TOKEN:${GITLAB_API_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/statuses/${CI_COMMIT_SHA}?state=success&name=${UPLOAD_NAME}&target_url=${S3_URL}";
|
curl --request POST --header "PRIVATE-TOKEN:${GITLAB_API_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/statuses/${CI_COMMIT_SHA}?state=success&name=${UPLOAD_NAME}&target_url=${S3_URL}";
|
||||||
|
uploaded_files+=("$upload_filename");
|
||||||
done
|
done
|
||||||
|
- make_index_html "${uploaded_files[@]}" > output/index.html;
|
||||||
|
|
||||||
|
upload_build_preview:
|
||||||
|
stage: upload
|
||||||
|
needs: ["upload"]
|
||||||
|
dependencies: ["upload"]
|
||||||
|
image: ubuntu:focal
|
||||||
|
tags:
|
||||||
|
- oci-fixed-amd
|
||||||
|
before_script:
|
||||||
|
- . .ci/upload.sh
|
||||||
|
resource_group: upload_build_preview
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $CI_COMMIT_BRANCH == 'master'
|
||||||
|
script:
|
||||||
|
- prepare_to_run_scripts_and_s3_uploads
|
||||||
|
- preview_builds_dir=kasmvnc/preview-builds
|
||||||
|
- upload_to_s3 "output/index.html" "$preview_builds_dir/index.html" "$S3_BUCKET"
|
||||||
|
- curl --request POST --header "PRIVATE-TOKEN:${GITLAB_API_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/statuses/${CI_COMMIT_SHA}?state=success&name=index.html&target_url=${S3_URL}";
|
||||||
|
|||||||
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -1,4 +1,4 @@
|
|||||||
[submodule "kasmweb"]
|
[submodule "kasmweb"]
|
||||||
path = kasmweb
|
path = kasmweb
|
||||||
url = https://github.com/kasmtech/noVNC.git
|
url = https://github.com/kasmtech/noVNC.git
|
||||||
branch = master
|
branch = release/1.2.0
|
||||||
|
|||||||
@@ -148,9 +148,17 @@ endif()
|
|||||||
# Check for zlib
|
# Check for zlib
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
|
|
||||||
|
# Check for libpng
|
||||||
|
find_package(PNG REQUIRED)
|
||||||
|
|
||||||
# Check for libjpeg
|
# Check for libjpeg
|
||||||
find_package(JPEG REQUIRED)
|
find_package(JPEG REQUIRED)
|
||||||
|
|
||||||
|
find_package(Freetype REQUIRED)
|
||||||
|
include_directories(${FREETYPE_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
# Staticly link libjpeg-turbo
|
||||||
|
set(JPEG_LIBRARIES "-Wl,-Bstatic -lturbojpeg -Wl,-Bdynamic")
|
||||||
# Warn if it doesn't seem to be the accelerated libjpeg that's found
|
# Warn if it doesn't seem to be the accelerated libjpeg that's found
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${JPEG_LIBRARIES})
|
set(CMAKE_REQUIRED_LIBRARIES ${JPEG_LIBRARIES})
|
||||||
set(CMAKE_REQUIRED_FLAGS -I${JPEG_INCLUDE_DIR})
|
set(CMAKE_REQUIRED_FLAGS -I${JPEG_INCLUDE_DIR})
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ KasmVNC is configured via YAML based configurations. The server level configurat
|
|||||||
|
|
||||||
The following configuration shows all default settings. Many of the encoding settings can be overridden by the client, unless the `runtime_configuration.allow_client_to_override_kasm_server_settings` setting is set tot false. By default the client is allowed to modify encoding settings.
|
The following configuration shows all default settings. Many of the encoding settings can be overridden by the client, unless the `runtime_configuration.allow_client_to_override_kasm_server_settings` setting is set tot false. By default the client is allowed to modify encoding settings.
|
||||||
|
|
||||||
For a full description of each setting see the [configuration reference](https://www.kasmweb/kasmvnc/docs/latest/index.html).
|
For a full description of each setting see the [configuration reference](https://www.kasmweb.com/kasmvnc/docs/latest/configuration.html).
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
desktop:
|
desktop:
|
||||||
@@ -101,6 +101,9 @@ desktop:
|
|||||||
height: 768
|
height: 768
|
||||||
allow_resize: true
|
allow_resize: true
|
||||||
pixel_depth: 24
|
pixel_depth: 24
|
||||||
|
gpu:
|
||||||
|
hw3d: false
|
||||||
|
drinode: /dev/dri/renderD128
|
||||||
|
|
||||||
network:
|
network:
|
||||||
protocol: http
|
protocol: http
|
||||||
@@ -228,6 +231,7 @@ command_line:
|
|||||||
|
|
||||||
# New Features!
|
# New Features!
|
||||||
|
|
||||||
|
- Faster jpeg compression (via statically linked libjpeg-turbo)
|
||||||
- Webp image compression for better bandwidth usage
|
- Webp image compression for better bandwidth usage
|
||||||
- Automatic mixing of webp and jpeg based on CPU availability on server
|
- Automatic mixing of webp and jpeg based on CPU availability on server
|
||||||
- Multi-threaded image encoding for smoother frame rate for servers with more cores
|
- Multi-threaded image encoding for smoother frame rate for servers with more cores
|
||||||
@@ -255,6 +259,7 @@ command_line:
|
|||||||
- Cursor lock
|
- Cursor lock
|
||||||
- IME support for languages with extended characters
|
- IME support for languages with extended characters
|
||||||
- Better mobile support
|
- Better mobile support
|
||||||
|
- DRI3 GPU acceleration with open source drivers (AMDGPU,Intel,ATI,ARM)
|
||||||
|
|
||||||
Future Goals:
|
Future Goals:
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,18 @@ It will install the package inside a new container and run KasmVNC.
|
|||||||
|
|
||||||
Open browser and point to https://localhost:443/ or https://\<ip-address\>:443/
|
Open browser and point to https://localhost:443/ or https://\<ip-address\>:443/
|
||||||
|
|
||||||
|
## Debugging
|
||||||
|
|
||||||
|
To debug a test container, run `test-deb ubuntu focal -s` or `test-deb ubuntu
|
||||||
|
focal --shell`. It runs a shell instead of starting KasmVNC.
|
||||||
|
|
||||||
|
## Testing performance
|
||||||
|
|
||||||
|
To run a performance test, add `-p` option:
|
||||||
|
```
|
||||||
|
builder/test-deb ubuntu focal -p
|
||||||
|
```
|
||||||
|
|
||||||
# Package development
|
# Package development
|
||||||
|
|
||||||
## deb/rpm package building and testing
|
## deb/rpm package building and testing
|
||||||
|
|||||||
17
builder/build-apk
Executable file
17
builder/build-apk
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. builder/os_ver_cli.sh
|
||||||
|
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
docker build -t kasmvnc_apkbuilder_${os}:${os_codename} -f \
|
||||||
|
builder/dockerfile.${os}_${os_codename}.apk.build .
|
||||||
|
|
||||||
|
source_dir=$(echo $PWD)
|
||||||
|
L_UID=$(id -u)
|
||||||
|
L_GID=$(id -g)
|
||||||
|
docker run --rm -v "$source_dir":/src --user $L_UID:$L_GID \
|
||||||
|
kasmvnc_apkbuilder_${os}:${os_codename} /bin/bash -c \
|
||||||
|
'/src/builder/build-apk-inside-docker'
|
||||||
11
builder/build-apk-inside-docker
Executable file
11
builder/build-apk-inside-docker
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
os=alpine
|
||||||
|
os_codename=$(cat /etc/os-release | awk '/VERSION_ID/' | grep -o '[[:digit:]]' | tr -d '\n' | head -c 3)
|
||||||
|
|
||||||
|
mkdir -p /src/builder/build/${os}_${os_codename}
|
||||||
|
mv \
|
||||||
|
/src/builder/build/kasmvnc.${os}_${os_codename}.tar.gz \
|
||||||
|
/src/builder/build/${os}_${os_codename}/kasmvnc.${os}_${os_codename}_$(uname -m).tgz
|
||||||
@@ -10,6 +10,8 @@ detect_package_format() {
|
|||||||
package_format=rpm
|
package_format=rpm
|
||||||
if ls builder/dockerfile*"$os"* | grep -q .deb.build; then
|
if ls builder/dockerfile*"$os"* | grep -q .deb.build; then
|
||||||
package_format=deb
|
package_format=deb
|
||||||
|
elif ls builder/dockerfile*"$os"* | grep -q .apk.build; then
|
||||||
|
package_format=apk
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ prepare_build_env() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
copy_spec_and_tar_with_binaries() {
|
copy_spec_and_tar_with_binaries() {
|
||||||
cp /tmp/kasmvncserver.spec ~/rpmbuild/SPECS/
|
cp /tmp/*.spec ~/rpmbuild/SPECS/
|
||||||
cp /src/builder/build/kasmvnc.${os}_${os_codename}.tar.gz \
|
cp /src/builder/build/kasmvnc.${os}_${os_codename}.tar.gz \
|
||||||
~/rpmbuild/SOURCES/
|
~/rpmbuild/SOURCES/
|
||||||
}
|
}
|
||||||
@@ -30,6 +30,6 @@ fi
|
|||||||
os_dir="build/${os}_${os_codename}"
|
os_dir="build/${os}_${os_codename}"
|
||||||
|
|
||||||
prepare_build_env
|
prepare_build_env
|
||||||
rpmbuild -ba ~/rpmbuild/SPECS/kasmvncserver.spec
|
rpmbuild -ba ~/rpmbuild/SPECS/*.spec
|
||||||
copy_rpm_to_build_dir
|
copy_rpm_to_build_dir
|
||||||
rpmlint "$os_dir"/*.rpm || true
|
rpmlint "$os_dir"/*.rpm || true
|
||||||
|
|||||||
@@ -40,14 +40,14 @@ EOF
|
|||||||
#sudo apt-get install cmake git libjpeg-dev libgnutls-dev
|
#sudo apt-get install cmake git libjpeg-dev libgnutls-dev
|
||||||
|
|
||||||
# Gcc12 builds fail due to bug
|
# Gcc12 builds fail due to bug
|
||||||
fail_on_gcc_12
|
#fail_on_gcc_12
|
||||||
|
|
||||||
# Ubuntu applies a million patches, but here we use upstream to simplify matters
|
# Ubuntu applies a million patches, but here we use upstream to simplify matters
|
||||||
cd /tmp
|
cd /tmp
|
||||||
# default to the version of x in Ubuntu 18.04, otherwise caller will need to specify
|
# default to the version of x in Ubuntu 18.04, otherwise caller will need to specify
|
||||||
XORG_VER=${XORG_VER:-"1.19.6"}
|
XORG_VER=${XORG_VER:-"1.19.6"}
|
||||||
XORG_PATCH=$(echo "$XORG_VER" | grep -Po '^\d.\d+' | sed 's#\.##')
|
XORG_PATCH=$(echo "$XORG_VER" | grep -Po '^\d.\d+' | sed 's#\.##')
|
||||||
wget --no-check-certificate https://www.x.org/archive/individual/xserver/xorg-server-${XORG_VER}.tar.bz2
|
wget --no-check-certificate https://www.x.org/archive/individual/xserver/xorg-server-${XORG_VER}.tar.gz
|
||||||
|
|
||||||
#git clone https://kasmweb@bitbucket.org/kasmtech/kasmvnc.git
|
#git clone https://kasmweb@bitbucket.org/kasmtech/kasmvnc.git
|
||||||
#cd kasmvnc
|
#cd kasmvnc
|
||||||
@@ -64,9 +64,10 @@ cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo . -DBUILD_VIEWER:BOOL=OFF \
|
|||||||
-DENABLE_GNUTLS:BOOL=OFF
|
-DENABLE_GNUTLS:BOOL=OFF
|
||||||
make -j5
|
make -j5
|
||||||
|
|
||||||
tar -C unix/xserver -xf /tmp/xorg-server-${XORG_VER}.tar.bz2 --strip-components=1
|
tar -C unix/xserver -xf /tmp/xorg-server-${XORG_VER}.tar.gz --strip-components=1
|
||||||
|
|
||||||
cd unix/xserver
|
cd unix/xserver
|
||||||
|
# Apply patches
|
||||||
patch -Np1 -i ../xserver${XORG_PATCH}.patch
|
patch -Np1 -i ../xserver${XORG_PATCH}.patch
|
||||||
case "$XORG_VER" in
|
case "$XORG_VER" in
|
||||||
1.20.*)
|
1.20.*)
|
||||||
@@ -85,22 +86,42 @@ autoreconf -i
|
|||||||
# everything after that is based on BUILDING.txt to remove unneeded
|
# everything after that is based on BUILDING.txt to remove unneeded
|
||||||
# components.
|
# components.
|
||||||
ensure_crashpad_can_fetch_line_number_by_address
|
ensure_crashpad_can_fetch_line_number_by_address
|
||||||
|
# Centos7 is too old for dri3
|
||||||
|
if [ ! "${KASMVNC_BUILD_OS}" == "centos" ]; then
|
||||||
|
CONFIG_OPTIONS="--enable-dri3"
|
||||||
|
fi
|
||||||
# remove gl check for opensuse
|
# remove gl check for opensuse
|
||||||
if [ "${KASMVNC_BUILD_OS}" == "opensuse" ]; then
|
if [ "${KASMVNC_BUILD_OS}" == "opensuse" ] || ([ "${KASMVNC_BUILD_OS}" == "oracle" ] && [ "${KASMVNC_BUILD_OS_CODENAME}" == 9 ]); then
|
||||||
sed -i 's/LIBGL="gl >= 7.1.0"/LIBGL="gl >= 1.1"/g' configure
|
sed -i 's/LIBGL="gl >= 7.1.0"/LIBGL="gl >= 1.1"/g' configure
|
||||||
fi
|
fi
|
||||||
./configure --prefix=/opt/kasmweb \
|
|
||||||
--with-xkb-path=/usr/share/X11/xkb \
|
# build X11
|
||||||
--with-xkb-output=/var/lib/xkb \
|
./configure \
|
||||||
--with-xkb-bin-directory=/usr/bin \
|
--disable-config-hal \
|
||||||
--with-default-font-path="/usr/share/fonts/X11/misc,/usr/share/fonts/X11/cyrillic,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,built-ins" \
|
--disable-config-udev \
|
||||||
--with-sha1=libcrypto \
|
--disable-dmx \
|
||||||
--without-dtrace --disable-dri \
|
--disable-dri \
|
||||||
--disable-static \
|
--disable-dri2 \
|
||||||
--disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \
|
--disable-kdrive \
|
||||||
--disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \
|
--disable-static \
|
||||||
--disable-config-hal --disable-config-udev \
|
--disable-xephyr \
|
||||||
--disable-dri2 --enable-glx --disable-xwayland --disable-dri3
|
--disable-xinerama \
|
||||||
|
--disable-xnest \
|
||||||
|
--disable-xorg \
|
||||||
|
--disable-xvfb \
|
||||||
|
--disable-xwayland \
|
||||||
|
--disable-xwin \
|
||||||
|
--enable-glx \
|
||||||
|
--prefix=/opt/kasmweb \
|
||||||
|
--with-default-font-path="/usr/share/fonts/X11/misc,/usr/share/fonts/X11/cyrillic,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,built-ins" \
|
||||||
|
--without-dtrace \
|
||||||
|
--with-sha1=libcrypto \
|
||||||
|
--with-xkb-bin-directory=/usr/bin \
|
||||||
|
--with-xkb-output=/var/lib/xkb \
|
||||||
|
--with-xkb-path=/usr/share/X11/xkb ${CONFIG_OPTIONS}
|
||||||
|
|
||||||
|
# remove array bounds errors for new versions of GCC
|
||||||
|
find . -name "Makefile" -exec sed -i 's/-Werror=array-bounds//g' {} \;
|
||||||
make -j5
|
make -j5
|
||||||
|
|
||||||
# modifications for the servertarball
|
# modifications for the servertarball
|
||||||
@@ -118,6 +139,8 @@ if [ -d /usr/lib/x86_64-linux-gnu/dri ]; then
|
|||||||
ln -s /usr/lib/x86_64-linux-gnu/dri dri
|
ln -s /usr/lib/x86_64-linux-gnu/dri dri
|
||||||
elif [ -d /usr/lib/aarch64-linux-gnu/dri ]; then
|
elif [ -d /usr/lib/aarch64-linux-gnu/dri ]; then
|
||||||
ln -s /usr/lib/aarch64-linux-gnu/dri dri
|
ln -s /usr/lib/aarch64-linux-gnu/dri dri
|
||||||
|
elif [ -d /usr/lib/xorg/modules/dri ]; then
|
||||||
|
ln -s /usr/lib/xorg/modules/dri dri
|
||||||
else
|
else
|
||||||
ln -s /usr/lib64/dri dri
|
ln -s /usr/lib64/dri dri
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -15,3 +15,4 @@ cd /build
|
|||||||
rm *.md
|
rm *.md
|
||||||
rm AUTHORS
|
rm AUTHORS
|
||||||
rm vnc.html
|
rm vnc.html
|
||||||
|
ln -s index.html vnc.html
|
||||||
|
|||||||
@@ -15,6 +15,11 @@ bump_deb() {
|
|||||||
builder/bump-package-version-deb "$new_version"
|
builder/bump-package-version-deb "$new_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bump_xvnc_binary() {
|
||||||
|
local cmd="s/#define XVNCVERSION.\+$/#define XVNCVERSION \"KasmVNC $new_version\"/"
|
||||||
|
sed -i -e "$cmd" unix/xserver/hw/vnc/xvnc.c
|
||||||
|
}
|
||||||
|
|
||||||
new_version="$1"
|
new_version="$1"
|
||||||
|
|
||||||
if [[ -z "$new_version" ]]; then
|
if [[ -z "$new_version" ]]; then
|
||||||
@@ -25,5 +30,6 @@ fi
|
|||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
update_version_to_meet_packaging_standards
|
update_version_to_meet_packaging_standards
|
||||||
|
bump_xvnc_binary
|
||||||
bump_rpm
|
bump_rpm
|
||||||
bump_deb
|
bump_deb
|
||||||
|
|||||||
@@ -3,9 +3,13 @@
|
|||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
new_version="$1"
|
new_version="$1"
|
||||||
specs="centos/kasmvncserver.spec
|
spec_dirs=(centos oracle opensuse fedora)
|
||||||
oracle/kasmvncserver.spec
|
|
||||||
opensuse/kasmvncserver.spec"
|
spec_files() {
|
||||||
|
for d in "${spec_dirs[@]}"; do
|
||||||
|
ls "$d"/*.spec
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
bump_version() {
|
bump_version() {
|
||||||
sed -i "s/^Version:.\+/Version: $new_version/" "$1"
|
sed -i "s/^Version:.\+/Version: $new_version/" "$1"
|
||||||
@@ -25,8 +29,7 @@ bump_changelog() {
|
|||||||
sed -i -e "s/%changelog/%changelog\n$new_changelog_entry/" "$1"
|
sed -i -e "s/%changelog/%changelog\n$new_changelog_entry/" "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
IFS=$'\n'
|
for spec_file in $(spec_files); do
|
||||||
for spec_file in $specs; do
|
|
||||||
bump_version $spec_file
|
bump_version $spec_file
|
||||||
bump_changelog $spec_file
|
bump_changelog $spec_file
|
||||||
done
|
done
|
||||||
|
|||||||
7
builder/dockerfile.alpine_317.apk.build
Normal file
7
builder/dockerfile.alpine_317.apk.build
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
FROM alpine:3.17
|
||||||
|
|
||||||
|
RUN apk add shadow bash
|
||||||
|
|
||||||
|
RUN useradd -m docker && echo "docker:docker" | chpasswd
|
||||||
|
|
||||||
|
USER docker
|
||||||
82
builder/dockerfile.alpine_317.build
Normal file
82
builder/dockerfile.alpine_317.build
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
FROM alpine:3.17
|
||||||
|
|
||||||
|
ENV KASMVNC_BUILD_OS alpine
|
||||||
|
ENV KASMVNC_BUILD_OS_CODENAME 317
|
||||||
|
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"]
|
||||||
7
builder/dockerfile.alpine_318.apk.build
Normal file
7
builder/dockerfile.alpine_318.apk.build
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
FROM alpine:3.18
|
||||||
|
|
||||||
|
RUN apk add shadow bash
|
||||||
|
|
||||||
|
RUN useradd -m docker && echo "docker:docker" | chpasswd
|
||||||
|
|
||||||
|
USER docker
|
||||||
82
builder/dockerfile.alpine_318.build
Normal file
82
builder/dockerfile.alpine_318.build
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
FROM alpine:3.18
|
||||||
|
|
||||||
|
ENV KASMVNC_BUILD_OS alpine
|
||||||
|
ENV KASMVNC_BUILD_OS_CODENAME 318
|
||||||
|
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"]
|
||||||
7
builder/dockerfile.alpine_319.apk.build
Normal file
7
builder/dockerfile.alpine_319.apk.build
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
FROM alpine:3.19
|
||||||
|
|
||||||
|
RUN apk add shadow bash
|
||||||
|
|
||||||
|
RUN useradd -m docker && echo "docker:docker" | chpasswd
|
||||||
|
|
||||||
|
USER docker
|
||||||
82
builder/dockerfile.alpine_319.build
Normal file
82
builder/dockerfile.alpine_319.build
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
FROM alpine:3.19
|
||||||
|
|
||||||
|
ENV KASMVNC_BUILD_OS alpine
|
||||||
|
ENV KASMVNC_BUILD_OS_CODENAME 319
|
||||||
|
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"]
|
||||||
@@ -5,11 +5,11 @@ ENV KASMVNC_BUILD_OS_CODENAME core
|
|||||||
|
|
||||||
RUN yum install -y ca-certificates
|
RUN yum install -y ca-certificates
|
||||||
RUN yum install -y build-dep xorg-server libxfont-dev sudo
|
RUN yum install -y build-dep xorg-server libxfont-dev sudo
|
||||||
RUN yum install -y gcc cmake git libjpeg-dev libgnutls28-dev vim wget tightvncserver
|
RUN yum install -y gcc cmake git libgnutls28-dev vim wget tightvncserver
|
||||||
RUN yum install -y libjpeg-dev libpng-dev libtiff-dev libgif-dev libavcodec-dev openssl-devel
|
RUN yum install -y libpng-dev libtiff-dev libgif-dev libavcodec-dev openssl-devel
|
||||||
RUN yum install -y make
|
RUN yum install -y make
|
||||||
RUN yum group install -y "Development Tools"
|
RUN yum group install -y "Development Tools"
|
||||||
RUN yum install -y xorg-x11-server-devel zlib-devel libjpeg-turbo-devel
|
RUN yum install -y xorg-x11-server-devel zlib-devel
|
||||||
RUN yum install -y libxkbfile-devel libXfont2-devel xorg-x11-font-utils \
|
RUN yum install -y libxkbfile-devel libXfont2-devel xorg-x11-font-utils \
|
||||||
xorg-x11-xtrans-devel xorg-x11-xkb-utils-devel libXrandr-devel pam-devel \
|
xorg-x11-xtrans-devel xorg-x11-xkb-utils-devel libXrandr-devel pam-devel \
|
||||||
gnutls-devel libX11-devel libXtst-devel libXcursor-devel
|
gnutls-devel libX11-devel libXtst-devel libXcursor-devel
|
||||||
@@ -23,6 +23,10 @@ RUN cd /tmp/libwebp-1.0.2 && \
|
|||||||
./configure --enable-static --disable-shared && \
|
./configure --enable-static --disable-shared && \
|
||||||
make && make install
|
make && make install
|
||||||
|
|
||||||
|
ENV SCRIPTS_DIR=/tmp/scripts
|
||||||
|
COPY builder/scripts $SCRIPTS_DIR
|
||||||
|
RUN $SCRIPTS_DIR/build-libjpeg-turbo
|
||||||
|
|
||||||
RUN useradd -m docker && echo "docker:docker" | chpasswd
|
RUN useradd -m docker && echo "docker:docker" | chpasswd
|
||||||
|
|
||||||
COPY --chown=docker:docker . /src/
|
COPY --chown=docker:docker . /src/
|
||||||
|
|||||||
38
builder/dockerfile.debian_bookworm.build
Normal file
38
builder/dockerfile.debian_bookworm.build
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
|
ENV KASMVNC_BUILD_OS debian
|
||||||
|
ENV KASMVNC_BUILD_OS_CODENAME bookworm
|
||||||
|
ENV XORG_VER 1.20.10
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
echo "**** add all sources ****" && \
|
||||||
|
echo "deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \
|
||||||
|
echo "deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
||||||
|
echo "deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
||||||
|
echo "deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
||||||
|
echo "deb http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
||||||
|
echo "deb-src http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
||||||
|
echo "deb http://security.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
||||||
|
echo "deb-src http://security.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
||||||
|
rm -f /etc/apt/sources.list.d/debian.sources
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get -y install sudo
|
||||||
|
|
||||||
|
RUN DEBIAN_FRONTEND=noninteractive 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 tightvncserver 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"]
|
||||||
@@ -1,18 +1,14 @@
|
|||||||
FROM ubuntu:bionic
|
FROM debian:bookworm
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get -y install vim build-essential devscripts equivs
|
apt-get -y install vim build-essential devscripts equivs
|
||||||
|
|
||||||
ARG KASMVNC_PACKAGE_DIR
|
|
||||||
COPY $KASMVNC_PACKAGE_DIR/libjpeg-turbo*deb /tmp/
|
|
||||||
RUN apt-get install /tmp/libjpeg-turbo*deb
|
|
||||||
|
|
||||||
# Install build-deps for the package.
|
# Install build-deps for the package.
|
||||||
COPY ./debian/control /tmp
|
COPY ./debian/control /tmp
|
||||||
RUN apt-get update && echo YYY | mk-build-deps --install --remove /tmp/control
|
RUN apt-get update && echo YYY | mk-build-deps --install --remove /tmp/control
|
||||||
|
|
||||||
ENV LD_LIBRARY_PATH="/opt/libjpeg-turbo/lib64/:$LD_LIBRARY_PATH"
|
|
||||||
|
|
||||||
ARG L_UID
|
ARG L_UID
|
||||||
RUN if [ "$L_UID" -eq 0 ]; then \
|
RUN if [ "$L_UID" -eq 0 ]; then \
|
||||||
useradd -m docker; \
|
useradd -m docker; \
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM ubuntu:bionic
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
ENV DISPLAY=:1 \
|
ENV DISPLAY=:1 \
|
||||||
VNC_PORT=8443 \
|
VNC_PORT=8443 \
|
||||||
@@ -16,12 +16,12 @@ ENV DISPLAY=:1 \
|
|||||||
VNC_PW=vncpassword \
|
VNC_PW=vncpassword \
|
||||||
VNC_USER=user \
|
VNC_USER=user \
|
||||||
VNC_VIEW_ONLY_PW=vncviewonlypassword \
|
VNC_VIEW_ONLY_PW=vncviewonlypassword \
|
||||||
LD_LIBRARY_PATH=/opt/libjpeg-turbo/lib64/:/usr/local/lib/ \
|
LD_LIBRARY_PATH=/usr/local/lib/ \
|
||||||
OMP_WAIT_POLICY=PASSIVE \
|
OMP_WAIT_POLICY=PASSIVE \
|
||||||
SHELL=/bin/bash \
|
SHELL=/bin/bash \
|
||||||
SINGLE_APPLICATION=0 \
|
SINGLE_APPLICATION=0 \
|
||||||
KASMVNC_BUILD_OS=ubuntu \
|
KASMVNC_BUILD_OS=debian \
|
||||||
KASMVNC_BUILD_OS_CODENAME=bionic
|
KASMVNC_BUILD_OS_CODENAME=buster
|
||||||
|
|
||||||
EXPOSE $VNC_PORT
|
EXPOSE $VNC_PORT
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ WORKDIR $HOME
|
|||||||
|
|
||||||
### REQUIRED STUFF ###
|
### REQUIRED STUFF ###
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y supervisor xfce4 xfce4-terminal xterm libnss-wrapper gettext wget
|
RUN apt-get update && apt-get install -y supervisor xfce4 xfce4-terminal dbus-x11 xterm libnss-wrapper gettext wget
|
||||||
RUN apt-get purge -y pm-utils xscreensaver*
|
RUN apt-get purge -y pm-utils xscreensaver*
|
||||||
RUN apt-get update && apt-get install -y vim less
|
RUN apt-get update && apt-get install -y vim less
|
||||||
RUN apt-get update && apt-get -y install lsb-release
|
RUN apt-get update && apt-get -y install lsb-release
|
||||||
@@ -40,16 +40,13 @@ RUN mkdir -p $STARTUPDIR
|
|||||||
COPY builder/startup/ $STARTUPDIR
|
COPY builder/startup/ $STARTUPDIR
|
||||||
|
|
||||||
### START CUSTOM STUFF ####
|
### START CUSTOM STUFF ####
|
||||||
|
|
||||||
COPY ./builder/scripts/ /tmp/scripts/
|
COPY ./builder/scripts/ /tmp/scripts/
|
||||||
COPY ./debian/changelog /tmp
|
COPY ./debian/changelog /tmp
|
||||||
|
|
||||||
ARG KASMVNC_PACKAGE_DIR
|
ARG KASMVNC_PACKAGE_DIR
|
||||||
COPY $KASMVNC_PACKAGE_DIR/libjpeg-turbo_*.deb /tmp/
|
COPY $KASMVNC_PACKAGE_DIR/kasmvncserver_*.deb /tmp/
|
||||||
RUN apt-get install /tmp/libjpeg-turbo*deb
|
RUN /tmp/scripts/install_kasmvncserver_package
|
||||||
|
|
||||||
ARG BUILD_DEBIAN_REVISION
|
|
||||||
COPY $KASMVNC_PACKAGE_DIR/kasmvncserver_*$BUILD_DEBIAN_REVISION*.deb /tmp/
|
|
||||||
RUN /tmp/scripts/install_kasmvncserver_package "$BUILD_DEBIAN_REVISION"
|
|
||||||
|
|
||||||
### END CUSTOM STUFF ###
|
### END CUSTOM STUFF ###
|
||||||
|
|
||||||
@@ -12,15 +12,13 @@ RUN apt-get update && \
|
|||||||
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
|
RUN DEBIAN_FRONTEND=noninteractive 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 build-dep xorg-server libxfont-dev
|
||||||
RUN apt-get update && apt-get -y install cmake git libjpeg-dev libgnutls28-dev vim wget tightvncserver
|
RUN apt-get update && apt-get -y install cmake git libgnutls28-dev vim wget tightvncserver curl
|
||||||
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
|
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
|
||||||
|
|
||||||
# Additions for webp
|
ENV SCRIPTS_DIR=/tmp/scripts
|
||||||
RUN cd /tmp && wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz
|
COPY builder/scripts $SCRIPTS_DIR
|
||||||
RUN cd /tmp && tar -xzf /tmp/libwebp-*
|
RUN $SCRIPTS_DIR/build-webp
|
||||||
RUN cd /tmp/libwebp-1.0.2 && \
|
RUN $SCRIPTS_DIR/build-libjpeg-turbo
|
||||||
./configure --enable-static --disable-shared && \
|
|
||||||
make && make install
|
|
||||||
|
|
||||||
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
||||||
|
|
||||||
|
|||||||
@@ -12,15 +12,13 @@ RUN apt-get update && \
|
|||||||
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
|
RUN DEBIAN_FRONTEND=noninteractive 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 build-dep xorg-server libxfont-dev
|
||||||
RUN apt-get update && apt-get -y install cmake git libjpeg-dev libgnutls28-dev vim wget tightvncserver
|
RUN apt-get update && apt-get -y install cmake git libgnutls28-dev vim wget tightvncserver curl
|
||||||
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
|
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
|
||||||
|
|
||||||
# Additions for webp
|
ENV SCRIPTS_DIR=/tmp/scripts
|
||||||
RUN cd /tmp && wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz
|
COPY builder/scripts $SCRIPTS_DIR
|
||||||
RUN cd /tmp && tar -xzf /tmp/libwebp-*
|
RUN $SCRIPTS_DIR/build-webp
|
||||||
RUN cd /tmp/libwebp-1.0.2 && \
|
RUN $SCRIPTS_DIR/build-libjpeg-turbo
|
||||||
./configure --enable-static --disable-shared && \
|
|
||||||
make && make install
|
|
||||||
|
|
||||||
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
||||||
|
|
||||||
|
|||||||
@@ -34,14 +34,6 @@ RUN apt-get purge -y pm-utils xscreensaver*
|
|||||||
RUN apt-get update && apt-get install -y vim less
|
RUN apt-get update && apt-get install -y vim less
|
||||||
RUN apt-get update && apt-get -y install lsb-release
|
RUN apt-get update && apt-get -y install lsb-release
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y task-cinnamon-desktop
|
|
||||||
RUN apt-get update && apt-get install -y task-gnome-desktop
|
|
||||||
RUN mkdir -p /usr/share/man/man1
|
|
||||||
RUN apt-get update && apt-get install -y apt-utils openjdk-11-jre
|
|
||||||
RUN apt-get update && apt-get install -y task-lxde-desktop
|
|
||||||
RUN apt-get update && apt-get install -y task-mate-desktop
|
|
||||||
RUN apt-get update && apt-get install -y task-kde-desktop
|
|
||||||
|
|
||||||
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
||||||
|
|
||||||
RUN mkdir -p $STARTUPDIR
|
RUN mkdir -p $STARTUPDIR
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM fedora:33
|
FROM fedora:38
|
||||||
|
|
||||||
ENV STARTUPDIR=/dockerstartup
|
ENV STARTUPDIR=/dockerstartup
|
||||||
|
|
||||||
86
builder/dockerfile.fedora_thirtyeight.build
Normal file
86
builder/dockerfile.fedora_thirtyeight.build
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
FROM fedora:38
|
||||||
|
|
||||||
|
ENV KASMVNC_BUILD_OS fedora
|
||||||
|
ENV KASMVNC_BUILD_OS_CODENAME thirtyeight
|
||||||
|
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"]
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
FROM fedora:33
|
FROM fedora:38
|
||||||
|
|
||||||
RUN dnf install -y fedora-packager fedora-review
|
RUN dnf install -y fedora-packager fedora-review
|
||||||
RUN dnf install -y tree vim less
|
RUN dnf install -y tree vim less
|
||||||
RUN dnf install -y redhat-lsb-core
|
RUN dnf install -y redhat-lsb-core
|
||||||
RUN dnf install -y dnf-plugins-core
|
RUN dnf install -y dnf-plugins-core
|
||||||
|
|
||||||
COPY centos/*.spec /tmp
|
COPY fedora/*.spec /tmp
|
||||||
RUN dnf builddep -y /tmp/*.spec
|
RUN dnf builddep -y /tmp/*.spec
|
||||||
|
|
||||||
RUN useradd -m docker && echo "docker:docker" | chpasswd
|
RUN useradd -m docker && echo "docker:docker" | chpasswd
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM fedora:33
|
FROM fedora:38
|
||||||
|
|
||||||
ENV DISPLAY=:1 \
|
ENV DISPLAY=:1 \
|
||||||
VNC_PORT=8443 \
|
VNC_PORT=8443 \
|
||||||
@@ -31,8 +31,7 @@ WORKDIR $HOME
|
|||||||
|
|
||||||
RUN dnf install -y openssl xterm gettext wget
|
RUN dnf install -y openssl xterm gettext wget
|
||||||
RUN dnf install -y nss_wrapper
|
RUN dnf install -y nss_wrapper
|
||||||
RUN dnf install -y xorg-x11-xauth xorg-x11-xkb-utils \
|
RUN dnf install -y xorg-x11-xauth xkeyboard-config
|
||||||
xkeyboard-config xorg-x11-server-utils
|
|
||||||
# xorg-x11-server-Xorg
|
# xorg-x11-server-Xorg
|
||||||
# RUN dnf install -y @xfce-desktop-environment
|
# RUN dnf install -y @xfce-desktop-environment
|
||||||
RUN dnf erase -y pm-utils xscreensaver*
|
RUN dnf erase -y pm-utils xscreensaver*
|
||||||
@@ -47,7 +46,7 @@ COPY builder/startup/ $STARTUPDIR
|
|||||||
|
|
||||||
### START CUSTOM STUFF ####
|
### START CUSTOM STUFF ####
|
||||||
COPY ./builder/scripts/ /tmp/scripts/
|
COPY ./builder/scripts/ /tmp/scripts/
|
||||||
COPY ./centos/kasmvncserver.spec /tmp
|
COPY ./fedora/kasmvncserver.spec /tmp
|
||||||
|
|
||||||
ARG KASMVNC_PACKAGE_DIR
|
ARG KASMVNC_PACKAGE_DIR
|
||||||
COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp/
|
COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp/
|
||||||
86
builder/dockerfile.fedora_thirtynine.build
Normal file
86
builder/dockerfile.fedora_thirtynine.build
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
FROM fedora:39
|
||||||
|
|
||||||
|
ENV KASMVNC_BUILD_OS fedora
|
||||||
|
ENV KASMVNC_BUILD_OS_CODENAME thirtynine
|
||||||
|
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_thirtynine.rpm.build
Normal file
13
builder/dockerfile.fedora_thirtynine.rpm.build
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
FROM fedora:39
|
||||||
|
|
||||||
|
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
|
||||||
19
builder/dockerfile.fedora_thirtyseven.barebones.rpm.test
Normal file
19
builder/dockerfile.fedora_thirtyseven.barebones.rpm.test
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
FROM fedora:37
|
||||||
|
|
||||||
|
ENV STARTUPDIR=/dockerstartup
|
||||||
|
|
||||||
|
RUN dnf install -y xterm
|
||||||
|
RUN dnf install -y vim less
|
||||||
|
RUN yum install -y redhat-lsb-core
|
||||||
|
|
||||||
|
ARG KASMVNC_PACKAGE_DIR
|
||||||
|
COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp/
|
||||||
|
RUN dnf localinstall -y /tmp/*.rpm
|
||||||
|
|
||||||
|
RUN mkdir -p $STARTUPDIR
|
||||||
|
COPY startup/vnc_startup_barebones.sh $STARTUPDIR
|
||||||
|
|
||||||
|
RUN useradd -m foo
|
||||||
|
USER foo:kasmvnc-cert
|
||||||
|
|
||||||
|
ENTRYPOINT "/$STARTUPDIR/vnc_startup_barebones.sh"
|
||||||
86
builder/dockerfile.fedora_thirtyseven.build
Normal file
86
builder/dockerfile.fedora_thirtyseven.build
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
FROM fedora:37
|
||||||
|
|
||||||
|
ENV KASMVNC_BUILD_OS fedora
|
||||||
|
ENV KASMVNC_BUILD_OS_CODENAME thirtyseven
|
||||||
|
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_thirtyseven.rpm.build
Normal file
13
builder/dockerfile.fedora_thirtyseven.rpm.build
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
FROM fedora:37
|
||||||
|
|
||||||
|
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
|
||||||
62
builder/dockerfile.fedora_thirtyseven.rpm.test
Normal file
62
builder/dockerfile.fedora_thirtyseven.rpm.test
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
FROM fedora:37
|
||||||
|
|
||||||
|
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=fedora \
|
||||||
|
KASMVNC_BUILD_OS_CODENAME=thirtythree
|
||||||
|
|
||||||
|
EXPOSE $VNC_PORT
|
||||||
|
|
||||||
|
WORKDIR $HOME
|
||||||
|
|
||||||
|
### REQUIRED STUFF ###
|
||||||
|
|
||||||
|
RUN dnf install -y openssl xterm gettext wget
|
||||||
|
RUN dnf install -y nss_wrapper
|
||||||
|
RUN dnf install -y xorg-x11-xauth xkeyboard-config
|
||||||
|
# xorg-x11-server-Xorg
|
||||||
|
# RUN dnf install -y @xfce-desktop-environment
|
||||||
|
RUN dnf erase -y pm-utils xscreensaver*
|
||||||
|
RUN dnf install -y redhat-lsb-core
|
||||||
|
RUN dnf install -y vim less
|
||||||
|
RUN dnf install -y @xfce-desktop-environment
|
||||||
|
|
||||||
|
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
||||||
|
|
||||||
|
RUN mkdir -p $STARTUPDIR
|
||||||
|
COPY builder/startup/ $STARTUPDIR
|
||||||
|
|
||||||
|
### START CUSTOM STUFF ####
|
||||||
|
COPY ./builder/scripts/ /tmp/scripts/
|
||||||
|
COPY ./fedora/kasmvncserver.spec /tmp
|
||||||
|
|
||||||
|
ARG KASMVNC_PACKAGE_DIR
|
||||||
|
COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp/
|
||||||
|
# RUN dnf remove -y tigervnc-server-minimal
|
||||||
|
RUN /tmp/scripts/install_kasmvncserver_package
|
||||||
|
|
||||||
|
### END CUSTOM STUFF ###
|
||||||
|
|
||||||
|
RUN chown -R 1000:0 $HOME
|
||||||
|
USER 1000:kasmvnc-cert
|
||||||
|
WORKDIR $HOME
|
||||||
|
|
||||||
|
ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
FROM fedora:33
|
|
||||||
|
|
||||||
ENV KASMVNC_BUILD_OS fedora
|
|
||||||
ENV KASMVNC_BUILD_OS_CODENAME thirtythree
|
|
||||||
ENV XORG_VER 1.20.10
|
|
||||||
|
|
||||||
# RUN dnf install -y build-dep xorg-server libxfont-dev sudo
|
|
||||||
RUN dnf install -y gcc cmake git gnutls-devel vim wget
|
|
||||||
#tightvncserver
|
|
||||||
RUN dnf install -y libjpeg-turbo-devel libpng-devel libtiff-devel giflib-devel openssl-devel
|
|
||||||
|
|
||||||
#libavcodec-dev
|
|
||||||
RUN dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
|
|
||||||
RUN dnf -y install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
|
|
||||||
RUN dnf -y install ffmpeg-devel
|
|
||||||
|
|
||||||
RUN dnf install -y make
|
|
||||||
RUN dnf group install -y "Development Tools"
|
|
||||||
RUN dnf install -y xorg-x11-server-devel zlib-devel libjpeg-turbo-devel
|
|
||||||
RUN dnf install -y libxkbfile-devel libXfont2-devel xorg-x11-font-utils \
|
|
||||||
xorg-x11-xtrans-devel xorg-x11-xkb-utils-devel libXrandr-devel libXtst-devel \
|
|
||||||
libXcursor-devel
|
|
||||||
RUN dnf install -y mesa-dri-drivers
|
|
||||||
RUN dnf install -y bzip2 redhat-lsb-core
|
|
||||||
|
|
||||||
# Additions for webp
|
|
||||||
RUN cd /tmp && wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz
|
|
||||||
RUN cd /tmp && tar -xzf /tmp/libwebp-*
|
|
||||||
RUN cd /tmp/libwebp-1.0.2 && \
|
|
||||||
./configure --enable-static --disable-shared && \
|
|
||||||
make && make install
|
|
||||||
|
|
||||||
RUN useradd -m docker && echo "docker:docker" | chpasswd
|
|
||||||
|
|
||||||
COPY --chown=docker:docker . /src/
|
|
||||||
|
|
||||||
USER docker
|
|
||||||
ENTRYPOINT ["/src/builder/build.sh"]
|
|
||||||
@@ -14,16 +14,14 @@ RUN apt-get update && \
|
|||||||
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
|
RUN DEBIAN_FRONTEND=noninteractive 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 build-dep xorg-server libxfont-dev
|
||||||
RUN apt-get update && apt-get -y install gcc-11 g++-11
|
RUN apt-get update && apt-get -y install gcc-11 g++-11 curl
|
||||||
RUN apt-get update && apt-get -y install cmake git libjpeg-dev libgnutls28-dev vim wget tightvncserver
|
RUN apt-get update && apt-get -y install cmake git libgnutls28-dev vim wget tightvncserver
|
||||||
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
|
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
|
||||||
|
|
||||||
# Additions for webp
|
ENV SCRIPTS_DIR=/tmp/scripts
|
||||||
RUN cd /tmp && wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz
|
COPY builder/scripts $SCRIPTS_DIR
|
||||||
RUN cd /tmp && tar -xzf /tmp/libwebp-*
|
RUN $SCRIPTS_DIR/build-webp
|
||||||
RUN cd /tmp/libwebp-1.0.2 && \
|
RUN $SCRIPTS_DIR/build-libjpeg-turbo
|
||||||
./configure --enable-static --disable-shared && \
|
|
||||||
make -j$(nproc) && make install
|
|
||||||
|
|
||||||
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM opensuse/leap:15.3
|
FROM opensuse/leap:15.5
|
||||||
|
|
||||||
ENV STARTUPDIR=/dockerstartup
|
ENV STARTUPDIR=/dockerstartup
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM opensuse/leap:15.3
|
FROM opensuse/leap:15.5
|
||||||
|
|
||||||
ENV KASMVNC_BUILD_OS opensuse
|
ENV KASMVNC_BUILD_OS opensuse
|
||||||
ENV KASMVNC_BUILD_OS_CODENAME 15
|
ENV KASMVNC_BUILD_OS_CODENAME 15
|
||||||
@@ -9,6 +9,7 @@ RUN zypper install -ny \
|
|||||||
bdftopcf \
|
bdftopcf \
|
||||||
bigreqsproto-devel \
|
bigreqsproto-devel \
|
||||||
cmake \
|
cmake \
|
||||||
|
curl \
|
||||||
ffmpeg-4-libavcodec-devel \
|
ffmpeg-4-libavcodec-devel \
|
||||||
fonttosfnt \
|
fonttosfnt \
|
||||||
font-util \
|
font-util \
|
||||||
@@ -19,14 +20,17 @@ RUN zypper install -ny \
|
|||||||
gzip \
|
gzip \
|
||||||
lbzip2 \
|
lbzip2 \
|
||||||
libbz2-devel \
|
libbz2-devel \
|
||||||
|
libgbm-devel \
|
||||||
libGLw-devel \
|
libGLw-devel \
|
||||||
libgnutls-devel \
|
libgnutls-devel \
|
||||||
libjpeg8-devel \
|
|
||||||
libopenssl-devel \
|
libopenssl-devel \
|
||||||
libpng16-devel \
|
libpng16-devel \
|
||||||
|
libpnglite0 \
|
||||||
|
png++-devel \
|
||||||
libtiff-devel \
|
libtiff-devel \
|
||||||
libXfont2-devel \
|
libXfont2-devel \
|
||||||
libxkbcommon-x11-devel \
|
libxkbcommon-x11-devel \
|
||||||
|
libxshmfence-devel \
|
||||||
make \
|
make \
|
||||||
Mesa-dri \
|
Mesa-dri \
|
||||||
Mesa-libglapi-devel \
|
Mesa-libglapi-devel \
|
||||||
@@ -41,12 +45,10 @@ RUN zypper install -ny \
|
|||||||
xorg-x11-util-devel \
|
xorg-x11-util-devel \
|
||||||
zlib-devel
|
zlib-devel
|
||||||
|
|
||||||
# Additions for webp
|
ENV SCRIPTS_DIR=/tmp/scripts
|
||||||
RUN cd /tmp && wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz
|
COPY builder/scripts $SCRIPTS_DIR
|
||||||
RUN cd /tmp && tar -xzf /tmp/libwebp-*
|
RUN $SCRIPTS_DIR/build-webp
|
||||||
RUN cd /tmp/libwebp-1.0.2 && \
|
RUN $SCRIPTS_DIR/build-libjpeg-turbo
|
||||||
./configure --enable-static --disable-shared && \
|
|
||||||
make && make install
|
|
||||||
|
|
||||||
RUN useradd -u 1000 docker && \
|
RUN useradd -u 1000 docker && \
|
||||||
groupadd -g 1000 docker && \
|
groupadd -g 1000 docker && \
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM opensuse/leap:15.3
|
FROM opensuse/leap:15.5
|
||||||
|
|
||||||
ENV KASMVNC_BUILD_OS opensuse
|
ENV KASMVNC_BUILD_OS opensuse
|
||||||
ENV KASMVNC_BUILD_OS_CODENAME 15
|
ENV KASMVNC_BUILD_OS_CODENAME 15
|
||||||
|
|||||||
@@ -5,27 +5,31 @@ ENV KASMVNC_BUILD_OS_CODENAME 8
|
|||||||
ENV XORG_VER 1.20.10
|
ENV XORG_VER 1.20.10
|
||||||
|
|
||||||
# Install from stock repos
|
# Install from stock repos
|
||||||
RUN dnf install -y \
|
RUN \
|
||||||
bzip2-devel \
|
dnf install -y 'dnf-command(config-manager)' && \
|
||||||
ca-certificates \
|
dnf config-manager --set-enabled ol8_codeready_builder && \
|
||||||
cmake \
|
dnf install -y \
|
||||||
dnf-plugins-core \
|
bzip2-devel \
|
||||||
gcc \
|
ca-certificates \
|
||||||
gcc-c++ \
|
cmake \
|
||||||
git \
|
dnf-plugins-core \
|
||||||
gnutls-devel \
|
gcc \
|
||||||
libjpeg-turbo-devel \
|
gcc-c++ \
|
||||||
libpng-devel \
|
git \
|
||||||
libtiff-devel \
|
gnutls-devel \
|
||||||
make \
|
libjpeg-turbo-devel \
|
||||||
mesa-dri-drivers \
|
libpng-devel \
|
||||||
openssl-devel \
|
libtiff-devel \
|
||||||
openssl-devel \
|
libxshmfence-devel \
|
||||||
patch \
|
make \
|
||||||
tigervnc-server \
|
mesa-dri-drivers \
|
||||||
wget \
|
mesa-libgbm-devel \
|
||||||
xorg-x11-font-utils \
|
openssl-devel \
|
||||||
zlib-devel
|
patch \
|
||||||
|
tigervnc-server \
|
||||||
|
wget \
|
||||||
|
xorg-x11-font-utils \
|
||||||
|
zlib-devel
|
||||||
|
|
||||||
# Enable additional repos (epel, powertools, and fusion)
|
# Enable additional repos (epel, powertools, and fusion)
|
||||||
RUN dnf config-manager --set-enabled ol8_codeready_builder
|
RUN dnf config-manager --set-enabled ol8_codeready_builder
|
||||||
@@ -46,12 +50,10 @@ RUN dnf install -y \
|
|||||||
libXtst-devel \
|
libXtst-devel \
|
||||||
libXcursor-devel
|
libXcursor-devel
|
||||||
|
|
||||||
# Additions for webp
|
ENV SCRIPTS_DIR=/tmp/scripts
|
||||||
RUN cd /tmp && wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz
|
COPY builder/scripts $SCRIPTS_DIR
|
||||||
RUN cd /tmp && tar -xzf /tmp/libwebp-*
|
RUN $SCRIPTS_DIR/build-webp
|
||||||
RUN cd /tmp/libwebp-1.0.2 && \
|
RUN $SCRIPTS_DIR/build-libjpeg-turbo
|
||||||
./configure --enable-static --disable-shared && \
|
|
||||||
make && make install
|
|
||||||
|
|
||||||
RUN useradd -m docker && echo "docker:docker" | chpasswd
|
RUN useradd -m docker && echo "docker:docker" | chpasswd
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ RUN dnf install -y \
|
|||||||
tree \
|
tree \
|
||||||
vim
|
vim
|
||||||
|
|
||||||
COPY oracle/*.spec /tmp
|
COPY oracle/kasmvncserver.spec /tmp
|
||||||
RUN dnf builddep -y /tmp/*.spec
|
RUN dnf builddep -y /tmp/*.spec
|
||||||
|
|
||||||
RUN useradd -m docker && echo "docker:docker" | chpasswd
|
RUN useradd -m docker && echo "docker:docker" | chpasswd
|
||||||
|
|||||||
25
builder/dockerfile.oracle_9.barebones.rpm.test
Normal file
25
builder/dockerfile.oracle_9.barebones.rpm.test
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
FROM oraclelinux:9
|
||||||
|
|
||||||
|
ENV STARTUPDIR=/dockerstartup
|
||||||
|
|
||||||
|
RUN dnf install -y \
|
||||||
|
less \
|
||||||
|
vim \
|
||||||
|
xterm
|
||||||
|
RUN dnf config-manager --set-enabled ol9_codeready_builder
|
||||||
|
RUN dnf install -y oracle-epel-release-el9
|
||||||
|
|
||||||
|
ARG KASMVNC_PACKAGE_DIR
|
||||||
|
COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp
|
||||||
|
RUN dnf localinstall -y /tmp/*.rpm
|
||||||
|
|
||||||
|
RUN dnf install -y crypto-policies-scripts
|
||||||
|
RUN update-crypto-policies --set FIPS:SHA1
|
||||||
|
|
||||||
|
RUN mkdir -p $STARTUPDIR
|
||||||
|
COPY startup/vnc_startup_barebones.sh $STARTUPDIR
|
||||||
|
|
||||||
|
RUN useradd -m foo
|
||||||
|
USER foo:kasmvnc-cert
|
||||||
|
|
||||||
|
ENTRYPOINT "/$STARTUPDIR/vnc_startup_barebones.sh"
|
||||||
63
builder/dockerfile.oracle_9.build
Normal file
63
builder/dockerfile.oracle_9.build
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
FROM oraclelinux:9
|
||||||
|
|
||||||
|
ENV KASMVNC_BUILD_OS oracle
|
||||||
|
ENV KASMVNC_BUILD_OS_CODENAME 9
|
||||||
|
ENV XORG_VER 1.20.10
|
||||||
|
|
||||||
|
# Install from stock repos
|
||||||
|
RUN \
|
||||||
|
dnf config-manager --set-enabled ol9_codeready_builder && \
|
||||||
|
dnf config-manager --set-enabled ol9_distro_builder && \
|
||||||
|
dnf install -y \
|
||||||
|
bzip2-devel \
|
||||||
|
ca-certificates \
|
||||||
|
cmake \
|
||||||
|
dnf-plugins-core \
|
||||||
|
gcc \
|
||||||
|
gcc-c++ \
|
||||||
|
git \
|
||||||
|
gnutls-devel \
|
||||||
|
libjpeg-turbo-devel \
|
||||||
|
libpng-devel \
|
||||||
|
libtiff-devel \
|
||||||
|
libxshmfence-devel \
|
||||||
|
make \
|
||||||
|
mesa-dri-drivers \
|
||||||
|
mesa-libGL-devel \
|
||||||
|
mesa-libgbm-devel \
|
||||||
|
openssl-devel \
|
||||||
|
openssl-devel \
|
||||||
|
patch \
|
||||||
|
tigervnc-server \
|
||||||
|
wget \
|
||||||
|
xorg-x11-font-utils \
|
||||||
|
zlib-devel
|
||||||
|
|
||||||
|
# Enable additional repos (epel, powertools, and fusion)
|
||||||
|
RUN dnf install -y oracle-epel-release-el9
|
||||||
|
RUN dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-9.noarch.rpm
|
||||||
|
|
||||||
|
# Install from new repos
|
||||||
|
RUN dnf install -y \
|
||||||
|
giflib-devel \
|
||||||
|
lbzip2 \
|
||||||
|
libXfont2-devel \
|
||||||
|
libxkbfile-devel \
|
||||||
|
xorg-x11-server-devel \
|
||||||
|
xorg-x11-xtrans-devel \
|
||||||
|
libXrandr-devel \
|
||||||
|
libXtst-devel \
|
||||||
|
libXcursor-devel
|
||||||
|
|
||||||
|
|
||||||
|
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"]
|
||||||
23
builder/dockerfile.oracle_9.rpm.build
Normal file
23
builder/dockerfile.oracle_9.rpm.build
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
FROM oraclelinux:9
|
||||||
|
|
||||||
|
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 \
|
||||||
|
gpg* \
|
||||||
|
less \
|
||||||
|
redhat-lsb-core \
|
||||||
|
rng-tools \
|
||||||
|
rpm* \
|
||||||
|
rpmlint \
|
||||||
|
rsync \
|
||||||
|
tree \
|
||||||
|
vim
|
||||||
|
|
||||||
|
COPY oracle/kasmvncserver9.spec /tmp
|
||||||
|
|
||||||
|
RUN useradd -m docker && echo "docker:docker" | chpasswd
|
||||||
|
|
||||||
|
USER docker
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
FROM ubuntu:16.04
|
|
||||||
|
|
||||||
RUN sed -i 's$# deb-src$deb-src$' /etc/apt/sources.list
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get -y install sudo
|
|
||||||
|
|
||||||
RUN apt-get -y build-dep xorg-server
|
|
||||||
RUN apt-get -y install cmake git libjpeg-dev libgnutls-dev vim wget tightvncserver
|
|
||||||
RUN apt-get -y install libjpeg-dev libpng-dev libtiff-dev libgif-dev
|
|
||||||
RUN cd /tmp && wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz
|
|
||||||
RUN cd /tmp && tar -xzvf /tmp/libwebp-*
|
|
||||||
RUN cd /tmp/libwebp-1.0.2 && ./configure && make && make install
|
|
||||||
|
|
||||||
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
|
||||||
|
|
||||||
COPY --chown=docker:docker . /src/
|
|
||||||
|
|
||||||
|
|
||||||
USER docker
|
|
||||||
ENTRYPOINT ["/src/builder/build.sh"]
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
FROM ubuntu:18.04
|
|
||||||
|
|
||||||
ENV KASMVNC_BUILD_OS ubuntu
|
|
||||||
ENV KASMVNC_BUILD_OS_CODENAME bionic
|
|
||||||
ENV XORG_VER 1.20.10
|
|
||||||
|
|
||||||
RUN sed -i 's$# deb-src$deb-src$' /etc/apt/sources.list
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get -y install sudo
|
|
||||||
|
|
||||||
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 tightvncserver
|
|
||||||
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y cmake nasm gcc
|
|
||||||
RUN git clone https://github.com/libjpeg-turbo/libjpeg-turbo.git
|
|
||||||
RUN export MAKEFLAGS=-j`nproc`; cd libjpeg-turbo && cmake -G"Unix Makefiles" && make deb
|
|
||||||
RUN export MAKEFLAGS=-j`nproc`; cd libjpeg-turbo && cmake -DCMAKE_INSTALL_PREFIX=/usr/local -G"Unix Makefiles" && make && make install
|
|
||||||
|
|
||||||
# Additions for webp
|
|
||||||
RUN cd /tmp && wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz
|
|
||||||
RUN cd /tmp && tar -xzf /tmp/libwebp-*
|
|
||||||
RUN cd /tmp/libwebp-1.0.2 && \
|
|
||||||
./configure --enable-static --disable-shared && \
|
|
||||||
make && make install
|
|
||||||
|
|
||||||
# Fix for older required libs
|
|
||||||
#RUN cd /tmp && wget http://launchpadlibrarian.net/347526424/libxfont1-dev_1.5.2-4ubuntu2_amd64.deb && \
|
|
||||||
# wget http://launchpadlibrarian.net/347526425/libxfont1_1.5.2-4ubuntu2_amd64.deb && \
|
|
||||||
# dpkg -i libxfont1_1.5.2-4ubuntu2_amd64.deb && \
|
|
||||||
# dpkg -i libxfont1-dev_1.5.2-4ubuntu2_amd64.deb
|
|
||||||
|
|
||||||
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
|
||||||
|
|
||||||
COPY --chown=docker:docker . /src
|
|
||||||
|
|
||||||
USER docker
|
|
||||||
ENTRYPOINT ["/src/builder/build.sh"]
|
|
||||||
@@ -10,15 +10,13 @@ RUN apt-get update && \
|
|||||||
apt-get -y install sudo
|
apt-get -y install sudo
|
||||||
|
|
||||||
RUN apt-get update && apt-get -y build-dep xorg-server libxfont-dev
|
RUN apt-get update && apt-get -y build-dep xorg-server libxfont-dev
|
||||||
RUN apt-get update && apt-get -y install cmake git libjpeg-dev libgnutls28-dev vim wget tightvncserver
|
RUN apt-get update && apt-get -y install cmake git libgnutls28-dev vim wget tightvncserver curl
|
||||||
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
|
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
|
||||||
|
|
||||||
# Additions for webp
|
ENV SCRIPTS_DIR=/tmp/scripts
|
||||||
RUN cd /tmp && wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz
|
COPY builder/scripts $SCRIPTS_DIR
|
||||||
RUN cd /tmp && tar -xzf /tmp/libwebp-*
|
RUN $SCRIPTS_DIR/build-webp
|
||||||
RUN cd /tmp/libwebp-1.0.2 && \
|
RUN $SCRIPTS_DIR/build-libjpeg-turbo
|
||||||
./configure --enable-static --disable-shared && \
|
|
||||||
make && make install
|
|
||||||
|
|
||||||
# Fix for older required libs
|
# Fix for older required libs
|
||||||
#RUN cd /tmp && wget http://launchpadlibrarian.net/347526424/libxfont1-dev_1.5.2-4ubuntu2_amd64.deb && \
|
#RUN cd /tmp && wget http://launchpadlibrarian.net/347526424/libxfont1-dev_1.5.2-4ubuntu2_amd64.deb && \
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ WORKDIR $HOME
|
|||||||
|
|
||||||
### REQUIRED STUFF ###
|
### REQUIRED STUFF ###
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y supervisor xfce4 xfce4-terminal xterm libnss-wrapper gettext libjpeg-dev wget
|
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 purge -y pm-utils xscreensaver*
|
||||||
|
|
||||||
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
||||||
|
|||||||
@@ -2,9 +2,13 @@ FROM ubuntu:focal
|
|||||||
|
|
||||||
ENV STARTUPDIR=/dockerstartup
|
ENV STARTUPDIR=/dockerstartup
|
||||||
|
|
||||||
|
COPY ./builder/scripts/ /tmp/scripts/
|
||||||
|
COPY ./debian/changelog /tmp
|
||||||
|
|
||||||
ARG KASMVNC_PACKAGE_DIR
|
ARG KASMVNC_PACKAGE_DIR
|
||||||
COPY $KASMVNC_PACKAGE_DIR/kasmvncserver_*.deb /tmp/
|
COPY $KASMVNC_PACKAGE_DIR/kasmvncserver_*.deb /tmp/
|
||||||
RUN rm -f /tmp/kasmvncserver_*+*.deb; apt-get update && dpkg -i /tmp/*.deb; apt-get -yf install
|
RUN /tmp/scripts/install_kasmvncserver_package
|
||||||
|
|
||||||
RUN apt-get update && apt-get -y install xterm lsb-release
|
RUN apt-get update && apt-get -y install xterm lsb-release
|
||||||
|
|
||||||
RUN mkdir -p $STARTUPDIR
|
RUN mkdir -p $STARTUPDIR
|
||||||
|
|||||||
@@ -12,15 +12,13 @@ RUN apt-get update && \
|
|||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends tzdata
|
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 build-dep xorg-server libxfont-dev
|
||||||
RUN apt-get update && apt-get -y install cmake git libjpeg-dev vim wget
|
RUN apt-get update && apt-get -y install cmake git 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
|
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
|
||||||
|
|
||||||
# Additions for webp
|
ENV SCRIPTS_DIR=/tmp/scripts
|
||||||
RUN cd /tmp && wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz
|
COPY builder/scripts $SCRIPTS_DIR
|
||||||
RUN cd /tmp && tar -xzf /tmp/libwebp-*
|
RUN $SCRIPTS_DIR/build-webp
|
||||||
RUN cd /tmp/libwebp-1.0.2 && \
|
RUN $SCRIPTS_DIR/build-libjpeg-turbo
|
||||||
./configure --enable-static --disable-shared && \
|
|
||||||
make && make install
|
|
||||||
|
|
||||||
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ WORKDIR $HOME
|
|||||||
|
|
||||||
### REQUIRED STUFF ###
|
### REQUIRED STUFF ###
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y supervisor xfce4 xfce4-terminal xterm libnss-wrapper gettext libjpeg-dev wget
|
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 purge -y pm-utils xscreensaver*
|
||||||
|
|
||||||
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
||||||
|
|||||||
@@ -58,7 +58,8 @@ RUN echo 'alias tv="./run-specs spec/vncserver_yaml_validation_spec.py"' >> ~/.b
|
|||||||
RUN echo 'alias ty="./run-specs spec/vncserver_*spec.py"' >> ~/.bashrc
|
RUN echo 'alias ty="./run-specs spec/vncserver_*spec.py"' >> ~/.bashrc
|
||||||
RUN echo 'alias ta="./run-specs"' >> ~/.bashrc
|
RUN echo 'alias ta="./run-specs"' >> ~/.bashrc
|
||||||
RUN echo 'alias vd="vncserver -dry-run"' >> ~/.bashrc
|
RUN echo 'alias vd="vncserver -dry-run"' >> ~/.bashrc
|
||||||
ENV SET_PASSWORD_FUNC 'sp() { echo -e "$VNC_PW\\n$VNC_PW\\n" | kasmvncpasswd -w -u $USER $HOME/.kasmpasswd; }'
|
RUN echo 'alias ss="sp; vncserver -select-de xfce"' >> ~/.bashrc
|
||||||
|
ENV SET_PASSWORD_FUNC 'sp() { echo -e "$VNC_PW\\n$VNC_PW\\n" | kasmvncpasswd -w -u $VNC_USER $HOME/.kasmpasswd; }'
|
||||||
RUN echo $SET_PASSWORD_FUNC >> ~/.bashrc
|
RUN echo $SET_PASSWORD_FUNC >> ~/.bashrc
|
||||||
|
|
||||||
ENV LC_ALL=C.UTF-8
|
ENV LC_ALL=C.UTF-8
|
||||||
|
|||||||
@@ -12,15 +12,13 @@ RUN apt-get update && \
|
|||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends tzdata
|
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 build-dep xorg-server libxfont-dev
|
||||||
RUN apt-get update && apt-get -y install cmake git libjpeg-dev libgnutls28-dev vim wget tightvncserver
|
RUN apt-get update && apt-get -y install cmake git libgnutls28-dev vim wget tightvncserver curl
|
||||||
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
|
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
|
||||||
|
|
||||||
# Additions for webp
|
ENV SCRIPTS_DIR=/tmp/scripts
|
||||||
RUN cd /tmp && wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz
|
COPY builder/scripts $SCRIPTS_DIR
|
||||||
RUN cd /tmp && tar -xzf /tmp/libwebp-*
|
RUN $SCRIPTS_DIR/build-webp
|
||||||
RUN cd /tmp/libwebp-1.0.2 && \
|
RUN $SCRIPTS_DIR/build-libjpeg-turbo
|
||||||
./configure --enable-static --disable-shared && \
|
|
||||||
make && make install
|
|
||||||
|
|
||||||
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ WORKDIR $HOME
|
|||||||
|
|
||||||
### REQUIRED STUFF ###
|
### REQUIRED STUFF ###
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y supervisor xfce4 xfce4-terminal xterm libnss-wrapper gettext libjpeg-dev wget
|
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 purge -y pm-utils xscreensaver*
|
||||||
|
|
||||||
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
default_os=${default_os:-ubuntu}
|
default_os=${default_os:-ubuntu}
|
||||||
default_os_codename=${default_os_codename:-bionic}
|
default_os_codename=${default_os_codename:-bionic}
|
||||||
|
|
||||||
|
|||||||
49
builder/process_test_options.sh
Normal file
49
builder/process_test_options.sh
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo >&2 "Usage: $(basename "$0") [-s|--shell] [-p|--perf-test] [-h|--help] <distro> <distro_version>"
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
process_options() {
|
||||||
|
local sorted_options=$(getopt -o psh --long perf-test --long shell --long help -- "$@")
|
||||||
|
eval set -- $sorted_options
|
||||||
|
|
||||||
|
while : ; do
|
||||||
|
case "$1" in
|
||||||
|
-p|--perf-test)
|
||||||
|
entrypoint_args='-interface 0.0.0.0 -selfBench :1'
|
||||||
|
entrypoint_executable="--entrypoint=/usr/bin/Xvnc"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-s|--shell)
|
||||||
|
entrypoint_executable="--entrypoint=bash"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-h|--help)
|
||||||
|
print_usage=1
|
||||||
|
;;
|
||||||
|
--)
|
||||||
|
shift
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
leftover_options=("$@")
|
||||||
|
}
|
||||||
|
|
||||||
|
declare -a leftover_options
|
||||||
|
|
||||||
|
if [ "$#" -eq 0 ]; then
|
||||||
|
usage
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
process_options "$@"
|
||||||
|
set -- "${leftover_options[@]}"
|
||||||
|
|
||||||
|
if [ -n "$print_usage" ]; then
|
||||||
|
usage
|
||||||
|
exit
|
||||||
|
fi
|
||||||
36
builder/scripts/build-libjpeg-turbo
Executable file
36
builder/scripts/build-libjpeg-turbo
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
build_and_install() {
|
||||||
|
export MAKEFLAGS=-j`nproc`
|
||||||
|
export CFLAGS="-fpic"
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -G"Unix Makefiles"
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
}
|
||||||
|
|
||||||
|
install_build_dependencies() {
|
||||||
|
install_packages cmake gcc
|
||||||
|
ensure_libjpeg_is_fast
|
||||||
|
}
|
||||||
|
|
||||||
|
ensure_libjpeg_is_fast() {
|
||||||
|
install_packages nasm
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare_libjpeg_source() {
|
||||||
|
export JPEG_TURBO_RELEASE=$(curl -sX GET "https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo/releases/latest" \
|
||||||
|
| awk '/tag_name/{print $4;exit}' FS='[""]')
|
||||||
|
mkdir libjpeg-turbo
|
||||||
|
curl -Ls "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${JPEG_TURBO_RELEASE}.tar.gz" | \
|
||||||
|
tar xzvf - -C libjpeg-turbo/ --strip-components=1
|
||||||
|
cd libjpeg-turbo
|
||||||
|
}
|
||||||
|
|
||||||
|
source_dir=$(dirname "$0")
|
||||||
|
. "$source_dir/common.sh"
|
||||||
|
|
||||||
|
install_build_dependencies
|
||||||
|
prepare_libjpeg_source
|
||||||
|
build_and_install
|
||||||
23
builder/scripts/build-webp
Executable file
23
builder/scripts/build-webp
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
webp_tar_url=https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.2.4.tar.gz
|
||||||
|
|
||||||
|
prepare_source() {
|
||||||
|
cd /tmp
|
||||||
|
wget "$webp_tar_url"
|
||||||
|
tar -xzf /tmp/libwebp-*
|
||||||
|
rm /tmp/libwebp-*.tar.gz
|
||||||
|
cd /tmp/libwebp-*
|
||||||
|
}
|
||||||
|
|
||||||
|
build_and_install() {
|
||||||
|
export MAKEFLAGS=-j`nproc`
|
||||||
|
./configure --enable-static --disable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare_source
|
||||||
|
build_and_install
|
||||||
34
builder/scripts/common.sh
Normal file
34
builder/scripts/common.sh
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
detect_distro() {
|
||||||
|
if [ -f /etc/centos-release ]; then
|
||||||
|
DISTRO=centos
|
||||||
|
elif [ -f /etc/oracle-release ]; then
|
||||||
|
DISTRO=oracle
|
||||||
|
elif [ -f /etc/fedora-release ]; then
|
||||||
|
DISTRO=fedora
|
||||||
|
elif [ -f /usr/bin/zypper ]; then
|
||||||
|
DISTRO=opensuse
|
||||||
|
elif [ -f /etc/alpine-release ]; then
|
||||||
|
DISTRO=alpine
|
||||||
|
else
|
||||||
|
DISTRO=debian
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
install_packages() {
|
||||||
|
local install_cmd=no-command-defined
|
||||||
|
|
||||||
|
case "$DISTRO" in
|
||||||
|
centos) install_cmd="yum install -y" ;;
|
||||||
|
oracle) install_cmd="dnf install -y" ;;
|
||||||
|
fedora) install_cmd="dnf install -y" ;;
|
||||||
|
opensuse) install_cmd="zypper install -y" ;;
|
||||||
|
alpine) install_cmd="apk add" ;;
|
||||||
|
*) install_cmd="apt-get update && apt-get install -y"
|
||||||
|
esac
|
||||||
|
|
||||||
|
eval "$install_cmd $*"
|
||||||
|
}
|
||||||
|
|
||||||
|
detect_distro
|
||||||
@@ -198,6 +198,7 @@ generate_xstartup() {
|
|||||||
|
|
||||||
cat <<-SCRIPT > "$xstartup_script"
|
cat <<-SCRIPT > "$xstartup_script"
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -x
|
||||||
$de_cmd
|
$de_cmd
|
||||||
SCRIPT
|
SCRIPT
|
||||||
chmod +x "$xstartup_script"
|
chmod +x "$xstartup_script"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
. ./builder/process_test_options.sh
|
||||||
. ./builder/os_ver_cli.sh
|
. ./builder/os_ver_cli.sh
|
||||||
. ./builder/common.sh
|
. ./builder/common.sh
|
||||||
|
|
||||||
@@ -11,8 +12,11 @@ docker build --build-arg KASMVNC_PACKAGE_DIR="builder/build/${os_codename}" \
|
|||||||
--build-arg BUILD_DEBIAN_REVISION="$build_debian_revision" \
|
--build-arg BUILD_DEBIAN_REVISION="$build_debian_revision" \
|
||||||
-t "$tester_image" \
|
-t "$tester_image" \
|
||||||
-f "builder/dockerfile.${os}_${os_codename}${build_tag}.deb.test" .
|
-f "builder/dockerfile.${os}_${os_codename}${build_tag}.deb.test" .
|
||||||
|
|
||||||
docker run -it -p "443:$VNC_PORT" --rm \
|
docker run -it -p "443:$VNC_PORT" --rm \
|
||||||
-e KASMVNC_VERBOSE_LOGGING=$KASMVNC_VERBOSE_LOGGING \
|
-e KASMVNC_VERBOSE_LOGGING=$KASMVNC_VERBOSE_LOGGING \
|
||||||
-e "VNC_USER=foo" -e "VNC_PW=foobar" \
|
-e "VNC_USER=foo" -e "VNC_PW=foobar" \
|
||||||
-e "VNC_PORT=$VNC_PORT" \
|
-e "VNC_PORT=$VNC_PORT" \
|
||||||
"$tester_image"
|
$entrypoint_executable \
|
||||||
|
"$tester_image" \
|
||||||
|
$entrypoint_args
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
. ./builder/process_test_options.sh
|
||||||
. ./builder/common.sh
|
. ./builder/common.sh
|
||||||
os="${1:-debian}"
|
os="${1:-debian}"
|
||||||
os_codename="${2:-buster}"
|
os_codename="${2:-buster}"
|
||||||
@@ -13,4 +14,6 @@ docker build --build-arg KASMVNC_PACKAGE_DIR="builder/build/${os_codename}" \
|
|||||||
echo
|
echo
|
||||||
docker run -it -p "443:$VNC_PORT" --rm -e "VNC_USER=foo" -e "VNC_PW=foobar" \
|
docker run -it -p "443:$VNC_PORT" --rm -e "VNC_USER=foo" -e "VNC_PW=foobar" \
|
||||||
-e "VNC_PORT=$VNC_PORT" \
|
-e "VNC_PORT=$VNC_PORT" \
|
||||||
kasmvnctester_barebones_${os}:$os_codename
|
$entrypoint_executable \
|
||||||
|
kasmvnctester_barebones_${os}:$os_codename \
|
||||||
|
$entrypoint_args
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
. ./builder/process_test_options.sh
|
||||||
. ./builder/os_ver_cli.sh
|
. ./builder/os_ver_cli.sh
|
||||||
. ./builder/common.sh
|
. ./builder/common.sh
|
||||||
|
|
||||||
@@ -16,4 +17,6 @@ docker run -it -p "443:$VNC_PORT" --rm \
|
|||||||
-e KASMVNC_VERBOSE_LOGGING=$KASMVNC_VERBOSE_LOGGING \
|
-e KASMVNC_VERBOSE_LOGGING=$KASMVNC_VERBOSE_LOGGING \
|
||||||
-e "VNC_USER=foo" -e "VNC_PW=foobar" \
|
-e "VNC_USER=foo" -e "VNC_PW=foobar" \
|
||||||
-e "VNC_PORT=$VNC_PORT" \
|
-e "VNC_PORT=$VNC_PORT" \
|
||||||
kasmvnctester_${os}:$os_codename
|
$entrypoint_executable \
|
||||||
|
kasmvnctester_${os}:$os_codename \
|
||||||
|
$entrypoint_args
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
. ./process_test_options.sh
|
||||||
. ./common.sh
|
. ./common.sh
|
||||||
os="${1:-centos}"
|
os="${1:-centos}"
|
||||||
os_codename="${2:-core}"
|
os_codename="${2:-core}"
|
||||||
@@ -12,4 +13,6 @@ docker build --build-arg KASMVNC_PACKAGE_DIR="build/${os}_${os_codename}" \
|
|||||||
-f dockerfile.${os}_${os_codename}.barebones.rpm.test .
|
-f dockerfile.${os}_${os_codename}.barebones.rpm.test .
|
||||||
docker run -it -p "443:$VNC_PORT" --rm -e "VNC_USER=foo" -e "VNC_PW=foobar" \
|
docker run -it -p "443:$VNC_PORT" --rm -e "VNC_USER=foo" -e "VNC_PW=foobar" \
|
||||||
-e "VNC_PORT=$VNC_PORT" \
|
-e "VNC_PORT=$VNC_PORT" \
|
||||||
kasmvnctester_barebones_${os}:$os_codename
|
$entrypoint_executable \
|
||||||
|
kasmvnctester_barebones_${os}:$os_codename \
|
||||||
|
$entrypoint_args
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Name: kasmvncserver
|
Name: kasmvncserver
|
||||||
Version: 1.0.0
|
Version: 1.3.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: VNC server accessible from a web browser
|
Summary: VNC server accessible from a web browser
|
||||||
|
|
||||||
@@ -7,18 +7,18 @@ License: GPLv2+
|
|||||||
URL: https://github.com/kasmtech/KasmVNC
|
URL: https://github.com/kasmtech/KasmVNC
|
||||||
|
|
||||||
BuildRequires: rsync
|
BuildRequires: rsync
|
||||||
Requires: xorg-x11-xauth, xorg-x11-xkb-utils, xkeyboard-config, xorg-x11-server-utils, openssl, perl, perl-Switch, perl-YAML-Tiny, perl-Hash-Merge-Simple, perl-Scalar-List-Utils, perl-List-MoreUtils, perl-Try-Tiny
|
Requires: xorg-x11-xauth, xorg-x11-xkb-utils, xkeyboard-config, xorg-x11-server-utils, openssl, perl, perl-Switch, perl-YAML-Tiny, perl-Hash-Merge-Simple, perl-Scalar-List-Utils, perl-List-MoreUtils, perl-Try-Tiny, perl-DateTime-TimeZone
|
||||||
Conflicts: tigervnc-server, tigervnc-server-minimal
|
Conflicts: tigervnc-server, tigervnc-server-minimal
|
||||||
|
|
||||||
%description
|
%description
|
||||||
KasmVNC provides remote web-based access to a Desktop or application.
|
KasmVNC provides remote web-based access to a Desktop or application.
|
||||||
While VNC is in the name, KasmVNC differs from other VNC variants such
|
While VNC is in the name, KasmVNC differs from other VNC variants such
|
||||||
as TigerVNC, RealVNC, and TurboVNC. KasmVNC has broken from the RFB
|
as TigerVNC, RealVNC, and TurboVNC. KasmVNC has broken from the RFB
|
||||||
specification which defines VNC, in order to support modern technologies
|
specification which defines VNC, in order to support modern technologies
|
||||||
and increase security. KasmVNC is accessed by users from any modern
|
and increase security. KasmVNC is accessed by users from any modern
|
||||||
browser and does not support legacy VNC viewer applications. KasmVNC
|
browser and does not support legacy VNC viewer applications. KasmVNC
|
||||||
uses a modern YAML based configuration at the server and user level,
|
uses a modern YAML based configuration at the server and user level,
|
||||||
allowing for ease of management. KasmVNC is maintained by Kasm
|
allowing for ease of management. KasmVNC is maintained by Kasm
|
||||||
Technologies Corp, www.kasmweb.com.
|
Technologies Corp, www.kasmweb.com.
|
||||||
|
|
||||||
WARNING: this package requires EPEL.
|
WARNING: this package requires EPEL.
|
||||||
@@ -52,7 +52,7 @@ cp $SRC_BIN/kasmxproxy $DESTDIR/usr/bin;
|
|||||||
cp -r $SRC/lib/kasmvnc/ $DESTDIR/usr/lib/kasmvncserver
|
cp -r $SRC/lib/kasmvnc/ $DESTDIR/usr/lib/kasmvncserver
|
||||||
cd $DESTDIR/usr/bin && ln -s kasmvncpasswd vncpasswd;
|
cd $DESTDIR/usr/bin && ln -s kasmvncpasswd vncpasswd;
|
||||||
cp -r $SRC/share/doc/kasmvnc*/* $DESTDIR/usr/share/doc/kasmvncserver/
|
cp -r $SRC/share/doc/kasmvnc*/* $DESTDIR/usr/share/doc/kasmvncserver/
|
||||||
rsync -r --exclude '.git*' --exclude po2js --exclude xgettext-html \
|
rsync -r --links --safe-links --exclude '.git*' --exclude po2js --exclude xgettext-html \
|
||||||
--exclude www/utils/ --exclude .eslintrc --exclude configure \
|
--exclude www/utils/ --exclude .eslintrc --exclude configure \
|
||||||
$SRC/share/kasmvnc $DESTDIR/usr/share
|
$SRC/share/kasmvnc $DESTDIR/usr/share
|
||||||
|
|
||||||
@@ -83,6 +83,26 @@ cd $DST_MAN && ln -s vncpasswd.1 kasmvncpasswd.1;
|
|||||||
%doc /usr/share/doc/kasmvncserver/README.md
|
%doc /usr/share/doc/kasmvncserver/README.md
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 05 2024 KasmTech <info@kasmweb.com> - 1.3.0-1
|
||||||
|
- Multi-monitor support.
|
||||||
|
- Increased performance with watermark enabled.
|
||||||
|
- Added support for Fedora 39 and Alpine 319.
|
||||||
|
- Allow special characters in usernames.
|
||||||
|
- Better logging of client settings when client connects or changes settings.
|
||||||
|
- Add support for rotation of text-based watermark.
|
||||||
|
* Fri Aug 25 2023 KasmTech <info@kasmweb.com> - 1.2.0-1
|
||||||
|
- Add support for Unix relays for bidirectional communication between noVNC
|
||||||
|
and containerized applications.
|
||||||
|
- Text based watermark overlays with date and time support.
|
||||||
|
- New builds for Bookworm, Alpine 3.18, and Fedora 38.
|
||||||
|
- Multi-language support.
|
||||||
|
- Add support for rendering pixmaps via DRI3 GPU acceleration allowing
|
||||||
|
compositing and other 3d accelerated workloads in a KasmVNC session.
|
||||||
|
- Fix crash that can occur.
|
||||||
|
- Fixed tearing when compositing is enabled with DRI3 hardware acceleration.
|
||||||
|
- Fix stuck command key on MacOS clients.
|
||||||
|
* Wed Apr 05 2023 KasmTech <info@kasmweb.com> - 1.1.0-1
|
||||||
|
- Upstream release
|
||||||
* Tue Nov 29 2022 KasmTech <info@kasmweb.com> - 1.0.0-1
|
* Tue Nov 29 2022 KasmTech <info@kasmweb.com> - 1.0.0-1
|
||||||
- WebRTC UDP transit support with support of STUN servers
|
- WebRTC UDP transit support with support of STUN servers
|
||||||
- Lossless compression using multi-threaded WASM QOI decoder client side
|
- Lossless compression using multi-threaded WASM QOI decoder client side
|
||||||
|
|||||||
17
cmake/Modules/FindFreetype.cmake
Normal file
17
cmake/Modules/FindFreetype.cmake
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# - Find freetype
|
||||||
|
# Find the freetype libraries
|
||||||
|
#
|
||||||
|
# This module defines the following variables:
|
||||||
|
# FREETYPE_FOUND - True if freetype is found
|
||||||
|
# FREETYPE_INCLUDE_DIRS - include directories
|
||||||
|
#
|
||||||
|
|
||||||
|
find_package(PkgConfig)
|
||||||
|
pkg_check_modules(PC_FREETYPE freetype2)
|
||||||
|
find_path(FREETYPE_INCLUDE_DIRS NAMES ft2build.h HINTS ${PC_FREETYPE_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
set(FPHSA_NAME_MISMATCHED 1)
|
||||||
|
find_package_handle_standard_args(freetype DEFAULT_MSG FREETYPE_INCLUDE_DIRS)
|
||||||
|
unset(FPHSA_NAME_MISMATCHED)
|
||||||
|
mark_as_advanced(FREETYPE_INCLUDE_DIRS)
|
||||||
@@ -66,6 +66,7 @@ namespace network {
|
|||||||
void netResetFrameStatsCall();
|
void netResetFrameStatsCall();
|
||||||
uint8_t netServerFrameStatsReady();
|
uint8_t netServerFrameStatsReady();
|
||||||
void netUdpUpgrade(void *client, uint32_t ip);
|
void netUdpUpgrade(void *client, uint32_t ip);
|
||||||
|
void netClearClipboard();
|
||||||
|
|
||||||
enum USER_ACTION {
|
enum USER_ACTION {
|
||||||
NONE,
|
NONE,
|
||||||
@@ -73,7 +74,8 @@ namespace network {
|
|||||||
WANT_FRAME_STATS_ALL,
|
WANT_FRAME_STATS_ALL,
|
||||||
WANT_FRAME_STATS_OWNER,
|
WANT_FRAME_STATS_OWNER,
|
||||||
WANT_FRAME_STATS_SPECIFIC,
|
WANT_FRAME_STATS_SPECIFIC,
|
||||||
UDP_UPGRADE
|
UDP_UPGRADE,
|
||||||
|
CLEAR_CLIPBOARD,
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8_t netRequestFrameStats(USER_ACTION what, const char *client);
|
uint8_t netRequestFrameStats(USER_ACTION what, const char *client);
|
||||||
|
|||||||
@@ -550,7 +550,7 @@ void GetAPIMessager::netGetBottleneckStats(char *buf, uint32_t len) {
|
|||||||
const char *id = it->first.c_str();
|
const char *id = it->first.c_str();
|
||||||
const char *data = it->second.c_str();
|
const char *data = it->second.c_str();
|
||||||
|
|
||||||
const char *at = strchr(id, '@');
|
const char *at = strrchr(id, '@');
|
||||||
if (!at)
|
if (!at)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -806,3 +806,16 @@ void GetAPIMessager::netUdpUpgrade(void *client, uint32_t ip) {
|
|||||||
|
|
||||||
pthread_mutex_unlock(&userMutex);
|
pthread_mutex_unlock(&userMutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GetAPIMessager::netClearClipboard() {
|
||||||
|
action_data act;
|
||||||
|
act.action = CLEAR_CLIPBOARD;
|
||||||
|
|
||||||
|
// Send it in
|
||||||
|
if (pthread_mutex_lock(&userMutex))
|
||||||
|
return;
|
||||||
|
|
||||||
|
actionQueue.push_back(act);
|
||||||
|
|
||||||
|
pthread_mutex_unlock(&userMutex);
|
||||||
|
}
|
||||||
|
|||||||
@@ -545,6 +545,12 @@ static uint8_t serverFrameStatsReadyCb(void *messager)
|
|||||||
return msgr->netServerFrameStatsReady();
|
return msgr->netServerFrameStatsReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void clearClipboardCb(void *messager)
|
||||||
|
{
|
||||||
|
GetAPIMessager *msgr = (GetAPIMessager *) messager;
|
||||||
|
msgr->netClearClipboard();
|
||||||
|
}
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER < 0x1010000f
|
#if OPENSSL_VERSION_NUMBER < 0x1010000f
|
||||||
|
|
||||||
static pthread_mutex_t *sslmutex;
|
static pthread_mutex_t *sslmutex;
|
||||||
@@ -693,6 +699,8 @@ WebsocketListener::WebsocketListener(const struct sockaddr *listenaddr,
|
|||||||
settings.getClientFrameStatsNumCb = getClientFrameStatsNumCb;
|
settings.getClientFrameStatsNumCb = getClientFrameStatsNumCb;
|
||||||
settings.serverFrameStatsReadyCb = serverFrameStatsReadyCb;
|
settings.serverFrameStatsReadyCb = serverFrameStatsReadyCb;
|
||||||
|
|
||||||
|
settings.clearClipboardCb = clearClipboardCb;
|
||||||
|
|
||||||
openssl_threads();
|
openssl_threads();
|
||||||
|
|
||||||
pthread_t tid;
|
pthread_t tid;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ using namespace network;
|
|||||||
static rfb::LogWriter vlog("WebUdp");
|
static rfb::LogWriter vlog("WebUdp");
|
||||||
static WuHost *host = NULL;
|
static WuHost *host = NULL;
|
||||||
|
|
||||||
rfb::IntParameter udpSize("udpSize", "UDP packet data size", 1300, 500, 1400);
|
rfb::IntParameter udpSize("udpSize", "UDP packet data size", 1296, 500, 1400);
|
||||||
|
|
||||||
extern settings_t settings;
|
extern settings_t settings;
|
||||||
|
|
||||||
@@ -95,10 +95,11 @@ void *udpserver(void *nport) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Send one packet, split into N UDP-sized pieces
|
// Send one packet, split into N UDP-sized pieces
|
||||||
static uint8_t udpsend(WuClient *client, const uint8_t *data, unsigned len, uint32_t *id) {
|
static uint8_t udpsend(WuClient *client, const uint8_t *data, unsigned len, uint32_t *id,
|
||||||
|
const uint32_t *frame) {
|
||||||
const uint32_t DATA_MAX = udpSize;
|
const uint32_t DATA_MAX = udpSize;
|
||||||
|
|
||||||
uint8_t buf[1400 + sizeof(uint32_t) * 4];
|
uint8_t buf[1400 + sizeof(uint32_t) * 5];
|
||||||
const uint32_t pieces = (len / DATA_MAX) + ((len % DATA_MAX) ? 1 : 0);
|
const uint32_t pieces = (len / DATA_MAX) + ((len % DATA_MAX) ? 1 : 0);
|
||||||
|
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
@@ -111,12 +112,13 @@ static uint8_t udpsend(WuClient *client, const uint8_t *data, unsigned len, uint
|
|||||||
memcpy(&buf[4], &i, sizeof(uint32_t));
|
memcpy(&buf[4], &i, sizeof(uint32_t));
|
||||||
memcpy(&buf[8], &pieces, sizeof(uint32_t));
|
memcpy(&buf[8], &pieces, sizeof(uint32_t));
|
||||||
memcpy(&buf[12], &hash, sizeof(uint32_t));
|
memcpy(&buf[12], &hash, sizeof(uint32_t));
|
||||||
|
memcpy(&buf[16], frame, sizeof(uint32_t));
|
||||||
|
|
||||||
memcpy(&buf[16], data, curlen);
|
memcpy(&buf[20], data, curlen);
|
||||||
data += curlen;
|
data += curlen;
|
||||||
len -= curlen;
|
len -= curlen;
|
||||||
|
|
||||||
if (WuHostSendBinary(host, client, buf, curlen + sizeof(uint32_t) * 4) < 0)
|
if (WuHostSendBinary(host, client, buf, curlen + sizeof(uint32_t) * 5) < 0)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -125,7 +127,8 @@ static uint8_t udpsend(WuClient *client, const uint8_t *data, unsigned len, uint
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
UdpStream::UdpStream(): OutStream(), client(NULL), total_len(0), id(0), failed(false) {
|
UdpStream::UdpStream(): OutStream(), client(NULL), total_len(0), id(0), failed(false),
|
||||||
|
frame(0) {
|
||||||
ptr = data;
|
ptr = data;
|
||||||
end = data + UDPSTREAM_BUFSIZE;
|
end = data + UDPSTREAM_BUFSIZE;
|
||||||
|
|
||||||
@@ -137,7 +140,7 @@ void UdpStream::flush() {
|
|||||||
total_len += len;
|
total_len += len;
|
||||||
|
|
||||||
if (client) {
|
if (client) {
|
||||||
if (udpsend(client, data, len, &id)) {
|
if (udpsend(client, data, len, &id, &frame)) {
|
||||||
vlog.error("Error sending udp, client gone?");
|
vlog.error("Error sending udp, client gone?");
|
||||||
failed = true;
|
failed = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,10 @@ namespace network {
|
|||||||
client = cli;
|
client = cli;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setFrameNumber(const unsigned in) {
|
||||||
|
frame = in;
|
||||||
|
}
|
||||||
|
|
||||||
bool isFailed() const;
|
bool isFailed() const;
|
||||||
void clearFailed();
|
void clearFailed();
|
||||||
private:
|
private:
|
||||||
@@ -48,6 +52,7 @@ namespace network {
|
|||||||
size_t total_len;
|
size_t total_len;
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
bool failed;
|
bool failed;
|
||||||
|
uint32_t frame;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
#include <openssl/sha.h> /* sha1 hash */
|
#include <openssl/sha.h> /* sha1 hash */
|
||||||
#include "websocket.h"
|
#include "websocket.h"
|
||||||
#include "jsonescape.h"
|
#include "jsonescape.h"
|
||||||
#include "kasmpasswd.h"
|
|
||||||
#include <network/Blacklist.h>
|
#include <network/Blacklist.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1596,6 +1595,22 @@ static uint8_t ownerapi(ws_ctx_t *ws_ctx, const char *in, const char * const use
|
|||||||
ws_send(ws_ctx, buf, strlen(buf));
|
ws_send(ws_ctx, buf, strlen(buf));
|
||||||
weblog(200, wsthread_handler_id, 0, origip, ip, user, 1, origpath, strlen(buf));
|
weblog(200, wsthread_handler_id, 0, origip, ip, user, 1, origpath, strlen(buf));
|
||||||
|
|
||||||
|
ret = 1;
|
||||||
|
} else entry("/api/clear_clipboard") {
|
||||||
|
settings.clearClipboardCb(settings.messager);
|
||||||
|
write(wakeuppipe[1], "", 1);
|
||||||
|
|
||||||
|
sprintf(buf, "HTTP/1.1 200 OK\r\n"
|
||||||
|
"Server: KasmVNC/4.0\r\n"
|
||||||
|
"Connection: close\r\n"
|
||||||
|
"Content-type: text/plain\r\n"
|
||||||
|
"Content-length: 6\r\n"
|
||||||
|
"%s"
|
||||||
|
"\r\n"
|
||||||
|
"200 OK", extra_headers ? extra_headers : "");
|
||||||
|
ws_send(ws_ctx, buf, strlen(buf));
|
||||||
|
weblog(200, wsthread_handler_id, 0, origip, ip, user, 1, origpath, strlen(buf));
|
||||||
|
|
||||||
ret = 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1740,7 +1755,7 @@ ws_ctx_t *do_handshake(int sock, char * const ip) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned char owner = 0;
|
unsigned char owner = 0;
|
||||||
char inuser[32] = "-";
|
char inuser[USERNAME_LEN] = "-";
|
||||||
if (!settings.disablebasicauth) {
|
if (!settings.disablebasicauth) {
|
||||||
const char *hdr = strstr(handshake, "Authorization: Basic ");
|
const char *hdr = strstr(handshake, "Authorization: Basic ");
|
||||||
if (!hdr) {
|
if (!hdr) {
|
||||||
@@ -1778,7 +1793,7 @@ ws_ctx_t *do_handshake(int sock, char * const ip) {
|
|||||||
if (resppw && *resppw)
|
if (resppw && *resppw)
|
||||||
resppw++;
|
resppw++;
|
||||||
if (settings.passwdfile) {
|
if (settings.passwdfile) {
|
||||||
if (resppw && *resppw && resppw - response < 32) {
|
if (resppw && *resppw && resppw - response < USERNAME_LEN + 1) {
|
||||||
char pwbuf[4096];
|
char pwbuf[4096];
|
||||||
struct kasmpasswd_t *set = readkasmpasswd(settings.passwdfile);
|
struct kasmpasswd_t *set = readkasmpasswd(settings.passwdfile);
|
||||||
if (!set->num) {
|
if (!set->num) {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "GetAPIEnums.h"
|
#include "GetAPIEnums.h"
|
||||||
#include "datelog.h"
|
#include "datelog.h"
|
||||||
|
#include "kasmpasswd.h"
|
||||||
|
|
||||||
#define BUFSIZE 65536
|
#define BUFSIZE 65536
|
||||||
#define DBUFSIZE (BUFSIZE * 3) / 4 - 20
|
#define DBUFSIZE (BUFSIZE * 3) / 4 - 20
|
||||||
@@ -57,7 +58,7 @@ typedef struct {
|
|||||||
char *tin_buf;
|
char *tin_buf;
|
||||||
char *tout_buf;
|
char *tout_buf;
|
||||||
|
|
||||||
char user[32];
|
char user[USERNAME_LEN];
|
||||||
char ip[64];
|
char ip[64];
|
||||||
} ws_ctx_t;
|
} ws_ctx_t;
|
||||||
|
|
||||||
@@ -105,6 +106,8 @@ typedef struct {
|
|||||||
void (*getUsersCb)(void *messager, const char **buf);
|
void (*getUsersCb)(void *messager, const char **buf);
|
||||||
uint8_t (*getClientFrameStatsNumCb)(void *messager);
|
uint8_t (*getClientFrameStatsNumCb)(void *messager);
|
||||||
uint8_t (*serverFrameStatsReadyCb)(void *messager);
|
uint8_t (*serverFrameStatsReadyCb)(void *messager);
|
||||||
|
|
||||||
|
void (*clearClipboardCb)(void *messager);
|
||||||
} settings_t;
|
} settings_t;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
include_directories(${CMAKE_SOURCE_DIR}/common ${JPEG_INCLUDE_DIR}
|
include_directories(${CMAKE_SOURCE_DIR}/common ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR}
|
||||||
${CMAKE_SOURCE_DIR}/unix/kasmvncpasswd)
|
${CMAKE_SOURCE_DIR}/unix/kasmvncpasswd)
|
||||||
|
|
||||||
set(RFB_SOURCES
|
set(RFB_SOURCES
|
||||||
@@ -65,6 +65,7 @@ set(RFB_SOURCES
|
|||||||
VNCServerST.cxx
|
VNCServerST.cxx
|
||||||
ZRLEEncoder.cxx
|
ZRLEEncoder.cxx
|
||||||
ZRLEDecoder.cxx
|
ZRLEDecoder.cxx
|
||||||
|
Watermark.cxx
|
||||||
cpuid.cxx
|
cpuid.cxx
|
||||||
encodings.cxx
|
encodings.cxx
|
||||||
util.cxx
|
util.cxx
|
||||||
@@ -79,7 +80,7 @@ if(WIN32)
|
|||||||
set(RFB_SOURCES ${RFB_SOURCES} WinPasswdValidator.cxx)
|
set(RFB_SOURCES ${RFB_SOURCES} WinPasswdValidator.cxx)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
set(RFB_LIBRARIES ${JPEG_LIBRARIES} os rdr Xregion)
|
set(RFB_LIBRARIES ${JPEG_LIBRARIES} ${PNG_LIBRARIES} os rdr Xregion)
|
||||||
|
|
||||||
if(HAVE_PAM)
|
if(HAVE_PAM)
|
||||||
set(RFB_SOURCES ${RFB_SOURCES} UnixPasswordValidator.cxx
|
set(RFB_SOURCES ${RFB_SOURCES} UnixPasswordValidator.cxx
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include <rfb/Exception.h>
|
#include <rfb/Exception.h>
|
||||||
#include <rfb/encodings.h>
|
#include <rfb/encodings.h>
|
||||||
#include <rfb/ledStates.h>
|
#include <rfb/ledStates.h>
|
||||||
|
#include <rfb/LogWriter.h>
|
||||||
#include <rfb/clipboardTypes.h>
|
#include <rfb/clipboardTypes.h>
|
||||||
#include <rfb/ConnParams.h>
|
#include <rfb/ConnParams.h>
|
||||||
#include <rfb/ServerCore.h>
|
#include <rfb/ServerCore.h>
|
||||||
@@ -32,6 +33,19 @@
|
|||||||
|
|
||||||
using namespace rfb;
|
using namespace rfb;
|
||||||
|
|
||||||
|
static LogWriter vlog("CP");
|
||||||
|
|
||||||
|
static void clientparlog(const char name[], const bool applied) {
|
||||||
|
vlog.debug("Client sent config param %s, %s",
|
||||||
|
name,
|
||||||
|
applied ? "applied" : "ignored due to -IgnoreClientSettingsKasm/lacking perms");
|
||||||
|
}
|
||||||
|
static void clientparlog(const char name[], int val, const bool applied) {
|
||||||
|
vlog.debug("Client sent config param %s %d, %s",
|
||||||
|
name, val,
|
||||||
|
applied ? "applied" : "ignored due to -IgnoreClientSettingsKasm/lacking perms");
|
||||||
|
}
|
||||||
|
|
||||||
ConnParams::ConnParams()
|
ConnParams::ConnParams()
|
||||||
: majorVersion(0), minorVersion(0),
|
: majorVersion(0), minorVersion(0),
|
||||||
width(0), height(0), useCopyRect(false),
|
width(0), height(0), useCopyRect(false),
|
||||||
@@ -147,54 +161,71 @@ void ConnParams::setEncodings(int nEncodings, const rdr::S32* encodings)
|
|||||||
switch (encodings[i]) {
|
switch (encodings[i]) {
|
||||||
case encodingCopyRect:
|
case encodingCopyRect:
|
||||||
useCopyRect = true;
|
useCopyRect = true;
|
||||||
|
clientparlog("copyrect", true);
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingCursor:
|
case pseudoEncodingCursor:
|
||||||
supportsLocalCursor = true;
|
supportsLocalCursor = true;
|
||||||
|
clientparlog("cursor", true);
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingXCursor:
|
case pseudoEncodingXCursor:
|
||||||
supportsLocalXCursor = true;
|
supportsLocalXCursor = true;
|
||||||
|
clientparlog("xcursor", true);
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingCursorWithAlpha:
|
case pseudoEncodingCursorWithAlpha:
|
||||||
supportsLocalCursorWithAlpha = true;
|
supportsLocalCursorWithAlpha = true;
|
||||||
|
clientparlog("cursorWithAlpha", true);
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingVMwareCursor:
|
case pseudoEncodingVMwareCursor:
|
||||||
supportsVMWareCursor = true;
|
supportsVMWareCursor = true;
|
||||||
|
clientparlog("vmwareCursor", true);
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingDesktopSize:
|
case pseudoEncodingDesktopSize:
|
||||||
supportsDesktopResize = true;
|
supportsDesktopResize = true;
|
||||||
|
clientparlog("desktopSize", true);
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingExtendedDesktopSize:
|
case pseudoEncodingExtendedDesktopSize:
|
||||||
supportsExtendedDesktopSize = true;
|
supportsExtendedDesktopSize = true;
|
||||||
|
clientparlog("extendedDesktopSize", true);
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingVMwareCursorPosition:
|
case pseudoEncodingVMwareCursorPosition:
|
||||||
supportsCursorPosition = true;
|
supportsCursorPosition = true;
|
||||||
|
clientparlog("vmwareCursorPosition", true);
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingDesktopName:
|
case pseudoEncodingDesktopName:
|
||||||
supportsDesktopRename = true;
|
supportsDesktopRename = true;
|
||||||
|
clientparlog("desktopRename", true);
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingLastRect:
|
case pseudoEncodingLastRect:
|
||||||
supportsLastRect = true;
|
supportsLastRect = true;
|
||||||
|
clientparlog("lastRect", true);
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingLEDState:
|
case pseudoEncodingLEDState:
|
||||||
supportsLEDState = true;
|
supportsLEDState = true;
|
||||||
|
clientparlog("ledState", true);
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingQEMUKeyEvent:
|
case pseudoEncodingQEMUKeyEvent:
|
||||||
supportsQEMUKeyEvent = true;
|
supportsQEMUKeyEvent = true;
|
||||||
|
clientparlog("qemuKeyEvent", true);
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingWEBP:
|
case pseudoEncodingWEBP:
|
||||||
supportsWEBP = true;
|
supportsWEBP = true;
|
||||||
|
clientparlog("webp", true);
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingQOI:
|
case pseudoEncodingQOI:
|
||||||
supportsQOI = true;
|
supportsQOI = true;
|
||||||
|
clientparlog("qoi", true);
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingFence:
|
case pseudoEncodingFence:
|
||||||
supportsFence = true;
|
supportsFence = true;
|
||||||
|
clientparlog("fence", true);
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingContinuousUpdates:
|
case pseudoEncodingContinuousUpdates:
|
||||||
supportsContinuousUpdates = true;
|
supportsContinuousUpdates = true;
|
||||||
|
clientparlog("continuousUpdates", true);
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingExtendedClipboard:
|
case pseudoEncodingExtendedClipboard:
|
||||||
supportsExtendedClipboard = true;
|
supportsExtendedClipboard = true;
|
||||||
|
clientparlog("extendedClipboard", true);
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingSubsamp1X:
|
case pseudoEncodingSubsamp1X:
|
||||||
subsampling = subsampleNone;
|
subsampling = subsampleNone;
|
||||||
@@ -215,8 +246,12 @@ void ConnParams::setEncodings(int nEncodings, const rdr::S32* encodings)
|
|||||||
subsampling = subsample16X;
|
subsampling = subsample16X;
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingPreferBandwidth:
|
case pseudoEncodingPreferBandwidth:
|
||||||
if (!rfb::Server::ignoreClientSettingsKasm && canChangeSettings)
|
if (!rfb::Server::ignoreClientSettingsKasm && canChangeSettings) {
|
||||||
Server::preferBandwidth.setParam(true);
|
Server::preferBandwidth.setParam(true);
|
||||||
|
clientparlog("preferBandwidth", true);
|
||||||
|
} else {
|
||||||
|
clientparlog("preferBandwidth", false);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case pseudoEncodingMaxVideoResolution:
|
case pseudoEncodingMaxVideoResolution:
|
||||||
if (!rfb::Server::ignoreClientSettingsKasm && canChangeSettings)
|
if (!rfb::Server::ignoreClientSettingsKasm && canChangeSettings)
|
||||||
@@ -225,57 +260,133 @@ void ConnParams::setEncodings(int nEncodings, const rdr::S32* encodings)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (encodings[i] >= pseudoEncodingCompressLevel0 &&
|
if (encodings[i] >= pseudoEncodingCompressLevel0 &&
|
||||||
encodings[i] <= pseudoEncodingCompressLevel9)
|
encodings[i] <= pseudoEncodingCompressLevel9) {
|
||||||
compressLevel = encodings[i] - pseudoEncodingCompressLevel0;
|
compressLevel = encodings[i] - pseudoEncodingCompressLevel0;
|
||||||
|
clientparlog("compressLevel", compressLevel, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (encodings[i] >= pseudoEncodingQualityLevel0 &&
|
if (encodings[i] >= pseudoEncodingQualityLevel0 &&
|
||||||
encodings[i] <= pseudoEncodingQualityLevel9)
|
encodings[i] <= pseudoEncodingQualityLevel9) {
|
||||||
qualityLevel = encodings[i] - pseudoEncodingQualityLevel0;
|
qualityLevel = encodings[i] - pseudoEncodingQualityLevel0;
|
||||||
|
clientparlog("qualityLevel", qualityLevel, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (encodings[i] >= pseudoEncodingFineQualityLevel0 &&
|
if (encodings[i] >= pseudoEncodingFineQualityLevel0 &&
|
||||||
encodings[i] <= pseudoEncodingFineQualityLevel100)
|
encodings[i] <= pseudoEncodingFineQualityLevel100) {
|
||||||
fineQualityLevel = encodings[i] - pseudoEncodingFineQualityLevel0;
|
fineQualityLevel = encodings[i] - pseudoEncodingFineQualityLevel0;
|
||||||
|
clientparlog("fineQualityLevel", fineQualityLevel, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (!rfb::Server::ignoreClientSettingsKasm && canChangeSettings) {
|
if (!rfb::Server::ignoreClientSettingsKasm && canChangeSettings) {
|
||||||
if (encodings[i] >= pseudoEncodingJpegVideoQualityLevel0 &&
|
if (encodings[i] >= pseudoEncodingJpegVideoQualityLevel0 &&
|
||||||
encodings[i] <= pseudoEncodingJpegVideoQualityLevel9)
|
encodings[i] <= pseudoEncodingJpegVideoQualityLevel9) {
|
||||||
Server::jpegVideoQuality.setParam(encodings[i] - pseudoEncodingJpegVideoQualityLevel0);
|
Server::jpegVideoQuality.setParam(encodings[i] - pseudoEncodingJpegVideoQualityLevel0);
|
||||||
|
clientparlog("jpegVideoQuality", encodings[i] - pseudoEncodingJpegVideoQualityLevel0, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (encodings[i] >= pseudoEncodingWebpVideoQualityLevel0 &&
|
if (encodings[i] >= pseudoEncodingWebpVideoQualityLevel0 &&
|
||||||
encodings[i] <= pseudoEncodingWebpVideoQualityLevel9)
|
encodings[i] <= pseudoEncodingWebpVideoQualityLevel9) {
|
||||||
Server::webpVideoQuality.setParam(encodings[i] - pseudoEncodingWebpVideoQualityLevel0);
|
Server::webpVideoQuality.setParam(encodings[i] - pseudoEncodingWebpVideoQualityLevel0);
|
||||||
|
clientparlog("webpVideoQuality", encodings[i] - pseudoEncodingWebpVideoQualityLevel0, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (encodings[i] >= pseudoEncodingTreatLosslessLevel0 &&
|
if (encodings[i] >= pseudoEncodingTreatLosslessLevel0 &&
|
||||||
encodings[i] <= pseudoEncodingTreatLosslessLevel10)
|
encodings[i] <= pseudoEncodingTreatLosslessLevel10) {
|
||||||
Server::treatLossless.setParam(encodings[i] - pseudoEncodingTreatLosslessLevel0);
|
Server::treatLossless.setParam(encodings[i] - pseudoEncodingTreatLosslessLevel0);
|
||||||
|
clientparlog("treatLossless", encodings[i] - pseudoEncodingTreatLosslessLevel0, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (encodings[i] >= pseudoEncodingDynamicQualityMinLevel0 &&
|
if (encodings[i] >= pseudoEncodingDynamicQualityMinLevel0 &&
|
||||||
encodings[i] <= pseudoEncodingDynamicQualityMinLevel9)
|
encodings[i] <= pseudoEncodingDynamicQualityMinLevel9) {
|
||||||
Server::dynamicQualityMin.setParam(encodings[i] - pseudoEncodingDynamicQualityMinLevel0);
|
Server::dynamicQualityMin.setParam(encodings[i] - pseudoEncodingDynamicQualityMinLevel0);
|
||||||
|
clientparlog("dynamicQualityMin", encodings[i] - pseudoEncodingDynamicQualityMinLevel0, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (encodings[i] >= pseudoEncodingDynamicQualityMaxLevel0 &&
|
if (encodings[i] >= pseudoEncodingDynamicQualityMaxLevel0 &&
|
||||||
encodings[i] <= pseudoEncodingDynamicQualityMaxLevel9)
|
encodings[i] <= pseudoEncodingDynamicQualityMaxLevel9) {
|
||||||
Server::dynamicQualityMax.setParam(encodings[i] - pseudoEncodingDynamicQualityMaxLevel0);
|
Server::dynamicQualityMax.setParam(encodings[i] - pseudoEncodingDynamicQualityMaxLevel0);
|
||||||
|
clientparlog("dynamicQualityMax", encodings[i] - pseudoEncodingDynamicQualityMaxLevel0, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (encodings[i] >= pseudoEncodingVideoAreaLevel1 &&
|
if (encodings[i] >= pseudoEncodingVideoAreaLevel1 &&
|
||||||
encodings[i] <= pseudoEncodingVideoAreaLevel100)
|
encodings[i] <= pseudoEncodingVideoAreaLevel100) {
|
||||||
Server::videoArea.setParam(encodings[i] - pseudoEncodingVideoAreaLevel1 + 1);
|
Server::videoArea.setParam(encodings[i] - pseudoEncodingVideoAreaLevel1 + 1);
|
||||||
|
clientparlog("videoArea", encodings[i] - pseudoEncodingVideoAreaLevel1 + 1, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (encodings[i] >= pseudoEncodingVideoTimeLevel0 &&
|
if (encodings[i] >= pseudoEncodingVideoTimeLevel0 &&
|
||||||
encodings[i] <= pseudoEncodingVideoTimeLevel100)
|
encodings[i] <= pseudoEncodingVideoTimeLevel100) {
|
||||||
Server::videoTime.setParam(encodings[i] - pseudoEncodingVideoTimeLevel0);
|
Server::videoTime.setParam(encodings[i] - pseudoEncodingVideoTimeLevel0);
|
||||||
|
clientparlog("videoTime", encodings[i] - pseudoEncodingVideoTimeLevel0, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (encodings[i] >= pseudoEncodingVideoOutTimeLevel1 &&
|
if (encodings[i] >= pseudoEncodingVideoOutTimeLevel1 &&
|
||||||
encodings[i] <= pseudoEncodingVideoOutTimeLevel100)
|
encodings[i] <= pseudoEncodingVideoOutTimeLevel100) {
|
||||||
Server::videoOutTime.setParam(encodings[i] - pseudoEncodingVideoOutTimeLevel1 + 1);
|
Server::videoOutTime.setParam(encodings[i] - pseudoEncodingVideoOutTimeLevel1 + 1);
|
||||||
|
clientparlog("videoOutTime", encodings[i] - pseudoEncodingVideoOutTimeLevel1 + 1, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (encodings[i] >= pseudoEncodingFrameRateLevel10 &&
|
if (encodings[i] >= pseudoEncodingFrameRateLevel10 &&
|
||||||
encodings[i] <= pseudoEncodingFrameRateLevel60)
|
encodings[i] <= pseudoEncodingFrameRateLevel60) {
|
||||||
Server::frameRate.setParam(encodings[i] - pseudoEncodingFrameRateLevel10 + 10);
|
Server::frameRate.setParam(encodings[i] - pseudoEncodingFrameRateLevel10 + 10);
|
||||||
|
clientparlog("frameRate", encodings[i] - pseudoEncodingFrameRateLevel10 + 10, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (encodings[i] >= pseudoEncodingVideoScalingLevel0 &&
|
if (encodings[i] >= pseudoEncodingVideoScalingLevel0 &&
|
||||||
encodings[i] <= pseudoEncodingVideoScalingLevel9)
|
encodings[i] <= pseudoEncodingVideoScalingLevel9) {
|
||||||
Server::videoScaling.setParam(encodings[i] - pseudoEncodingVideoScalingLevel0);
|
Server::videoScaling.setParam(encodings[i] - pseudoEncodingVideoScalingLevel0);
|
||||||
|
clientparlog("videoScaling", encodings[i] - pseudoEncodingVideoScalingLevel0, true);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (encodings[i] >= pseudoEncodingJpegVideoQualityLevel0 &&
|
||||||
|
encodings[i] <= pseudoEncodingJpegVideoQualityLevel9) {
|
||||||
|
clientparlog("jpegVideoQuality", encodings[i] - pseudoEncodingJpegVideoQualityLevel0, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (encodings[i] >= pseudoEncodingWebpVideoQualityLevel0 &&
|
||||||
|
encodings[i] <= pseudoEncodingWebpVideoQualityLevel9) {
|
||||||
|
clientparlog("webpVideoQuality", encodings[i] - pseudoEncodingWebpVideoQualityLevel0, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (encodings[i] >= pseudoEncodingTreatLosslessLevel0 &&
|
||||||
|
encodings[i] <= pseudoEncodingTreatLosslessLevel10) {
|
||||||
|
clientparlog("treatLossless", encodings[i] - pseudoEncodingTreatLosslessLevel0, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (encodings[i] >= pseudoEncodingDynamicQualityMinLevel0 &&
|
||||||
|
encodings[i] <= pseudoEncodingDynamicQualityMinLevel9) {
|
||||||
|
clientparlog("dynamicQualityMin", encodings[i] - pseudoEncodingDynamicQualityMinLevel0, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (encodings[i] >= pseudoEncodingDynamicQualityMaxLevel0 &&
|
||||||
|
encodings[i] <= pseudoEncodingDynamicQualityMaxLevel9) {
|
||||||
|
clientparlog("dynamicQualityMax", encodings[i] - pseudoEncodingDynamicQualityMaxLevel0, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (encodings[i] >= pseudoEncodingVideoAreaLevel1 &&
|
||||||
|
encodings[i] <= pseudoEncodingVideoAreaLevel100) {
|
||||||
|
clientparlog("videoArea", encodings[i] - pseudoEncodingVideoAreaLevel1 + 1, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (encodings[i] >= pseudoEncodingVideoTimeLevel0 &&
|
||||||
|
encodings[i] <= pseudoEncodingVideoTimeLevel100) {
|
||||||
|
clientparlog("videoTime", encodings[i] - pseudoEncodingVideoTimeLevel0, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (encodings[i] >= pseudoEncodingVideoOutTimeLevel1 &&
|
||||||
|
encodings[i] <= pseudoEncodingVideoOutTimeLevel100) {
|
||||||
|
clientparlog("videoOutTime", encodings[i] - pseudoEncodingVideoOutTimeLevel1 + 1, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (encodings[i] >= pseudoEncodingFrameRateLevel10 &&
|
||||||
|
encodings[i] <= pseudoEncodingFrameRateLevel60) {
|
||||||
|
clientparlog("frameRate", encodings[i] - pseudoEncodingFrameRateLevel10 + 10, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (encodings[i] >= pseudoEncodingVideoScalingLevel0 &&
|
||||||
|
encodings[i] <= pseudoEncodingVideoScalingLevel9) {
|
||||||
|
clientparlog("videoScaling", encodings[i] - pseudoEncodingVideoScalingLevel0, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (encodings[i] > 0)
|
if (encodings[i] > 0)
|
||||||
@@ -285,6 +396,8 @@ void ConnParams::setEncodings(int nEncodings, const rdr::S32* encodings)
|
|||||||
// QOI-specific overrides
|
// QOI-specific overrides
|
||||||
if (supportsQOI)
|
if (supportsQOI)
|
||||||
useCopyRect = false;
|
useCopyRect = false;
|
||||||
|
if (Server::DLP_WatermarkImage[0])
|
||||||
|
useCopyRect = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConnParams::setLEDState(unsigned int state)
|
void ConnParams::setLEDState(unsigned int state)
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include <rfb/UpdateTracker.h>
|
#include <rfb/UpdateTracker.h>
|
||||||
#include <rfb/LogWriter.h>
|
#include <rfb/LogWriter.h>
|
||||||
#include <rfb/Exception.h>
|
#include <rfb/Exception.h>
|
||||||
|
#include <rfb/Watermark.h>
|
||||||
|
|
||||||
#include <rfb/RawEncoder.h>
|
#include <rfb/RawEncoder.h>
|
||||||
#include <rfb/RREEncoder.h>
|
#include <rfb/RREEncoder.h>
|
||||||
@@ -162,6 +163,7 @@ static void updateMaxVideoRes(uint16_t *x, uint16_t *y) {
|
|||||||
EncodeManager::EncodeManager(SConnection* conn_, EncCache *encCache_) : conn(conn_),
|
EncodeManager::EncodeManager(SConnection* conn_, EncCache *encCache_) : conn(conn_),
|
||||||
dynamicQualityMin(-1), dynamicQualityOff(-1),
|
dynamicQualityMin(-1), dynamicQualityOff(-1),
|
||||||
areaCur(0), videoDetected(false), videoTimer(this),
|
areaCur(0), videoDetected(false), videoTimer(this),
|
||||||
|
watermarkStats(0),
|
||||||
maxEncodingTime(0), framesSinceEncPrint(0),
|
maxEncodingTime(0), framesSinceEncPrint(0),
|
||||||
encCache(encCache_)
|
encCache(encCache_)
|
||||||
{
|
{
|
||||||
@@ -299,6 +301,11 @@ void EncodeManager::logStats()
|
|||||||
vlog.info(" Total: %s, %s", a, b);
|
vlog.info(" Total: %s, %s", a, b);
|
||||||
iecPrefix(bytes, "B", a, sizeof(a));
|
iecPrefix(bytes, "B", a, sizeof(a));
|
||||||
vlog.info(" %s (1:%g ratio)", a, ratio);
|
vlog.info(" %s (1:%g ratio)", a, ratio);
|
||||||
|
|
||||||
|
if (watermarkData) {
|
||||||
|
siPrefix(watermarkStats, "B", a, sizeof(a));
|
||||||
|
vlog.info(" Watermark data sent: %s", a);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EncodeManager::supported(int encoding)
|
bool EncodeManager::supported(int encoding)
|
||||||
@@ -356,6 +363,9 @@ void EncodeManager::doUpdate(bool allowLossy, const Region& changed_,
|
|||||||
unsigned screenArea;
|
unsigned screenArea;
|
||||||
|
|
||||||
updates++;
|
updates++;
|
||||||
|
if (conn->cp.supportsUdp)
|
||||||
|
((network::UdpStream *) conn->getOutStream(conn->cp.supportsUdp))->setFrameNumber(updates);
|
||||||
|
|
||||||
|
|
||||||
// The video resolution may have changed, check it
|
// The video resolution may have changed, check it
|
||||||
if (conn->cp.kasmPassed[ConnParams::KASM_MAX_VIDEO_RESOLUTION])
|
if (conn->cp.kasmPassed[ConnParams::KASM_MAX_VIDEO_RESOLUTION])
|
||||||
@@ -408,6 +418,9 @@ void EncodeManager::doUpdate(bool allowLossy, const Region& changed_,
|
|||||||
nRects += copypassed.size();
|
nRects += copypassed.size();
|
||||||
nRects += computeNumRects(changed);
|
nRects += computeNumRects(changed);
|
||||||
nRects += computeNumRects(cursorRegion);
|
nRects += computeNumRects(cursorRegion);
|
||||||
|
|
||||||
|
if (watermarkData)
|
||||||
|
nRects++;
|
||||||
}
|
}
|
||||||
|
|
||||||
conn->writer()->writeFramebufferUpdateStart(nRects);
|
conn->writer()->writeFramebufferUpdateStart(nRects);
|
||||||
@@ -427,6 +440,23 @@ void EncodeManager::doUpdate(bool allowLossy, const Region& changed_,
|
|||||||
if (!videoDetected) // In case detection happened between the calls
|
if (!videoDetected) // In case detection happened between the calls
|
||||||
writeRects(cursorRegion, renderedCursor);
|
writeRects(cursorRegion, renderedCursor);
|
||||||
|
|
||||||
|
if (watermarkData && conn->sendWatermark()) {
|
||||||
|
beforeLength = conn->getOutStream(conn->cp.supportsUdp)->length();
|
||||||
|
|
||||||
|
const Rect rect(0, 0, pb->width(), pb->height());
|
||||||
|
TightEncoder *encoder = ((TightEncoder *) encoders[encoderTight]);
|
||||||
|
|
||||||
|
conn->writer()->startRect(rect, encoder->encoding);
|
||||||
|
encoder->writeWatermarkRect(watermarkData, watermarkDataLen,
|
||||||
|
watermarkInfo.r,
|
||||||
|
watermarkInfo.g,
|
||||||
|
watermarkInfo.b,
|
||||||
|
watermarkInfo.a);
|
||||||
|
conn->writer()->endRect();
|
||||||
|
|
||||||
|
watermarkStats += conn->getOutStream(conn->cp.supportsUdp)->length() - beforeLength;
|
||||||
|
}
|
||||||
|
|
||||||
updateQualities();
|
updateQualities();
|
||||||
|
|
||||||
conn->writer()->writeFramebufferUpdateEnd();
|
conn->writer()->writeFramebufferUpdateEnd();
|
||||||
|
|||||||
@@ -193,6 +193,7 @@ namespace rfb {
|
|||||||
unsigned updates;
|
unsigned updates;
|
||||||
EncoderStats copyStats;
|
EncoderStats copyStats;
|
||||||
StatsVector stats;
|
StatsVector stats;
|
||||||
|
unsigned long long watermarkStats;
|
||||||
int activeType;
|
int activeType;
|
||||||
int beforeLength;
|
int beforeLength;
|
||||||
size_t curMaxUpdateSize;
|
size_t curMaxUpdateSize;
|
||||||
|
|||||||
@@ -239,3 +239,8 @@ void rfb::Region::debug_print(const char* prefix) const
|
|||||||
xrgn->rects[i].y2-xrgn->rects[i].y1);
|
xrgn->rects[i].y2-xrgn->rects[i].y1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool rfb::Region::contains(int x, int y) const
|
||||||
|
{
|
||||||
|
return XPointInRegion(xrgn, x, y);
|
||||||
|
}
|
||||||
|
|||||||
@@ -73,6 +73,8 @@ namespace rfb {
|
|||||||
|
|
||||||
void debug_print(const char *prefix) const;
|
void debug_print(const char *prefix) const;
|
||||||
|
|
||||||
|
bool contains(int x, int y) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
struct _XRegion* xrgn;
|
struct _XRegion* xrgn;
|
||||||
|
|||||||
@@ -198,6 +198,10 @@ namespace rfb {
|
|||||||
std::vector<unsigned char> data;
|
std::vector<unsigned char> data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
virtual bool sendWatermark() const {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void setState(stateEnum s) { state_ = s; }
|
void setState(stateEnum s) { state_ = s; }
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,11 @@ namespace rfb {
|
|||||||
virtual void handleClipboardAnnounceBinary(const unsigned __unused_attr num,
|
virtual void handleClipboardAnnounceBinary(const unsigned __unused_attr num,
|
||||||
const char __unused_attr mimes[][32]) {}
|
const char __unused_attr mimes[][32]) {}
|
||||||
|
|
||||||
|
virtual void clearLocalClipboards() {}
|
||||||
|
|
||||||
|
virtual void receivedUnixRelayData(const char name[], const unsigned char *buf,
|
||||||
|
const unsigned len) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~SDesktop() {}
|
virtual ~SDesktop() {}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -98,6 +98,9 @@ namespace rfb {
|
|||||||
virtual void udpUpgrade(const char *resp) = 0;
|
virtual void udpUpgrade(const char *resp) = 0;
|
||||||
virtual void udpDowngrade(const bool) = 0;
|
virtual void udpDowngrade(const bool) = 0;
|
||||||
|
|
||||||
|
virtual void subscribeUnixRelay(const char *name) = 0;
|
||||||
|
virtual void unixRelay(const char *name, const rdr::U8 *buf, const unsigned len) = 0;
|
||||||
|
|
||||||
ConnParams cp;
|
ConnParams cp;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,6 +100,12 @@ void SMsgReader::readMsg()
|
|||||||
case msgTypeUpgradeToUdp:
|
case msgTypeUpgradeToUdp:
|
||||||
readUpgradeToUdp();
|
readUpgradeToUdp();
|
||||||
break;
|
break;
|
||||||
|
case msgTypeSubscribeUnixRelay:
|
||||||
|
readSubscribeUnixRelay();
|
||||||
|
break;
|
||||||
|
case msgTypeUnixRelay:
|
||||||
|
readUnixRelay();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "unknown message type %d\n", msgType);
|
fprintf(stderr, "unknown message type %d\n", msgType);
|
||||||
throw Exception("unknown message type");
|
throw Exception("unknown message type");
|
||||||
@@ -165,6 +171,9 @@ void SMsgReader::readSetMaxVideoResolution()
|
|||||||
if (!rfb::Server::ignoreClientSettingsKasm && handler->canChangeKasmSettings()) {
|
if (!rfb::Server::ignoreClientSettingsKasm && handler->canChangeKasmSettings()) {
|
||||||
sprintf(tmp, "%ux%u", width, height);
|
sprintf(tmp, "%ux%u", width, height);
|
||||||
rfb::Server::maxVideoResolution.setParam(tmp);
|
rfb::Server::maxVideoResolution.setParam(tmp);
|
||||||
|
vlog.debug("Client sent config param maxVideoResolution %ux%u, applied", width, height);
|
||||||
|
} else {
|
||||||
|
vlog.debug("Client sent config param maxVideoResolution %ux%u, ignored due to -IgnoreClientSettingsKasm/lacking perms", width, height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -357,3 +366,42 @@ void SMsgReader::readUpgradeToUdp()
|
|||||||
|
|
||||||
handler->udpUpgrade(resp);
|
handler->udpUpgrade(resp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SMsgReader::readSubscribeUnixRelay()
|
||||||
|
{
|
||||||
|
const rdr::U8 namelen = is->readU8();
|
||||||
|
char name[64];
|
||||||
|
if (namelen >= sizeof(name)) {
|
||||||
|
vlog.error("Ignoring subscribe with too large name");
|
||||||
|
is->skip(namelen);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
is->readBytes(name, namelen);
|
||||||
|
name[namelen] = '\0';
|
||||||
|
|
||||||
|
handler->subscribeUnixRelay(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SMsgReader::readUnixRelay()
|
||||||
|
{
|
||||||
|
const rdr::U8 namelen = is->readU8();
|
||||||
|
char name[64];
|
||||||
|
if (namelen >= sizeof(name)) {
|
||||||
|
vlog.error("Ignoring relay packet with too large name");
|
||||||
|
is->skip(namelen);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
is->readBytes(name, namelen);
|
||||||
|
name[namelen] = '\0';
|
||||||
|
|
||||||
|
const rdr::U32 len = is->readU32();
|
||||||
|
rdr::U8 buf[1024 * 1024];
|
||||||
|
if (len >= sizeof(buf)) {
|
||||||
|
vlog.error("Ignoring relay packet with too large data");
|
||||||
|
is->skip(len);
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
is->readBytes(buf, len);
|
||||||
|
|
||||||
|
handler->unixRelay(name, buf, len);
|
||||||
|
}
|
||||||
|
|||||||
@@ -65,6 +65,9 @@ namespace rfb {
|
|||||||
|
|
||||||
void readUpgradeToUdp();
|
void readUpgradeToUdp();
|
||||||
|
|
||||||
|
void readSubscribeUnixRelay();
|
||||||
|
void readUnixRelay();
|
||||||
|
|
||||||
SMsgHandler* handler;
|
SMsgHandler* handler;
|
||||||
rdr::InStream* is;
|
rdr::InStream* is;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ static LogWriter vlog("SMsgWriter");
|
|||||||
|
|
||||||
SMsgWriter::SMsgWriter(ConnParams* cp_, rdr::OutStream* os_, rdr::OutStream* udps_)
|
SMsgWriter::SMsgWriter(ConnParams* cp_, rdr::OutStream* os_, rdr::OutStream* udps_)
|
||||||
: cp(cp_), os(os_), udps(udps_),
|
: cp(cp_), os(os_), udps(udps_),
|
||||||
nRectsInUpdate(0), nRectsInHeader(0),
|
nRectsInUpdate(0), dataRectsInUpdate(0), nRectsInHeader(0),
|
||||||
needSetDesktopSize(false), needExtendedDesktopSize(false),
|
needSetDesktopSize(false), needExtendedDesktopSize(false),
|
||||||
needSetDesktopName(false), needSetCursor(false),
|
needSetDesktopName(false), needSetCursor(false),
|
||||||
needSetXCursor(false), needSetCursorWithAlpha(false),
|
needSetXCursor(false), needSetCursorWithAlpha(false),
|
||||||
@@ -340,7 +340,7 @@ void SMsgWriter::writeFramebufferUpdateStart(int nRects)
|
|||||||
|
|
||||||
os->writeU16(nRects);
|
os->writeU16(nRects);
|
||||||
|
|
||||||
nRectsInUpdate = 0;
|
nRectsInUpdate = dataRectsInUpdate = 0;
|
||||||
if (nRects == 0xFFFF)
|
if (nRects == 0xFFFF)
|
||||||
nRectsInHeader = 0;
|
nRectsInHeader = 0;
|
||||||
else
|
else
|
||||||
@@ -365,7 +365,7 @@ void SMsgWriter::writeFramebufferUpdateEnd()
|
|||||||
|
|
||||||
// Send an UDP flip marker, if needed
|
// Send an UDP flip marker, if needed
|
||||||
if (cp->supportsUdp) {
|
if (cp->supportsUdp) {
|
||||||
udps->writeS16(0);
|
udps->writeS16(dataRectsInUpdate);
|
||||||
udps->writeS16(0);
|
udps->writeS16(0);
|
||||||
udps->writeU16(0);
|
udps->writeU16(0);
|
||||||
udps->writeU16(0);
|
udps->writeU16(0);
|
||||||
@@ -394,6 +394,7 @@ void SMsgWriter::startRect(const Rect& r, int encoding)
|
|||||||
{
|
{
|
||||||
if (++nRectsInUpdate > nRectsInHeader && nRectsInHeader)
|
if (++nRectsInUpdate > nRectsInHeader && nRectsInHeader)
|
||||||
throw Exception("SMsgWriter::startRect: nRects out of sync");
|
throw Exception("SMsgWriter::startRect: nRects out of sync");
|
||||||
|
++dataRectsInUpdate;
|
||||||
|
|
||||||
if (cp->supportsUdp) {
|
if (cp->supportsUdp) {
|
||||||
udps->writeS16(r.tl.x);
|
udps->writeS16(r.tl.x);
|
||||||
@@ -749,3 +750,29 @@ void SMsgWriter::writeUdpUpgrade(const char *resp)
|
|||||||
|
|
||||||
endMsg();
|
endMsg();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SMsgWriter::writeSubscribeUnixRelay(const bool success, const char *msg)
|
||||||
|
{
|
||||||
|
startMsg(msgTypeSubscribeUnixRelay);
|
||||||
|
|
||||||
|
const rdr::U8 len = strlen(msg);
|
||||||
|
os->writeU8(success);
|
||||||
|
os->writeU8(len);
|
||||||
|
os->writeBytes(msg, len);
|
||||||
|
|
||||||
|
endMsg();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SMsgWriter::writeUnixRelay(const char *name, const rdr::U8 *buf, const unsigned len)
|
||||||
|
{
|
||||||
|
startMsg(msgTypeUnixRelay);
|
||||||
|
|
||||||
|
const rdr::U8 namelen = strlen(name);
|
||||||
|
os->writeU8(namelen);
|
||||||
|
os->writeBytes(name, namelen);
|
||||||
|
|
||||||
|
os->writeU32(len);
|
||||||
|
os->writeBytes(buf, len);
|
||||||
|
|
||||||
|
endMsg();
|
||||||
|
}
|
||||||
|
|||||||
@@ -129,6 +129,9 @@ namespace rfb {
|
|||||||
|
|
||||||
void writeUdpUpgrade(const char *resp);
|
void writeUdpUpgrade(const char *resp);
|
||||||
|
|
||||||
|
void writeSubscribeUnixRelay(const bool success, const char *msg);
|
||||||
|
void writeUnixRelay(const char *name, const rdr::U8 *buf, const unsigned len);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void startMsg(int type);
|
void startMsg(int type);
|
||||||
void endMsg();
|
void endMsg();
|
||||||
@@ -162,6 +165,7 @@ namespace rfb {
|
|||||||
rdr::OutStream* udps;
|
rdr::OutStream* udps;
|
||||||
|
|
||||||
int nRectsInUpdate;
|
int nRectsInUpdate;
|
||||||
|
int dataRectsInUpdate;
|
||||||
int nRectsInHeader;
|
int nRectsInHeader;
|
||||||
|
|
||||||
bool needSetDesktopSize;
|
bool needSetDesktopSize;
|
||||||
|
|||||||
@@ -185,6 +185,47 @@ rfb::BoolParameter rfb::Server::DLP_RegionAllowRelease
|
|||||||
"Allow click releases inside the blacked-out region",
|
"Allow click releases inside the blacked-out region",
|
||||||
true);
|
true);
|
||||||
|
|
||||||
|
rfb::IntParameter rfb::Server::DLP_WatermarkRepeatSpace
|
||||||
|
("DLP_WatermarkRepeatSpace",
|
||||||
|
"Number of pixels between repeats of the watermark",
|
||||||
|
0, 0, 4096);
|
||||||
|
rfb::IntParameter rfb::Server::DLP_WatermarkFontSize
|
||||||
|
("DLP_WatermarkFontSize",
|
||||||
|
"Font size for -DLP_WatermarkText",
|
||||||
|
48, 8, 256);
|
||||||
|
rfb::IntParameter rfb::Server::DLP_WatermarkTimeOffset
|
||||||
|
("DLP_WatermarkTimeOffset",
|
||||||
|
"Offset from UTC for -DLP_WatermarkText",
|
||||||
|
0, -24, 24);
|
||||||
|
rfb::IntParameter rfb::Server::DLP_WatermarkTimeOffsetMinutes
|
||||||
|
("DLP_WatermarkTimeOffsetMinutes",
|
||||||
|
"Offset from UTC for -DLP_WatermarkText, minutes",
|
||||||
|
0, -24 * 60, 24 * 60);
|
||||||
|
rfb::IntParameter rfb::Server::DLP_WatermarkTextAngle
|
||||||
|
("DLP_WatermarkTextAngle",
|
||||||
|
"Angle for -DLP_WatermarkText rotation",
|
||||||
|
0, -359, 359);
|
||||||
|
rfb::StringParameter rfb::Server::DLP_WatermarkImage
|
||||||
|
("DLP_WatermarkImage",
|
||||||
|
"PNG file to use as a watermark",
|
||||||
|
"");
|
||||||
|
rfb::StringParameter rfb::Server::DLP_WatermarkLocation
|
||||||
|
("DLP_WatermarkLocation",
|
||||||
|
"Place the watermark at this position from the corner.",
|
||||||
|
"");
|
||||||
|
rfb::StringParameter rfb::Server::DLP_WatermarkTint
|
||||||
|
("DLP_WatermarkTint",
|
||||||
|
"Tint the greyscale watermark by this color.",
|
||||||
|
"255,255,255,255");
|
||||||
|
rfb::StringParameter rfb::Server::DLP_WatermarkText
|
||||||
|
("DLP_WatermarkText",
|
||||||
|
"Use this text instead of an image for the watermark, with strftime time formatting",
|
||||||
|
"");
|
||||||
|
rfb::StringParameter rfb::Server::DLP_WatermarkFont
|
||||||
|
("DLP_WatermarkFont",
|
||||||
|
"Use this font for -DLP_WatermarkText instead of the bundled one",
|
||||||
|
"");
|
||||||
|
|
||||||
rfb::StringParameter rfb::Server::maxVideoResolution
|
rfb::StringParameter rfb::Server::maxVideoResolution
|
||||||
("MaxVideoResolution",
|
("MaxVideoResolution",
|
||||||
"When in video mode, downscale the screen to max this size.",
|
"When in video mode, downscale the screen to max this size.",
|
||||||
|
|||||||
@@ -48,9 +48,19 @@ namespace rfb {
|
|||||||
static IntParameter DLP_ClipAcceptMax;
|
static IntParameter DLP_ClipAcceptMax;
|
||||||
static IntParameter DLP_ClipDelay;
|
static IntParameter DLP_ClipDelay;
|
||||||
static IntParameter DLP_KeyRateLimit;
|
static IntParameter DLP_KeyRateLimit;
|
||||||
|
static IntParameter DLP_WatermarkRepeatSpace;
|
||||||
|
static IntParameter DLP_WatermarkFontSize;
|
||||||
|
static IntParameter DLP_WatermarkTimeOffset;
|
||||||
|
static IntParameter DLP_WatermarkTimeOffsetMinutes;
|
||||||
|
static IntParameter DLP_WatermarkTextAngle;
|
||||||
static StringParameter DLP_ClipLog;
|
static StringParameter DLP_ClipLog;
|
||||||
static StringParameter DLP_Region;
|
static StringParameter DLP_Region;
|
||||||
static StringParameter DLP_Clip_Types;
|
static StringParameter DLP_Clip_Types;
|
||||||
|
static StringParameter DLP_WatermarkImage;
|
||||||
|
static StringParameter DLP_WatermarkLocation;
|
||||||
|
static StringParameter DLP_WatermarkTint;
|
||||||
|
static StringParameter DLP_WatermarkText;
|
||||||
|
static StringParameter DLP_WatermarkFont;
|
||||||
static BoolParameter DLP_RegionAllowClick;
|
static BoolParameter DLP_RegionAllowClick;
|
||||||
static BoolParameter DLP_RegionAllowRelease;
|
static BoolParameter DLP_RegionAllowRelease;
|
||||||
static IntParameter jpegVideoQuality;
|
static IntParameter jpegVideoQuality;
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ namespace rfb {
|
|||||||
const unsigned int tightPng = 0x0a;
|
const unsigned int tightPng = 0x0a;
|
||||||
const unsigned int tightWebp = 0x0b;
|
const unsigned int tightWebp = 0x0b;
|
||||||
const unsigned int tightQoi = 0x0c;
|
const unsigned int tightQoi = 0x0c;
|
||||||
const unsigned int tightMaxSubencoding = 0x0c;
|
const unsigned int tightIT = 0x0d;
|
||||||
|
const unsigned int tightMaxSubencoding = 0x0d;
|
||||||
|
|
||||||
// Filters to improve compression efficiency
|
// Filters to improve compression efficiency
|
||||||
const unsigned int tightFilterCopy = 0x00;
|
const unsigned int tightFilterCopy = 0x00;
|
||||||
|
|||||||
@@ -277,6 +277,28 @@ void TightEncoder::resetZlib()
|
|||||||
zlibNeedsReset = true;
|
zlibNeedsReset = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TightEncoder::writeWatermarkRect(const rdr::U8 *data, const unsigned len,
|
||||||
|
const rdr::U8 r,
|
||||||
|
const rdr::U8 g,
|
||||||
|
const rdr::U8 b,
|
||||||
|
const rdr::U8 a)
|
||||||
|
{
|
||||||
|
rdr::OutStream* os;
|
||||||
|
|
||||||
|
os = conn->getOutStream(conn->cp.supportsUdp);
|
||||||
|
|
||||||
|
os->writeU8(tightIT << 4);
|
||||||
|
|
||||||
|
writeCompact(os, len + 4);
|
||||||
|
|
||||||
|
os->writeU8(r);
|
||||||
|
os->writeU8(g);
|
||||||
|
os->writeU8(b);
|
||||||
|
os->writeU8(a);
|
||||||
|
|
||||||
|
os->writeBytes(data, len);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Including BPP-dependent implementation of the encoder.
|
// Including BPP-dependent implementation of the encoder.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -39,6 +39,11 @@ namespace rfb {
|
|||||||
virtual void writeSolidRect(int width, int height,
|
virtual void writeSolidRect(int width, int height,
|
||||||
const PixelFormat& pf,
|
const PixelFormat& pf,
|
||||||
const rdr::U8* colour);
|
const rdr::U8* colour);
|
||||||
|
void writeWatermarkRect(const rdr::U8 *data, const unsigned len,
|
||||||
|
const rdr::U8 r,
|
||||||
|
const rdr::U8 g,
|
||||||
|
const rdr::U8 b,
|
||||||
|
const rdr::U8 a);
|
||||||
void resetZlib();
|
void resetZlib();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ static Cursor emptyCursor(0, 0, Point(0, 0), NULL);
|
|||||||
|
|
||||||
extern rfb::BoolParameter disablebasicauth;
|
extern rfb::BoolParameter disablebasicauth;
|
||||||
|
|
||||||
|
extern "C" char unixrelaynames[MAX_UNIX_RELAYS][MAX_UNIX_RELAY_NAME_LEN];
|
||||||
|
|
||||||
VNCSConnectionST::VNCSConnectionST(VNCServerST* server_, network::Socket *s,
|
VNCSConnectionST::VNCSConnectionST(VNCServerST* server_, network::Socket *s,
|
||||||
bool reverse)
|
bool reverse)
|
||||||
: upgradingToUdp(false), sock(s), reverseConnection(reverse),
|
: upgradingToUdp(false), sock(s), reverseConnection(reverse),
|
||||||
@@ -64,7 +66,7 @@ VNCSConnectionST::VNCSConnectionST(VNCServerST* server_, network::Socket *s,
|
|||||||
needsPermCheck(false), pointerEventTime(0),
|
needsPermCheck(false), pointerEventTime(0),
|
||||||
clientHasCursor(false),
|
clientHasCursor(false),
|
||||||
accessRights(AccessDefault), startTime(time(0)), frameTracking(false),
|
accessRights(AccessDefault), startTime(time(0)), frameTracking(false),
|
||||||
udpFramesSinceFull(0)
|
udpFramesSinceFull(0), complainedAboutNoViewRights(false)
|
||||||
{
|
{
|
||||||
setStreams(&sock->inStream(), &sock->outStream());
|
setStreams(&sock->inStream(), &sock->outStream());
|
||||||
peerEndpoint.buf = sock->getPeerEndpoint();
|
peerEndpoint.buf = sock->getPeerEndpoint();
|
||||||
@@ -73,6 +75,10 @@ VNCSConnectionST::VNCSConnectionST(VNCServerST* server_, network::Socket *s,
|
|||||||
memset(bstats_total, 0, sizeof(bstats_total));
|
memset(bstats_total, 0, sizeof(bstats_total));
|
||||||
gettimeofday(&connStart, NULL);
|
gettimeofday(&connStart, NULL);
|
||||||
|
|
||||||
|
unsigned i;
|
||||||
|
for (i = 0; i < MAX_UNIX_RELAYS; i++)
|
||||||
|
unixRelaySubscriptions[i][0] = '\0';
|
||||||
|
|
||||||
// Check their permissions, if applicable
|
// Check their permissions, if applicable
|
||||||
kasmpasswdpath[0] = '\0';
|
kasmpasswdpath[0] = '\0';
|
||||||
wordexp_t wexp;
|
wordexp_t wexp;
|
||||||
@@ -82,8 +88,8 @@ VNCSConnectionST::VNCSConnectionST(VNCServerST* server_, network::Socket *s,
|
|||||||
wordfree(&wexp);
|
wordfree(&wexp);
|
||||||
|
|
||||||
user[0] = '\0';
|
user[0] = '\0';
|
||||||
const char *at = strchr(peerEndpoint.buf, '@');
|
const char *at = strrchr(peerEndpoint.buf, '@');
|
||||||
if (at && at - peerEndpoint.buf > 1 && at - peerEndpoint.buf < 32) {
|
if (at && at - peerEndpoint.buf > 1 && at - peerEndpoint.buf < USERNAME_LEN) {
|
||||||
memcpy(user, peerEndpoint.buf, at - peerEndpoint.buf);
|
memcpy(user, peerEndpoint.buf, at - peerEndpoint.buf);
|
||||||
user[at - peerEndpoint.buf] = '\0';
|
user[at - peerEndpoint.buf] = '\0';
|
||||||
}
|
}
|
||||||
@@ -991,8 +997,8 @@ void VNCSConnectionST::setDesktopSize(int fb_width, int fb_height,
|
|||||||
{
|
{
|
||||||
unsigned int result;
|
unsigned int result;
|
||||||
|
|
||||||
if (!(accessRights & AccessSetDesktopSize)) return;
|
if (!(accessRights & AccessSetDesktopSize)) goto justnotify;
|
||||||
if (!rfb::Server::acceptSetDesktopSize) return;
|
if (!rfb::Server::acceptSetDesktopSize) goto justnotify;
|
||||||
|
|
||||||
// Don't bother the desktop with an invalid configuration
|
// Don't bother the desktop with an invalid configuration
|
||||||
if (!layout.validate(fb_width, fb_height)) {
|
if (!layout.validate(fb_width, fb_height)) {
|
||||||
@@ -1015,6 +1021,14 @@ void VNCSConnectionST::setDesktopSize(int fb_width, int fb_height,
|
|||||||
throw Exception("Desktop configured a different screen layout than requested");
|
throw Exception("Desktop configured a different screen layout than requested");
|
||||||
server->notifyScreenLayoutChange(this);
|
server->notifyScreenLayoutChange(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
justnotify:
|
||||||
|
writer()->writeExtendedDesktopSize(reasonClient, resultProhibited,
|
||||||
|
server->pb->getRect().width(),
|
||||||
|
server->pb->getRect().height(),
|
||||||
|
server->screenLayout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VNCSConnectionST::fence(rdr::U32 flags, unsigned len, const char data[])
|
void VNCSConnectionST::fence(rdr::U32 flags, unsigned len, const char data[])
|
||||||
@@ -1308,8 +1322,14 @@ void VNCSConnectionST::writeFramebufferUpdate()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(accessRights & AccessView))
|
if (!(accessRights & AccessView)) {
|
||||||
|
if (!complainedAboutNoViewRights) {
|
||||||
|
complainedAboutNoViewRights = true;
|
||||||
|
vlog.error("User %s has no read permissions. If this is not intended, grant them permissions with kasmvncpasswd or via the API",
|
||||||
|
user);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Updates often consists of many small writes, and in continuous
|
// Updates often consists of many small writes, and in continuous
|
||||||
// mode, we will also have small fence messages around the update. We
|
// mode, we will also have small fence messages around the update. We
|
||||||
@@ -1623,7 +1643,7 @@ void VNCSConnectionST::sendStats(const bool toClient) {
|
|||||||
void VNCSConnectionST::handleFrameStats(rdr::U32 all, rdr::U32 render)
|
void VNCSConnectionST::handleFrameStats(rdr::U32 all, rdr::U32 render)
|
||||||
{
|
{
|
||||||
if (server->apimessager) {
|
if (server->apimessager) {
|
||||||
const char *at = strchr(peerEndpoint.buf, '@');
|
const char *at = strrchr(peerEndpoint.buf, '@');
|
||||||
if (!at)
|
if (!at)
|
||||||
at = peerEndpoint.buf;
|
at = peerEndpoint.buf;
|
||||||
else
|
else
|
||||||
@@ -1777,6 +1797,60 @@ void VNCSConnectionST::udpDowngrade(const bool byServer)
|
|||||||
cp.useCopyRect = true;
|
cp.useCopyRect = true;
|
||||||
encodeManager.resetZlib();
|
encodeManager.resetZlib();
|
||||||
|
|
||||||
|
if (Server::DLP_WatermarkImage[0])
|
||||||
|
cp.useCopyRect = false;
|
||||||
|
|
||||||
vlog.info("Client %s downgrading from udp by %s", sock->getPeerAddress(),
|
vlog.info("Client %s downgrading from udp by %s", sock->getPeerAddress(),
|
||||||
byServer ? "the server" : "its own request");
|
byServer ? "the server" : "its own request");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VNCSConnectionST::subscribeUnixRelay(const char *name)
|
||||||
|
{
|
||||||
|
bool read, write, owner;
|
||||||
|
if (!getPerms(read, write, owner) || !write) {
|
||||||
|
// Need write permissions to subscribe
|
||||||
|
writer()->writeSubscribeUnixRelay(false, "No permissions");
|
||||||
|
vlog.info("Client tried to subscribe to unix channel %s without permissions", name);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned i;
|
||||||
|
bool found = false;
|
||||||
|
for (i = 0; i < MAX_UNIX_RELAYS; i++) {
|
||||||
|
if (!strcmp(name, unixrelaynames[i])) {
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!found) {
|
||||||
|
writer()->writeSubscribeUnixRelay(false, "No such unix channel");
|
||||||
|
vlog.info("Client tried to subscribe to nonexistent unix channel %s", name);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
writer()->writeSubscribeUnixRelay(true, "Ok");
|
||||||
|
for (i = 0; i < MAX_UNIX_RELAYS; i++) {
|
||||||
|
if (!unixRelaySubscriptions[i][0]) {
|
||||||
|
strcpy(unixRelaySubscriptions[i], name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void VNCSConnectionST::unixRelay(const char *name, const rdr::U8 *buf, const unsigned len)
|
||||||
|
{
|
||||||
|
unsigned i;
|
||||||
|
for (i = 0; i < MAX_UNIX_RELAYS; i++) {
|
||||||
|
if (!strcmp(unixRelaySubscriptions[i], name)) {
|
||||||
|
server->desktop->receivedUnixRelayData(name, buf, len);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void VNCSConnectionST::sendUnixRelayData(const char name[], const unsigned char *buf,
|
||||||
|
const unsigned len)
|
||||||
|
{
|
||||||
|
writer()->writeUnixRelay(name, buf, len);
|
||||||
|
}
|
||||||
|
|||||||
@@ -33,6 +33,9 @@
|
|||||||
#include <rfb/EncodeManager.h>
|
#include <rfb/EncodeManager.h>
|
||||||
#include <rfb/SConnection.h>
|
#include <rfb/SConnection.h>
|
||||||
#include <rfb/Timer.h>
|
#include <rfb/Timer.h>
|
||||||
|
#include <rfb/unixRelayLimits.h>
|
||||||
|
|
||||||
|
#include "kasmpasswd.h"
|
||||||
|
|
||||||
namespace rfb {
|
namespace rfb {
|
||||||
class VNCServerST;
|
class VNCServerST;
|
||||||
@@ -200,6 +203,22 @@ namespace rfb {
|
|||||||
|
|
||||||
bool upgradingToUdp;
|
bool upgradingToUdp;
|
||||||
|
|
||||||
|
bool isSubscribedToUnixRelay(const char *name) const {
|
||||||
|
unsigned i;
|
||||||
|
for (i = 0; i < MAX_UNIX_RELAYS; i++) {
|
||||||
|
if (!strcmp(unixRelaySubscriptions[i], name))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void sendUnixRelayData(const char name[], const unsigned char *buf,
|
||||||
|
const unsigned len);
|
||||||
|
|
||||||
|
bool sendWatermark() const {
|
||||||
|
return server->sendWatermark;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// SConnection callbacks
|
// SConnection callbacks
|
||||||
|
|
||||||
@@ -222,6 +241,8 @@ namespace rfb {
|
|||||||
virtual void handleClipboardAnnounce(bool available);
|
virtual void handleClipboardAnnounce(bool available);
|
||||||
virtual void handleClipboardAnnounceBinary(const unsigned num, const char mimes[][32]);
|
virtual void handleClipboardAnnounceBinary(const unsigned num, const char mimes[][32]);
|
||||||
virtual void udpUpgrade(const char *resp);
|
virtual void udpUpgrade(const char *resp);
|
||||||
|
virtual void subscribeUnixRelay(const char *name);
|
||||||
|
virtual void unixRelay(const char *name, const rdr::U8 *buf, const unsigned len);
|
||||||
virtual void supportsLocalCursor();
|
virtual void supportsLocalCursor();
|
||||||
virtual void supportsFence();
|
virtual void supportsFence();
|
||||||
virtual void supportsContinuousUpdates();
|
virtual void supportsContinuousUpdates();
|
||||||
@@ -303,7 +324,7 @@ namespace rfb {
|
|||||||
rdr::U64 bstats_total[BS_NUM];
|
rdr::U64 bstats_total[BS_NUM];
|
||||||
struct timeval connStart;
|
struct timeval connStart;
|
||||||
|
|
||||||
char user[32];
|
char user[USERNAME_LEN];
|
||||||
char kasmpasswdpath[4096];
|
char kasmpasswdpath[4096];
|
||||||
bool needsPermCheck;
|
bool needsPermCheck;
|
||||||
|
|
||||||
@@ -324,6 +345,9 @@ namespace rfb {
|
|||||||
|
|
||||||
bool frameTracking;
|
bool frameTracking;
|
||||||
uint32_t udpFramesSinceFull;
|
uint32_t udpFramesSinceFull;
|
||||||
|
|
||||||
|
char unixRelaySubscriptions[MAX_UNIX_RELAYS][MAX_UNIX_RELAY_NAME_LEN];
|
||||||
|
bool complainedAboutNoViewRights;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -62,6 +62,7 @@
|
|||||||
#include <rfb/ServerCore.h>
|
#include <rfb/ServerCore.h>
|
||||||
#include <rfb/VNCServerST.h>
|
#include <rfb/VNCServerST.h>
|
||||||
#include <rfb/VNCSConnectionST.h>
|
#include <rfb/VNCSConnectionST.h>
|
||||||
|
#include <rfb/Watermark.h>
|
||||||
#include <rfb/util.h>
|
#include <rfb/util.h>
|
||||||
#include <rfb/ledStates.h>
|
#include <rfb/ledStates.h>
|
||||||
|
|
||||||
@@ -134,7 +135,7 @@ VNCServerST::VNCServerST(const char* name_, SDesktop* desktop_)
|
|||||||
queryConnectionHandler(0), keyRemapper(&KeyRemapper::defInstance),
|
queryConnectionHandler(0), keyRemapper(&KeyRemapper::defInstance),
|
||||||
lastConnectionTime(0), disableclients(false),
|
lastConnectionTime(0), disableclients(false),
|
||||||
frameTimer(this), apimessager(NULL), trackingFrameStats(0),
|
frameTimer(this), apimessager(NULL), trackingFrameStats(0),
|
||||||
clipboardId(0)
|
clipboardId(0), sendWatermark(false)
|
||||||
{
|
{
|
||||||
lastUserInputTime = lastDisconnectTime = time(0);
|
lastUserInputTime = lastDisconnectTime = time(0);
|
||||||
slog.debug("creating single-threaded server %s", name.buf);
|
slog.debug("creating single-threaded server %s", name.buf);
|
||||||
@@ -222,6 +223,9 @@ VNCServerST::VNCServerST(const char* name_, SDesktop* desktop_)
|
|||||||
|
|
||||||
trackingClient[0] = 0;
|
trackingClient[0] = 0;
|
||||||
|
|
||||||
|
if (watermarkData)
|
||||||
|
sendWatermark = true;
|
||||||
|
|
||||||
if (Server::selfBench)
|
if (Server::selfBench)
|
||||||
SelfBench();
|
SelfBench();
|
||||||
}
|
}
|
||||||
@@ -278,6 +282,9 @@ void VNCServerST::addSocket(network::Socket* sock, bool outgoing)
|
|||||||
|
|
||||||
VNCSConnectionST* client = new VNCSConnectionST(this, sock, outgoing);
|
VNCSConnectionST* client = new VNCSConnectionST(this, sock, outgoing);
|
||||||
client->init();
|
client->init();
|
||||||
|
|
||||||
|
if (watermarkData)
|
||||||
|
sendWatermark = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VNCServerST::removeSocket(network::Socket* sock) {
|
void VNCServerST::removeSocket(network::Socket* sock) {
|
||||||
@@ -813,7 +820,7 @@ static void upgradeClientToUdp(const network::GetAPIMessager::action_data &act,
|
|||||||
inet_ntop(AF_INET, &act.udp.ip, buf, 32);
|
inet_ntop(AF_INET, &act.udp.ip, buf, 32);
|
||||||
|
|
||||||
const char * const who = (*ci)->getPeerEndpoint();
|
const char * const who = (*ci)->getPeerEndpoint();
|
||||||
const char *start = strchr(who, '@');
|
const char *start = strrchr(who, '@');
|
||||||
if (!start)
|
if (!start)
|
||||||
continue;
|
continue;
|
||||||
start++;
|
start++;
|
||||||
@@ -832,9 +839,8 @@ static void upgradeClientToUdp(const network::GetAPIMessager::action_data &act,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void checkAPIMessages(network::GetAPIMessager *apimessager,
|
void VNCServerST::checkAPIMessages(network::GetAPIMessager *apimessager,
|
||||||
rdr::U8 &trackingFrameStats, char trackingClient[],
|
rdr::U8 &trackingFrameStats, char trackingClient[])
|
||||||
std::list<VNCSConnectionST*> &clients)
|
|
||||||
{
|
{
|
||||||
if (pthread_mutex_lock(&apimessager->userMutex))
|
if (pthread_mutex_lock(&apimessager->userMutex))
|
||||||
return;
|
return;
|
||||||
@@ -866,6 +872,15 @@ static void checkAPIMessages(network::GetAPIMessager *apimessager,
|
|||||||
case network::GetAPIMessager::UDP_UPGRADE:
|
case network::GetAPIMessager::UDP_UPGRADE:
|
||||||
upgradeClientToUdp(act, clients);
|
upgradeClientToUdp(act, clients);
|
||||||
break;
|
break;
|
||||||
|
case network::GetAPIMessager::CLEAR_CLIPBOARD:
|
||||||
|
clearBinaryClipboardData();
|
||||||
|
clipboardClient = NULL;
|
||||||
|
desktop->handleClipboardAnnounceBinary(0, NULL);
|
||||||
|
|
||||||
|
sendBinaryClipboardData("text/plain", NULL, 0);
|
||||||
|
|
||||||
|
desktop->clearLocalClipboards();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -965,6 +980,11 @@ void VNCServerST::writeUpdate()
|
|||||||
blackOut();
|
blackOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (watermarkData && Server::DLP_WatermarkText[0] && watermarkTextNeedsUpdate(true)) {
|
||||||
|
// The text may have changed
|
||||||
|
sendWatermark = true;
|
||||||
|
}
|
||||||
|
|
||||||
comparer->getUpdateInfo(&ui, pb->getRect());
|
comparer->getUpdateInfo(&ui, pb->getRect());
|
||||||
toCheck = ui.changed.union_(ui.copied);
|
toCheck = ui.changed.union_(ui.copied);
|
||||||
|
|
||||||
@@ -1031,7 +1051,7 @@ void VNCServerST::writeUpdate()
|
|||||||
shottime = msSince(&shotstart);
|
shottime = msSince(&shotstart);
|
||||||
|
|
||||||
trackingFrameStats = 0;
|
trackingFrameStats = 0;
|
||||||
checkAPIMessages(apimessager, trackingFrameStats, trackingClient, clients);
|
checkAPIMessages(apimessager, trackingFrameStats, trackingClient);
|
||||||
}
|
}
|
||||||
const rdr::U8 origtrackingFrameStats = trackingFrameStats;
|
const rdr::U8 origtrackingFrameStats = trackingFrameStats;
|
||||||
|
|
||||||
@@ -1040,6 +1060,9 @@ void VNCServerST::writeUpdate()
|
|||||||
memset(&jpegstats, 0, sizeof(EncodeManager::codecstats_t));
|
memset(&jpegstats, 0, sizeof(EncodeManager::codecstats_t));
|
||||||
memset(&webpstats, 0, sizeof(EncodeManager::codecstats_t));
|
memset(&webpstats, 0, sizeof(EncodeManager::codecstats_t));
|
||||||
|
|
||||||
|
if (watermarkData)
|
||||||
|
updateWatermark();
|
||||||
|
|
||||||
for (ci = clients.begin(); ci != clients.end(); ci = ci_next) {
|
for (ci = clients.begin(); ci != clients.end(); ci = ci_next) {
|
||||||
ci_next = ci; ci_next++;
|
ci_next = ci; ci_next++;
|
||||||
|
|
||||||
@@ -1087,6 +1110,8 @@ void VNCServerST::writeUpdate()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sendWatermark = false; // the client now caches it, only send once
|
||||||
|
|
||||||
if (trackingFrameStats) {
|
if (trackingFrameStats) {
|
||||||
if (enctime) {
|
if (enctime) {
|
||||||
const unsigned totalMs = msSince(&start);
|
const unsigned totalMs = msSince(&start);
|
||||||
@@ -1236,3 +1261,15 @@ void VNCServerST::refreshClients()
|
|||||||
(*i)->add_changed_all();
|
(*i)->add_changed_all();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VNCServerST::sendUnixRelayData(const char name[],
|
||||||
|
const unsigned char *buf, const unsigned len)
|
||||||
|
{
|
||||||
|
// For each client subscribed to this channel, send the data to them
|
||||||
|
std::list<VNCSConnectionST*>::iterator i;
|
||||||
|
for (i = clients.begin(); i != clients.end(); i++) {
|
||||||
|
if ((*i)->isSubscribedToUnixRelay(name)) {
|
||||||
|
(*i)->sendUnixRelayData(name, buf, len);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user