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
59ef8545
Unverified
Commit
59ef8545
authored
Apr 02, 2018
by
老广
Committed by
GitHub
Apr 02, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #43 from jumpserver/dev
Dev
parents
98e8df01
f6be91a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
proxy.py
coco/proxy.py
+4
-2
requirements.txt
requirements/requirements.txt
+1
-1
No files found.
coco/proxy.py
View file @
59ef8545
...
...
@@ -87,12 +87,14 @@ class ProxyServer:
pass
def
get_proxy_sock
(
self
,
asset
):
sock
=
None
domain
=
self
.
app
.
service
.
get_domain_detail_with_gateway
(
asset
.
domain
)
sock
=
None
if
not
domain
.
has_ssh_gateway
():
return
None
for
i
in
domain
.
gateways
:
gateway
=
domain
.
random_gateway
()
gateway
=
domain
.
random_
ssh_
gateway
()
proxy_command
=
[
"ssh"
,
"-p"
,
str
(
gateway
.
port
),
"{}@{}"
.
format
(
gateway
.
username
,
gateway
.
ip
),
...
...
requirements/requirements.txt
View file @
59ef8545
...
...
@@ -20,7 +20,7 @@ Jinja2==2.10
jmespath==0.9.3
jms-es-sdk==0.5.2
jms-storage==0.0.12
jumpserver-python-sdk==0.0.3
4
jumpserver-python-sdk==0.0.3
5
MarkupSafe==1.0
oss2==2.4.0
paramiko==2.4.0
...
...
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