Add files via upload

This commit is contained in:
Barry Nelson
2025-02-04 18:15:08 -05:00
committed by GitHub
parent aa60c17d14
commit 0d87f98edf
94 changed files with 509 additions and 0 deletions

13
vnc/AUTHORS Normal file
View File

@@ -0,0 +1,13 @@
maintainers:
- Samuel Mannehed for Cendio AB (@samhed)
- Pierre Ossman for Cendio AB (@CendioOssman)
maintainersEmeritus:
- Joel Martin (@kanaka)
- Solly Ross (@directxman12)
- @astrand
contributors:
# There are a bunch of people that should be here.
# If you want to be on this list, feel free send a PR
# to add yourself.
- jalf <git@jalf.dk>
- NTT corp.

62
vnc/LICENSE.txt Normal file
View File

@@ -0,0 +1,62 @@
noVNC is Copyright (C) 2022 The noVNC Authors
(./AUTHORS)
The noVNC core library files are licensed under the MPL 2.0 (Mozilla
Public License 2.0). The noVNC core library is composed of the
Javascript code necessary for full noVNC operation. This includes (but
is not limited to):
core/**/*.js
app/*.js
test/playback.js
The HTML, CSS, font and images files that included with the noVNC
source distibution (or repository) are not considered part of the
noVNC core library and are licensed under more permissive licenses.
The intent is to allow easy integration of noVNC into existing web
sites and web applications.
The HTML, CSS, font and image files are licensed as follows:
*.html : 2-Clause BSD license
app/styles/*.css : 2-Clause BSD license
app/styles/Orbitron* : SIL Open Font License 1.1
(Copyright 2009 Matt McInerney)
app/images/ : Creative Commons Attribution-ShareAlike
http://creativecommons.org/licenses/by-sa/3.0/
Some portions of noVNC are copyright to their individual authors.
Please refer to the individual source files and/or to the noVNC commit
history: https://github.com/novnc/noVNC/commits/master
The are several files and projects that have been incorporated into
the noVNC core library. Here is a list of those files and the original
licenses (all MPL 2.0 compatible):
core/base64.js : MPL 2.0
core/des.js : Various BSD style licenses
vendor/pako/ : MIT
Any other files not mentioned above are typically marked with
a copyright/license header at the top of the file. The default noVNC
license is MPL-2.0.
The following license texts are included:
docs/LICENSE.MPL-2.0
docs/LICENSE.OFL-1.1
docs/LICENSE.BSD-3-Clause (New BSD)
docs/LICENSE.BSD-2-Clause (Simplified BSD / FreeBSD)
vendor/pako/LICENSE (MIT)
Or alternatively the license texts may be found here:
http://www.mozilla.org/MPL/2.0/
http://scripts.sil.org/OFL
http://en.wikipedia.org/wiki/BSD_licenses
https://opensource.org/licenses/MIT

3
vnc/config Normal file
View File

@@ -0,0 +1,3 @@
port=6080
width=800
height=600

5
vnc/config.info Normal file
View File

@@ -0,0 +1,5 @@
port=Port to connect to,0
host=Host to connect to,3,Webmin server
width=Window width,0
height=Window height,0
program=X application to connect to,3,Normal VNC server

5
vnc/config.info.de Normal file
View File

@@ -0,0 +1,5 @@
port=Port zum Verbinden,0
host=Host zum Verbinden,3,Webmin-Server
width=Breite des Fenster,0
height=Höhe des Fenster,0
program=Verbinde zu folgender XAnwendung,3,Normaler VNCServer

4
vnc/config.info.sk Normal file
View File

@@ -0,0 +1,4 @@
port=Port na spojenie,0
host=Kam sa pripojiť,3,Webmin server
width=Šírka,0
height=Výška,0

3
vnc/config.info.zh_TW Normal file
View File

@@ -0,0 +1,3 @@
port=要連接的通訊埠,0
width=寬度,0
height=高度,0

21
vnc/createxvnc.sh Normal file
View File

@@ -0,0 +1,21 @@
#!/bin/sh
address=$1
shift
grep '^service webminVNC' || cat >>/etc/xinetd.d/vnc <<@EOF@
# default: on
# description: This serves out a VNC connection which starts at a KDM login \
# prompt. This VNC connection has a resolution of 16bit depth.
service webminVNC
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = vnc
server = /usr/bin/Xvnc
server_args = $@
type = UNLISTED
port = 5900
bind = $address
}
@EOF@

102
vnc/eslint.config.mjs Normal file
View File

@@ -0,0 +1,102 @@
import globals from "globals";
import js from "@eslint/js";
export default [
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 2020,
sourceType: "module",
globals: {
...globals.browser,
...globals.es2020,
}
},
ignores: ["**/xtscancodes.js"],
rules: {
// Unsafe or confusing stuff that we forbid
"no-unused-vars": ["error", { "vars": "all",
"args": "none",
"ignoreRestSiblings": true,
"caughtErrors": "none" }],
"no-constant-condition": ["error", { "checkLoops": false }],
"no-var": "error",
"no-useless-constructor": "error",
"object-shorthand": ["error", "methods", { "avoidQuotes": true }],
"prefer-arrow-callback": "error",
"arrow-body-style": ["error", "as-needed", { "requireReturnForObjectLiteral": false } ],
"arrow-parens": ["error", "as-needed", { "requireForBlockBody": true }],
"arrow-spacing": ["error"],
"no-confusing-arrow": ["error", { "allowParens": true }],
// Enforced coding style
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"indent": ["error", 4, { "SwitchCase": 1,
"VariableDeclarator": "first",
"FunctionDeclaration": { "parameters": "first" },
"FunctionExpression": { "parameters": "first" },
"CallExpression": { "arguments": "first" },
"ArrayExpression": "first",
"ObjectExpression": "first",
"ImportDeclaration": "first",
"ignoreComments": true }],
"comma-spacing": ["error"],
"comma-style": ["error"],
"curly": ["error", "multi-line"],
"func-call-spacing": ["error"],
"func-names": ["error"],
"func-style": ["error", "declaration", { "allowArrowFunctions": true }],
"key-spacing": ["error"],
"keyword-spacing": ["error"],
"no-trailing-spaces": ["error"],
"semi": ["error"],
"space-before-blocks": ["error"],
"space-before-function-paren": ["error", { "anonymous": "always",
"named": "never",
"asyncArrow": "always" }],
"switch-colon-spacing": ["error"],
"camelcase": ["error", { "allow": ["^XK_", "^XF86XK_"] }],
"no-console": ["error"],
}
},
{
files: ["po/po2js", "po/xgettext-html"],
languageOptions: {
globals: {
...globals.node,
}
},
rules: {
"no-console": 0,
},
},
{
files: ["tests/*"],
languageOptions: {
globals: {
...globals.node,
...globals.mocha,
sinon: false,
chai: false,
}
},
rules: {
"prefer-arrow-callback": 0,
// Too many anonymous callbacks
"func-names": "off",
},
},
{
files: ["utils/*"],
languageOptions: {
globals: {
...globals.node,
}
},
rules: {
"no-console": 0,
},
},
];

