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
a5c2c01d
Commit
a5c2c01d
authored
Sep 13, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add favicon for wssshd web interface
parent
a57e71e6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
favicon.ico
logos/favicon.ico
+0
-0
base.html
templates/base.html
+1
-0
wssshd.py
wssshd.py
+9
-2
No files found.
logos/favicon.ico
View replaced file @
a57e71e6
View file @
a5c2c01d
4.19 KB
|
W:
|
H:
14.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
templates/base.html
View file @
a5c2c01d
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<meta
charset=
"UTF-8"
>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
{% block title %}WebSocket SSH Daemon{% endblock %}
</title>
<title>
{% block title %}WebSocket SSH Daemon{% endblock %}
</title>
<link
rel=
"icon"
href=
"/logos/favicon.ico"
type=
"image/x-icon"
>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css"
rel=
"stylesheet"
>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css"
rel=
"stylesheet"
>
<link
href=
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
rel=
"stylesheet"
>
<link
href=
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
rel=
"stylesheet"
>
<style>
<style>
...
...
wssshd.py
View file @
a5c2c01d
...
@@ -27,7 +27,7 @@ import json
...
@@ -27,7 +27,7 @@ import json
import
sys
import
sys
import
os
import
os
import
threading
import
threading
from
flask
import
Flask
,
render_template
,
request
,
redirect
,
url_for
,
flash
,
jsonify
from
flask
import
Flask
,
render_template
,
request
,
redirect
,
url_for
,
flash
,
jsonify
,
send_from_directory
from
flask_login
import
LoginManager
,
UserMixin
,
login_user
,
login_required
,
logout_user
,
current_user
from
flask_login
import
LoginManager
,
UserMixin
,
login_user
,
login_required
,
logout_user
,
current_user
from
flask_sqlalchemy
import
SQLAlchemy
from
flask_sqlalchemy
import
SQLAlchemy
from
werkzeug.security
import
generate_password_hash
,
check_password_hash
from
werkzeug.security
import
generate_password_hash
,
check_password_hash
...
@@ -38,6 +38,7 @@ clients = {}
...
@@ -38,6 +38,7 @@ clients = {}
active_tunnels
=
{}
active_tunnels
=
{}
debug
=
False
debug
=
False
server_password
=
None
server_password
=
None
args
=
None
# Flask app for web interface
# Flask app for web interface
app
=
Flask
(
__name__
)
app
=
Flask
(
__name__
)
...
@@ -60,7 +61,7 @@ class User(UserMixin, db.Model):
...
@@ -60,7 +61,7 @@ class User(UserMixin, db.Model):
@
login_manager
.
user_loader
@
login_manager
.
user_loader
def
load_user
(
user_id
):
def
load_user
(
user_id
):
return
User
.
query
.
get
(
int
(
user_id
))
return
db
.
session
.
get
(
User
,
int
(
user_id
))
# Create database and default admin user
# Create database and default admin user
with
app
.
app_context
():
with
app
.
app_context
():
...
@@ -74,6 +75,7 @@ with app.app_context():
...
@@ -74,6 +75,7 @@ with app.app_context():
@
app
.
route
(
'/'
)
@
app
.
route
(
'/'
)
@
login_required
@
login_required
def
index
():
def
index
():
global
args
return
render_template
(
'index.html'
,
return
render_template
(
'index.html'
,
clients
=
list
(
clients
.
keys
()),
clients
=
list
(
clients
.
keys
()),
websocket_port
=
args
.
port
,
websocket_port
=
args
.
port
,
...
@@ -168,6 +170,10 @@ def get_clients():
...
@@ -168,6 +170,10 @@ def get_clients():
'count'
:
len
(
clients
)
'count'
:
len
(
clients
)
})
})
@
app
.
route
(
'/logos/<path:filename>'
)
def
logos_files
(
filename
):
return
send_from_directory
(
'logos'
,
filename
)
async
def
handle_websocket
(
websocket
,
path
=
None
):
async
def
handle_websocket
(
websocket
,
path
=
None
):
try
:
try
:
async
for
message
in
websocket
:
async
for
message
in
websocket
:
...
@@ -270,6 +276,7 @@ async def main():
...
@@ -270,6 +276,7 @@ async def main():
parser
.
add_argument
(
'--web-https'
,
action
=
'store_true'
,
help
=
'Enable HTTPS for web interface'
)
parser
.
add_argument
(
'--web-https'
,
action
=
'store_true'
,
help
=
'Enable HTTPS for web interface'
)
parser
.
add_argument
(
'--debug'
,
action
=
'store_true'
,
help
=
'Enable debug output'
)
parser
.
add_argument
(
'--debug'
,
action
=
'store_true'
,
help
=
'Enable debug output'
)
global
args
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
global
debug
global
debug
debug
=
args
.
debug
debug
=
args
.
debug
...
...
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