Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
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
ops
coco
Commits
a2592688
Commit
a2592688
authored
Aug 07, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] 修复handle task
parent
b68b83df
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
README.md
README.md
+4
-0
ws.py
coco/httpd/ws.py
+9
-0
No files found.
README.md
View file @
a2592688
...
@@ -7,6 +7,10 @@ It's implement a ssh server and a web terminal server,
...
@@ -7,6 +7,10 @@ It's implement a ssh server and a web terminal server,
User can connect them except jumpserver openssh server and connect.py
User can connect them except jumpserver openssh server and connect.py
pre version.
pre version.
# Warning
Coco has been replace by
[
koko
](
https://github.com/jumpserver/koko.git
)
From v1.5.2, coco will be stop update
## Install
## Install
...
...
coco/httpd/ws.py
View file @
a2592688
...
@@ -72,13 +72,22 @@ class ProxyNamespace(BaseNamespace):
...
@@ -72,13 +72,22 @@ class ProxyNamespace(BaseNamespace):
client
.
chan
=
ws_proxy
client
.
chan
=
ws_proxy
self
.
emit
(
'room'
,
{
'room'
:
client_id
,
'secret'
:
secret
})
self
.
emit
(
'room'
,
{
'room'
:
client_id
,
'secret'
:
secret
})
join_room
(
client_id
)
join_room
(
client_id
)
if
not
asset_id
or
not
system_user_id
:
if
not
asset_id
or
not
system_user_id
:
msg
=
"Not asset id or system user id found"
.
format
(
asset_id
,
system_user_id
)
logger
.
error
(
msg
)
return
return
asset
=
app_service
.
get_asset
(
asset_id
)
asset
=
app_service
.
get_asset
(
asset_id
)
system_user
=
app_service
.
get_system_user
(
system_user_id
)
system_user
=
app_service
.
get_system_user
(
system_user_id
)
if
not
asset
or
not
system_user
:
if
not
asset
or
not
system_user
:
msg
=
"No asset or system user found {} {}: {} {}"
.
format
(
asset_id
,
system_user_id
,
asset
,
system_user
)
logger
.
error
(
msg
)
return
return
forwarder
=
ProxyServer
(
client
,
asset
,
system_user
)
forwarder
=
ProxyServer
(
client
,
asset
,
system_user
)
...
...
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