119
vnc/index.cgi Normal file
View File

@@ -0,0 +1,119 @@
#!/usr/local/bin/perl
# index.cgi
# Display the vnc applet
BEGIN { push(@INC, ".."); };
use WebminCore;
use Socket;
&init_config();
&ui_print_header(undef, $text{'index_title'}, "", undef, &get_product_name() eq 'webmin', 1);
if ($config{'program'}) {
if (!&has_command($config{'program'})) {
&error_exit(&text('index_ecmd', "<tt>$config{'program'}</tt>"));
}
} else {
# Check if Xvnc is installed
if (!&has_command("Xvnc")) {
&error_exit(&text('index_ecmd', "<tt>Xvnc</tt>"));
}
}
# Pick a free VNC number
# for($num=1; $num<1000; $num++) {
# $port = 5900+$num;
# last;
# XXX need to test
# }
# Generate a password using vncpasswd
# XXX
# Start Xvnc in a background process, and kill it after one client
# if (!fork()) {
# close(STDIN);
# close(STDOUT);
# local $pid = open(VNC, "Xvnc :$num 2>&1 |");
# while(<VNC>) {
# if (/Client\s+(\S+)\s+gone/i) {
# kill(TERM, $pid);
# last;
# }
# }
# close(VNC);
# exit;
# }
# Run the specified program, using the selected display
# $ENV{'DISPLAY'} = "localhost:$num";
# system("$config{'program'} >/dev/null 2>&1 </dev/null &");
# XXX what about security?
# XXX how to ensure exit? -rfbwait
# XXX what about window manager? or none?
# XXX what user to run program as? need option for current user
# XXX need to generate random password, and pass to java
# }
#else {
$addr = $config{'host'} ? $config{'host'} :
$ENV{'SERVER_NAME'} ? $ENV{'SERVER_NAME'} :
&to_ipaddress(&get_system_hostname());
$SIG{ALRM} = "connect_timeout";
alarm(10);
#&open_socket($addr, 5900, STEST, \$err);
&open_socket("127.0.0.1", 5900, STEST, \$err);
close(STEST);
# If a VNC server not listening on localhost and port 5900
# create an xinetd service for one.
if ($err) {
# system("./createxvnc.sh \"$addr\" -X509Cert /etc/webmin/miniserv.pem -X509Key /etc/webmin/miniserv.pem -noreset -inetd -once -query localhost -geometry $config{'width'}x$config{'height'} -depth 16 -SecurityTypes TLSNone,None");
system("./createxvnc.sh \"127.0.0.1\" -X509Cert /etc/webmin/miniserv.pem -X509Key /etc/webmin/miniserv.pem -noreset -inetd -once -query localhost -geometry $config{'width'}x$config{'height'} -depth 16 -SecurityTypes TLSNone,None");
system("systemctl restart xinetd");
}
# If a VNC server not listening on specified address and port 5900
# report an error
#$err && &error_exit(&text('index_esocket', $addr, 5900));
# If a VNC server not listening on specified address and port 5900 start one
#if ($err) {
# no password but queries XDMCP for login
# system("Xvnc -query localhost -geometry $config{'width'}x$config{'height'} -interface $addr -rfbauth /etc/webmin/vnc/vncpass :0 >/dev/null 2>&1 &");
# password and queries XDMCP for login
# system("Xvnc -query localhost -geometry $config{'width'}x$config{'height'} -interface $addr -SecurityTypes TLSNone,None :0 >/dev/null 2>&1 &");
#}
$port = $config{'port'};
$addr = $config{'host'} ? $config{'host'} :
$ENV{'SERVER_NAME'} ? $ENV{'SERVER_NAME'} :
&to_ipaddress(&get_system_hostname());
$SIG{ALRM} = "connect_timeout";
alarm(10);
&open_socket($addr, $port, STEST, \$err);
close(STEST);
# Proxy server not listening on the specfied address and port
# Need to run ./utils/novnc_proxy --vnc $addr:5900 --ssl-only --listen $addr:$port
if ($err) {
#system("./utils/novnc_proxy --cert /etc/webmin/miniserv.pem --vnc $addr:5900 --ssl-only --listen $addr:$port >/dev/null 2>&1 &");
system("./utils/novnc_proxy --cert /etc/webmin/miniserv.pem --vnc 127.0.0.1:5900 --ssl-only --listen $addr:$port >/dev/null 2>&1 &");
}
print "<center>";
print "<iframe width=$config{'width'} height=$config{'height'} style=\"height: 100vh; border: none\" frameBorder=0 src='vnc.html?host=$addr&port=$port'>";
print "</iframe>";
#print "<br>\n";
#print "$text{'index_credits'}</center>\n";
print "</center>\n";
&ui_print_footer("/", $text{'index'});
sub connect_timeout
{
}
sub error_exit
{
print "<p>",@_,"<p>\n";
&ui_print_footer("/", $text{'index'});
exit;
}

