Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
noVNC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
noVNC
Commits
12acb663
Commit
12acb663
authored
Jun 23, 2012
by
William Lightning
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change RepeaterID to be a config option
parent
8d0c7fb5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
rfb.js
include/rfb.js
+3
-4
util.js
include/util.js
+2
-0
No files found.
include/rfb.js
View file @
12acb663
...
@@ -39,7 +39,6 @@ var that = {}, // Public API methods
...
@@ -39,7 +39,6 @@ var that = {}, // Public API methods
rfb_port
=
5900
,
rfb_port
=
5900
,
rfb_password
=
''
,
rfb_password
=
''
,
rfb_path
=
''
,
rfb_path
=
''
,
rfb_repeaterID
=
''
,
rfb_state
=
'disconnected'
,
rfb_state
=
'disconnected'
,
rfb_version
=
0
,
rfb_version
=
0
,
...
@@ -135,6 +134,7 @@ Util.conf_defaults(conf, that, defaults, [
...
@@ -135,6 +134,7 @@ Util.conf_defaults(conf, that, defaults, [
[
'focusContainer'
,
'wo'
,
'dom'
,
document
,
'DOM element that captures keyboard input'
],
[
'focusContainer'
,
'wo'
,
'dom'
,
document
,
'DOM element that captures keyboard input'
],
[
'encrypt'
,
'rw'
,
'bool'
,
false
,
'Use TLS/SSL/wss encryption'
],
[
'encrypt'
,
'rw'
,
'bool'
,
false
,
'Use TLS/SSL/wss encryption'
],
[
'repeaterID'
,
'rw'
,
'string'
,
''
,
'RepeaterID to connect to'
],
[
'true_color'
,
'rw'
,
'bool'
,
true
,
'Request true color pixel data'
],
[
'true_color'
,
'rw'
,
'bool'
,
true
,
'Request true color pixel data'
],
[
'local_cursor'
,
'rw'
,
'bool'
,
false
,
'Request locally rendered cursor'
],
[
'local_cursor'
,
'rw'
,
'bool'
,
false
,
'Request locally rendered cursor'
],
[
'shared'
,
'rw'
,
'bool'
,
true
,
'Request shared mode'
],
[
'shared'
,
'rw'
,
'bool'
,
true
,
'Request shared mode'
],
...
@@ -688,7 +688,7 @@ init_msg = function() {
...
@@ -688,7 +688,7 @@ init_msg = function() {
return
fail
(
"Invalid server version "
+
sversion
);
return
fail
(
"Invalid server version "
+
sversion
);
}
}
if
(
is_repeater
)
{
if
(
is_repeater
)
{
repeaterID
=
rfb_
repeaterID
;
repeaterID
=
conf
.
repeaterID
;
while
(
repeaterID
.
length
<
250
)
while
(
repeaterID
.
length
<
250
)
repeaterID
+=
"
\
0"
;
repeaterID
+=
"
\
0"
;
ws
.
send_string
(
repeaterID
);
ws
.
send_string
(
repeaterID
);
...
@@ -1759,14 +1759,13 @@ clientCutText = function(text) {
...
@@ -1759,14 +1759,13 @@ clientCutText = function(text) {
// Public API interface functions
// Public API interface functions
//
//
that
.
connect
=
function
(
host
,
port
,
password
,
path
,
repeaterID
)
{
that
.
connect
=
function
(
host
,
port
,
password
,
path
)
{
//Util.Debug(">> connect");
//Util.Debug(">> connect");
rfb_host
=
host
;
rfb_host
=
host
;
rfb_port
=
port
;
rfb_port
=
port
;
rfb_password
=
(
password
!==
undefined
)
?
password
:
""
;
rfb_password
=
(
password
!==
undefined
)
?
password
:
""
;
rfb_path
=
(
path
!==
undefined
)
?
path
:
""
;
rfb_path
=
(
path
!==
undefined
)
?
path
:
""
;
rfb_repeaterID
=
(
repeaterID
!==
undefined
)
?
repeaterID
:
""
;
if
((
!
rfb_host
)
||
(
!
rfb_port
))
{
if
((
!
rfb_host
)
||
(
!
rfb_port
))
{
return
fail
(
"Must set host and port"
);
return
fail
(
"Must set host and port"
);
...
...
include/util.js
View file @
12acb663
...
@@ -146,6 +146,8 @@ Util.conf_default = function(cfg, api, defaults, v, mode, type, defval, desc) {
...
@@ -146,6 +146,8 @@ Util.conf_default = function(cfg, api, defaults, v, mode, type, defval, desc) {
}
}
}
else
if
(
type
in
{
'integer'
:
1
,
'int'
:
1
})
{
}
else
if
(
type
in
{
'integer'
:
1
,
'int'
:
1
})
{
val
=
parseInt
(
val
,
10
);
val
=
parseInt
(
val
,
10
);
}
else
if
(
type
===
'string'
)
{
val
=
String
(
val
);
}
else
if
(
type
===
'func'
)
{
}
else
if
(
type
===
'func'
)
{
if
(
!
val
)
{
if
(
!
val
)
{
val
=
function
()
{};
val
=
function
()
{};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment