Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
wsssh
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
wsssh
Commits
436bcac1
Commit
436bcac1
authored
Sep 22, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce polling interval to 300ms
parent
4ee49aa6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
17 deletions
+22
-17
assets.o
wssshd2/assets.o
+0
-0
terminal_page.h
wssshd2/html_pages/terminal_page.h
+19
-14
image_data.h
wssshd2/image_data.h
+1
-1
terminal.html
wssshd2/templates/terminal.html
+2
-2
web.o
wssshd2/web.o
+0
-0
wssshd
wssshd2/wssshd
+0
-0
No files found.
wssshd2/assets.o
View file @
436bcac1
No preview for this file type
wssshd2/html_pages/terminal_page.h
View file @
436bcac1
...
@@ -426,7 +426,7 @@ static const char *terminal_page_html =
...
@@ -426,7 +426,7 @@ static const char *terminal_page_html =
" document.getElementById('sshUsername').disabled = false;
\n
"
" document.getElementById('sshUsername').disabled = false;
\n
"
"
\n
"
"
\n
"
" if (pollInterval) {
\n
"
" if (pollInterval) {
\n
"
" clear
Interval
(pollInterval);
\n
"
" clear
Timeout
(pollInterval);
\n
"
" pollInterval = null;
\n
"
" pollInterval = null;
\n
"
" }
\n
"
" }
\n
"
"
\n
"
"
\n
"
...
@@ -468,28 +468,33 @@ static const char *terminal_page_html =
...
@@ -468,28 +468,33 @@ static const char *terminal_page_html =
" if (data.ended !== undefined) {
\n
"
" if (data.ended !== undefined) {
\n
"
" console.log('Session ended, reloading page');
\n
"
" console.log('Session ended, reloading page');
\n
"
" if (pollInterval) {
\n
"
" if (pollInterval) {
\n
"
" clear
Interval
(pollInterval);
\n
"
" clear
Timeout
(pollInterval);
\n
"
" pollInterval = null;
\n
"
" pollInterval = null;
\n
"
" }
\n
"
" }
\n
"
" location.reload();
\n
"
" location.reload();
\n
"
" } else if (data) {
\n
"
" } else {
\n
"
" console.log('Received data:', data.byteLength || data.length, 'bytes/characters');
\n
"
" if (data) {
\n
"
" // Write data to terminal
\n
"
" console.log('Received data:', data.byteLength || data.length, 'bytes/characters');
\n
"
" if (data.byteLength !== undefined) {
\n
"
" // Write data to terminal
\n
"
" // Binary data
\n
"
" if (data.byteLength !== undefined) {
\n
"
" term.write(new Uint8Array(data));
\n
"
" // Binary data
\n
"
" } else {
\n
"
" term.write(new Uint8Array(data));
\n
"
" // Text data
\n
"
" } else {
\n
"
" term.write(data);
\n
"
" // Text data
\n
"
" term.write(data);
\n
"
" }
\n
"
" }
\n
"
" // Schedule next poll
\n
"
" if (pollInterval) {
\n
"
" pollInterval = setTimeout(pollData, 100);
\n
"
" }
\n
"
" }
\n
"
" }
\n
"
" }
\n
"
" })
\n
"
" })
\n
"
" .catch(error => {
\n
"
" .catch(error => {
\n
"
" console.error('Polling error:', error);
\n
"
" console.error('Polling error:', error);
\n
"
" //
Stop polling
on error
\n
"
" //
Continue polling even
on error
\n
"
" if (pollInterval) {
\n
"
" if (pollInterval) {
\n
"
" clearInterval(pollInterval);
\n
"
" pollInterval = setTimeout(pollData, 100);
\n
"
" pollInterval = null;
\n
"
" }
\n
"
" }
\n
"
" });
\n
"
" });
\n
"
"}
\n
"
"}
\n
"
...
...
wssshd2/image_data.h
View file @
436bcac1
...
@@ -8,7 +8,7 @@ unsigned char image_jpg[] = {
...
@@ -8,7 +8,7 @@ unsigned char image_jpg[] = {
0x70
,
0x9c
,
0xba
,
0x51
,
0x3c
,
0x00
,
0x00
,
0x00
,
0x06
,
0x62
,
0x4b
,
0x47
,
0x70
,
0x9c
,
0xba
,
0x51
,
0x3c
,
0x00
,
0x00
,
0x00
,
0x06
,
0x62
,
0x4b
,
0x47
,
0x44
,
0x00
,
0xff
,
0x00
,
0xff
,
0x00
,
0xff
,
0xa0
,
0xbd
,
0xa7
,
0x93
,
0x00
,
0x44
,
0x00
,
0xff
,
0x00
,
0xff
,
0x00
,
0xff
,
0xa0
,
0xbd
,
0xa7
,
0x93
,
0x00
,
0x00
,
0x00
,
0x07
,
0x74
,
0x49
,
0x4d
,
0x45
,
0x07
,
0xe9
,
0x09
,
0x16
,
0x0f
,
0x00
,
0x00
,
0x07
,
0x74
,
0x49
,
0x4d
,
0x45
,
0x07
,
0xe9
,
0x09
,
0x16
,
0x0f
,
0x2
4
,
0x39
,
0x20
,
0x4c
,
0xa4
,
0x4b
,
0x00
,
0x00
,
0x05
,
0xd4
,
0x7a
,
0x54
,
0x2
9
,
0x29
,
0x88
,
0x55
,
0xca
,
0x62
,
0x00
,
0x00
,
0x05
,
0xd4
,
0x7a
,
0x54
,
0x58
,
0x74
,
0x52
,
0x61
,
0x77
,
0x20
,
0x70
,
0x72
,
0x6f
,
0x66
,
0x69
,
0x6c
,
0x58
,
0x74
,
0x52
,
0x61
,
0x77
,
0x20
,
0x70
,
0x72
,
0x6f
,
0x66
,
0x69
,
0x6c
,
0x65
,
0x20
,
0x74
,
0x79
,
0x70
,
0x65
,
0x20
,
0x61
,
0x70
,
0x70
,
0x31
,
0x00
,
0x65
,
0x20
,
0x74
,
0x79
,
0x70
,
0x65
,
0x20
,
0x61
,
0x70
,
0x70
,
0x31
,
0x00
,
0x00
,
0x48
,
0x89
,
0x85
,
0x96
,
0x59
,
0x92
,
0xdc
,
0x38
,
0x10
,
0x43
,
0xff
,
0x00
,
0x48
,
0x89
,
0x85
,
0x96
,
0x59
,
0x92
,
0xdc
,
0x38
,
0x10
,
0x43
,
0xff
,
...
...
wssshd2/templates/terminal.html
View file @
436bcac1
...
@@ -462,7 +462,7 @@ function pollData() {
...
@@ -462,7 +462,7 @@ function pollData() {
}
}
// Schedule next poll
// Schedule next poll
if
(
pollInterval
)
{
if
(
pollInterval
)
{
pollInterval
=
setTimeout
(
pollData
,
1
00
);
pollInterval
=
setTimeout
(
pollData
,
3
00
);
}
}
}
}
})
})
...
@@ -470,7 +470,7 @@ function pollData() {
...
@@ -470,7 +470,7 @@ function pollData() {
console
.
error
(
'Polling error:'
,
error
);
console
.
error
(
'Polling error:'
,
error
);
// Continue polling even on error
// Continue polling even on error
if
(
pollInterval
)
{
if
(
pollInterval
)
{
pollInterval
=
setTimeout
(
pollData
,
1
00
);
pollInterval
=
setTimeout
(
pollData
,
3
00
);
}
}
});
});
}
}
...
...
wssshd2/web.o
View file @
436bcac1
No preview for this file type
wssshd2/wssshd
View file @
436bcac1
No preview for this file type
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