85
vnc/karma.conf.js Normal file
View File

@@ -0,0 +1,85 @@
// Karma configuration
// The Safari launcher is broken, so construct our own
function SafariBrowser(id, baseBrowserDecorator, args) {
baseBrowserDecorator(this);
this._start = function(url) {
this._execCommand('/usr/bin/open', ['-W', '-n', '-a', 'Safari', url]);
}
}
SafariBrowser.prototype = {
name: 'Safari'
}
module.exports = (config) => {
let browsers = [];
if (process.env.TEST_BROWSER_NAME) {
browsers = process.env.TEST_BROWSER_NAME.split(',');
}
const my_conf = {
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'sinon-chai'],
// list of files / patterns to load in the browser (loaded in order)
files: [
{ pattern: 'app/localization.js', included: false, type: 'module' },
{ pattern: 'app/webutil.js', included: false, type: 'module' },
{ pattern: 'core/**/*.js', included: false, type: 'module' },
{ pattern: 'vendor/pako/**/*.js', included: false, type: 'module' },
{ pattern: 'tests/test.*.js', type: 'module' },
{ pattern: 'tests/fake.*.js', included: false, type: 'module' },
{ pattern: 'tests/assertions.js', type: 'module' },
],
client: {
mocha: {
// replace Karma debug page with mocha display
'reporter': 'html',
'ui': 'bdd'
}
},
// list of files to exclude
exclude: [
],
plugins: [
'karma-*',
'@chiragrupani/karma-chromium-edge-launcher',
{ 'launcher:Safari': [ 'type', SafariBrowser ] },
],
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: browsers,
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['mocha'],
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,
};
config.set(my_conf);
};

