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
8d0c7fb5
Commit
8d0c7fb5
authored
Jun 07, 2012
by
William Lightning
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ultravnc_repeater.pl support to rfb.js and vnc_auto.html
parent
ab44059b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
rfb.js
include/rfb.js
+15
-3
vnc_auto.html
vnc_auto.html
+4
-2
No files found.
include/rfb.js
View file @
8d0c7fb5
...
@@ -39,6 +39,7 @@ var that = {}, // Public API methods
...
@@ -39,6 +39,7 @@ 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
,
...
@@ -659,10 +660,10 @@ mouseMove = function(x, y) {
...
@@ -659,10 +660,10 @@ mouseMove = function(x, y) {
init_msg
=
function
()
{
init_msg
=
function
()
{
//Util.Debug(">> init_msg [rfb_state '" + rfb_state + "']");
//Util.Debug(">> init_msg [rfb_state '" + rfb_state + "']");
var
strlen
,
reason
,
length
,
sversion
,
cversion
,
var
strlen
,
reason
,
length
,
sversion
,
cversion
,
repeaterID
,
i
,
types
,
num_types
,
challenge
,
response
,
bpp
,
depth
,
i
,
types
,
num_types
,
challenge
,
response
,
bpp
,
depth
,
big_endian
,
red_max
,
green_max
,
blue_max
,
red_shift
,
big_endian
,
red_max
,
green_max
,
blue_max
,
red_shift
,
green_shift
,
blue_shift
,
true_color
,
name_length
;
green_shift
,
blue_shift
,
true_color
,
name_length
,
is_repeater
;
//Util.Debug("ws.rQ (" + ws.rQlen() + ") " + ws.rQslice(0));
//Util.Debug("ws.rQ (" + ws.rQlen() + ") " + ws.rQslice(0));
switch
(
rfb_state
)
{
switch
(
rfb_state
)
{
...
@@ -673,7 +674,9 @@ init_msg = function() {
...
@@ -673,7 +674,9 @@ init_msg = function() {
}
}
sversion
=
ws
.
rQshiftStr
(
12
).
substr
(
4
,
7
);
sversion
=
ws
.
rQshiftStr
(
12
).
substr
(
4
,
7
);
Util
.
Info
(
"Server ProtocolVersion: "
+
sversion
);
Util
.
Info
(
"Server ProtocolVersion: "
+
sversion
);
is_repeater
=
0
;
switch
(
sversion
)
{
switch
(
sversion
)
{
case
"000.000"
:
is_repeater
=
1
;
break
;
// UltraVNC repeater
case
"003.003"
:
rfb_version
=
3.3
;
break
;
case
"003.003"
:
rfb_version
=
3.3
;
break
;
case
"003.006"
:
rfb_version
=
3.3
;
break
;
// UltraVNC
case
"003.006"
:
rfb_version
=
3.3
;
break
;
// UltraVNC
case
"003.889"
:
rfb_version
=
3.3
;
break
;
// Apple Remote Desktop
case
"003.889"
:
rfb_version
=
3.3
;
break
;
// Apple Remote Desktop
...
@@ -684,6 +687,13 @@ init_msg = function() {
...
@@ -684,6 +687,13 @@ init_msg = function() {
default
:
default
:
return
fail
(
"Invalid server version "
+
sversion
);
return
fail
(
"Invalid server version "
+
sversion
);
}
}
if
(
is_repeater
)
{
repeaterID
=
rfb_repeaterID
;
while
(
repeaterID
.
length
<
250
)
repeaterID
+=
"
\
0"
;
ws
.
send_string
(
repeaterID
);
break
;
}
if
(
rfb_version
>
rfb_max_version
)
{
if
(
rfb_version
>
rfb_max_version
)
{
rfb_version
=
rfb_max_version
;
rfb_version
=
rfb_max_version
;
}
}
...
@@ -730,6 +740,7 @@ init_msg = function() {
...
@@ -730,6 +740,7 @@ init_msg = function() {
// Server decides
// Server decides
if
(
ws
.
rQwait
(
"security scheme"
,
4
))
{
return
false
;
}
if
(
ws
.
rQwait
(
"security scheme"
,
4
))
{
return
false
;
}
rfb_auth_scheme
=
ws
.
rQshift32
();
rfb_auth_scheme
=
ws
.
rQshift32
();
//rfb_auth_scheme = ws.rQshiftStr(12);
}
}
updateState
(
'Authentication'
,
updateState
(
'Authentication'
,
"Authenticating using scheme: "
+
rfb_auth_scheme
);
"Authenticating using scheme: "
+
rfb_auth_scheme
);
...
@@ -1748,13 +1759,14 @@ clientCutText = function(text) {
...
@@ -1748,13 +1759,14 @@ clientCutText = function(text) {
// Public API interface functions
// Public API interface functions
//
//
that
.
connect
=
function
(
host
,
port
,
password
,
path
)
{
that
.
connect
=
function
(
host
,
port
,
password
,
path
,
repeaterID
)
{
//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"
);
...
...
vnc_auto.html
View file @
8d0c7fb5
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
}
}
window
.
onload
=
function
()
{
window
.
onload
=
function
()
{
var
host
,
port
,
password
,
path
,
token
;
var
host
,
port
,
password
,
path
,
token
,
repeaterID
;
$D
(
'sendCtrlAltDelButton'
).
style
.
display
=
"inline"
;
$D
(
'sendCtrlAltDelButton'
).
style
.
display
=
"inline"
;
$D
(
'sendCtrlAltDelButton'
).
onclick
=
sendCtrlAltDel
;
$D
(
'sendCtrlAltDelButton'
).
onclick
=
sendCtrlAltDel
;
...
@@ -103,6 +103,8 @@
...
@@ -103,6 +103,8 @@
password
=
WebUtil
.
getQueryVar
(
'password'
,
''
);
password
=
WebUtil
.
getQueryVar
(
'password'
,
''
);
path
=
WebUtil
.
getQueryVar
(
'path'
,
'websockify'
);
path
=
WebUtil
.
getQueryVar
(
'path'
,
'websockify'
);
repeaterID
=
WebUtil
.
getQueryVar
(
'repeaterid'
,
''
);
if
((
!
host
)
||
(
!
port
))
{
if
((
!
host
)
||
(
!
port
))
{
updateState
(
'failed'
,
updateState
(
'failed'
,
"Must specify host and port in URL"
);
"Must specify host and port in URL"
);
...
@@ -118,7 +120,7 @@
...
@@ -118,7 +120,7 @@
'view_only'
:
WebUtil
.
getQueryVar
(
'view_only'
,
false
),
'view_only'
:
WebUtil
.
getQueryVar
(
'view_only'
,
false
),
'updateState'
:
updateState
,
'updateState'
:
updateState
,
'onPasswordRequired'
:
passwordRequired
});
'onPasswordRequired'
:
passwordRequired
});
rfb
.
connect
(
host
,
port
,
password
,
path
);
rfb
.
connect
(
host
,
port
,
password
,
path
,
repeaterID
);
};
};
</script>
</script>
...
...
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