5
vnc/module.info Normal file
View File

@@ -0,0 +1,5 @@
desc=VNC Client
name=VNCviewer
version=2.0
webmin=1
usermin=1

0
vnc/module.info.af Normal file
View File

2
vnc/module.info.af.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_af=VNC-kliënt
name_af=VNCviewer

0
vnc/module.info.ar Normal file
View File

2
vnc/module.info.ar.auto Normal file
View File

@@ -0,0 +1,2 @@
name_ar=VNCviewer
desc_ar=عميل VNC

0
vnc/module.info.be Normal file
View File

2
vnc/module.info.be.auto Normal file
View File

@@ -0,0 +1,2 @@
name_be=VNCviewer
desc_be=Кліент VNC

0
vnc/module.info.bg Normal file
View File

2
vnc/module.info.bg.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_bg=VNC клиент
name_bg=VNCviewer

0
vnc/module.info.ca Normal file
View File

2
vnc/module.info.ca.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_ca=Client VNC
name_ca=VNCviewer

0
vnc/module.info.cs Normal file
View File

2
vnc/module.info.cs.auto Normal file
View File

@@ -0,0 +1,2 @@
name_cs=VNCviewer
desc_cs=Klient VNC

0
vnc/module.info.da Normal file
View File

2
vnc/module.info.da.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_da=VNC-klient
name_da=vncviewer

1
vnc/module.info.de Normal file
View File

@@ -0,0 +1 @@
desc_de=VNC Client

1
vnc/module.info.de.auto Normal file
View File

@@ -0,0 +1 @@
name_de=VNCviewer

0
vnc/module.info.el Normal file
View File

2
vnc/module.info.el.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_el=VNC Client
name_el=VNCviewer

0
vnc/module.info.es Normal file
View File

2
vnc/module.info.es.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_es=Cliente VNC
name_es=VNCviewer

0
vnc/module.info.eu Normal file
View File

2
vnc/module.info.eu.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_eu=VNC bezeroa
name_eu=VNCviewer

0
vnc/module.info.fa Normal file
View File

2
vnc/module.info.fa.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_fa=مشتری VNC
name_fa=VNCviewer

0
vnc/module.info.fi Normal file
View File

2
vnc/module.info.fi.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_fi=VNC-asiakas
name_fi=vncviewer

0
vnc/module.info.fr Normal file
View File

2
vnc/module.info.fr.auto Normal file
View File

@@ -0,0 +1,2 @@
name_fr=VNCviewer
desc_fr=Client VNC

0
vnc/module.info.he Normal file
View File

2
vnc/module.info.he.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_he=לקוח VNC
name_he=VNCviewer

0
vnc/module.info.hr Normal file
View File

2
vnc/module.info.hr.auto Normal file
View File

@@ -0,0 +1,2 @@
name_hr=VNCViewer
desc_hr=VNC klijent

0
vnc/module.info.hu Normal file
View File

2
vnc/module.info.hu.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_hu=VNC kliens
name_hu=vncviewer

0
vnc/module.info.it Normal file
View File

2
vnc/module.info.it.auto Normal file
View File

@@ -0,0 +1,2 @@
name_it=vncviewer
desc_it=Client VNC

1
vnc/module.info.ja Normal file
View File

@@ -0,0 +1 @@
desc_ja=VNC クライアント

1
vnc/module.info.ja.auto Normal file
View File

@@ -0,0 +1 @@
name_ja=VNCviewer

1
vnc/module.info.ko Normal file
View File

@@ -0,0 +1 @@
desc_ko=VNC 클라이언트

1
vnc/module.info.ko.auto Normal file
View File

@@ -0,0 +1 @@
name_ko=VNCviewer

0
vnc/module.info.lt Normal file
View File

2
vnc/module.info.lt.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_lt=VNC klientas
name_lt=„VNCviewer“

0
vnc/module.info.lv Normal file
View File

2
vnc/module.info.lv.auto Normal file
View File

@@ -0,0 +1,2 @@
name_lv=VNCviewer
desc_lv=VNC klients

0
vnc/module.info.ms Normal file
View File

2
vnc/module.info.ms.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_ms=Pelanggan VNC
name_ms=VNCviewer

0
vnc/module.info.mt Normal file
View File

2
vnc/module.info.mt.auto Normal file
View File

@@ -0,0 +1,2 @@
name_mt=VNCviewer
desc_mt=Klijent VNC

0
vnc/module.info.nl Normal file
View File

2
vnc/module.info.nl.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_nl=VNC-client
name_nl=vNCViewer

0
vnc/module.info.no Normal file
View File

2
vnc/module.info.no.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_no=VNC-klient
name_no=VNCviewer

0
vnc/module.info.pl Normal file
View File

2
vnc/module.info.pl.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_pl=Klient VNC
name_pl=VNCviewer

0
vnc/module.info.pt Normal file
View File

2
vnc/module.info.pt.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_pt=Cliente VNC
name_pt=VNCviewer

0
vnc/module.info.pt_BR Normal file
View File

View File

@@ -0,0 +1,2 @@
desc_pt_BR=Cliente VNC
name_pt_BR=VNCviewer

0
vnc/module.info.ro Normal file
View File

2
vnc/module.info.ro.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_ro=Client VNC
name_ro=vncviewer

0
vnc/module.info.ru Normal file
View File

2
vnc/module.info.ru.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_ru=VNC Client
name_ru=VNCviewer

1
vnc/module.info.sk Normal file
View File

@@ -0,0 +1 @@
desc_sk=VNC klient

1
vnc/module.info.sk.auto Normal file
View File

@@ -0,0 +1 @@
name_sk=vncviewer

0
vnc/module.info.sl Normal file
View File

2
vnc/module.info.sl.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_sl=Odjemalec VNC
name_sl=VNCviewer

0
vnc/module.info.sv Normal file
View File

2
vnc/module.info.sv.auto Normal file
View File

@@ -0,0 +1,2 @@
name_sv=vncviewer
desc_sv=VNC-klient

0
vnc/module.info.th Normal file
View File

2
vnc/module.info.th.auto Normal file
View File

@@ -0,0 +1,2 @@
name_th=vncviewer
desc_th=VNC Client

0
vnc/module.info.tr Normal file
View File

2
vnc/module.info.tr.auto Normal file
View File

@@ -0,0 +1,2 @@
name_tr=vNCViewer
desc_tr=VNC İstemcisi

0
vnc/module.info.uk Normal file
View File

2
vnc/module.info.uk.auto Normal file
View File

@@ -0,0 +1,2 @@
name_uk=VNCviewer
desc_uk=Клієнт VNC

0
vnc/module.info.ur Normal file
View File

2
vnc/module.info.ur.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_ur=وی این سی کلائنٹ
name_ur=VNCviewer

0
vnc/module.info.vi Normal file
View File

2
vnc/module.info.vi.auto Normal file
View File

@@ -0,0 +1,2 @@
name_vi=Người xem VNC
desc_vi=Khách hàng VNC

0
vnc/module.info.zh Normal file
View File

2
vnc/module.info.zh.auto Normal file
View File

@@ -0,0 +1,2 @@
desc_zh=VNC客户端
name_zh=VNC查看器

1
vnc/module.info.zh_TW Normal file
View File

@@ -0,0 +1 @@
desc_zh_TW=VNC 客戶端

View File

@@ -0,0 +1 @@
name_zh_TW=VNC查看器